Bitcoin Forum
June 03, 2024, 12:32:07 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ETH] Ethereum PRNG Challenge  (Read 462 times)
ETH_Apps (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
June 17, 2016, 08:46:52 PM
Last edit: June 28, 2016, 06:48:30 PM by ETH_Apps
 #1

There has been a lot of discussion about the impossibility to generate secure randomness inside ethereum smart contracts, and general consensus is that theoretically miners could easily manipulate the results. But maybe it's worth to perform a small reality check... here comes the Ethereum PRNG Challenge!

PRNG_Challenge: 0x4ed65e408439a7f6459b5cfbd364f373bd6ed5f7

Balance of above contract is currently 10 ETH: when you send 0.1 ETH or more to it (with a gas limit of 100000, unused gas will be returned) a 256 bit random number generator is triggered, and if the generated value matches with a predefined lucky number the entire balance is paid back.

Let's see if someone manage to cash it out, of course there's always a very small probability of hitting the correct number out of pure luck (theoretically 1 out of 10^77 - the entire universe is estimated to contain about 10^80 atoms).

Here you can check the source code and interact with the contract:

PRNG_Challenge: 0x4ed65e408439a7f6459b5cfbd364f373bd6ed5f7
https://live.ether.camp/account/4ed65e408439a7f6459b5cfbd364f373bd6ed5f7
https://etherscan.io/address/0x4ed65e408439a7f6459b5cfbd364f373bd6ed5f7
https://etherchain.org/account/0x4ed65e408439a7f6459b5cfbd364f373bd6ed5f7

Interface:
lucky_number(): returns the predefined lucky number.
last_number(): returns the last random number generated.
attempts(): returns the total number of attempts.
winner(): returns the winner address (if any).
Attempt(Participant, Number): event triggered at each attempt.
Winner(Winner_Address, Amount): event triggered in case of win.

Good luck! Smiley
misterbigg
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001



View Profile
June 17, 2016, 08:58:26 PM
 #2

This looks like an advertisement, is this the right forum?
ETH_Apps (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
June 18, 2016, 08:12:26 AM
 #3

This looks like an advertisement, is this the right forum?

If it's not I'm sorry, please feel free to direct me/move the thread in the right one. Thanks!
ETH_Apps (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
June 18, 2016, 03:22:20 PM
 #4

Interface:
Code:
[{"constant":true,"inputs":[],"name":"lucky_number","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"attempts","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"last_number","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"admin_kill","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"winner","outputs":[{"name":"","type":"address"}],"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"Participant","type":"address"},{"indexed":false,"name":"Number","type":"uint256"}],"name":"Attempt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"Winner_Address","type":"address"},{"indexed":false,"name":"Amount","type":"uint256"}],"name":"Winner","type":"event"}]
ETH_Apps (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
June 27, 2016, 03:51:14 PM
 #5

10.1 ETH are still there... taking it as a good sign Wink
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!