News for hackers. Stuff that matters.
Re:Learn Ethereum smart contract programming by jsnathan on Monday July 24, 2017 @06:02AM (#14837135)
In the example code used, the random number which determines the winner is derived from the previous block hash. Since the lottery-owner determines when the function is run, they could call the function when the previous block hash favors their own bet, or else modify their bet before calling the function.
Re:Learn Ethereum smart contract programming by ym705 on Monday July 24, 2017 @06:18AM (#14837204)
Yep that is why there is a notice and link about random number generation in the tutorial.
Re:Learn Ethereum smart contract programming by renas on Monday July 24, 2017 @08:39AM (#14837905)
try this lottery code instead https://github.com/renasboy/ETHLottery
Re:Learn Ethereum smart contract programming by rmetzler on Tuesday July 25, 2017 @03:54PM (#14851308)
Is it correct that the betted value doesn't influence any winning chances?

Also, is the last byte of the blockhash function return value guaranteed to be equidistributed?