Skip to content

Commit ea3625d

Browse files
Michael Colburnbohendo
authored andcommitted
Added theRun as an example of bad randomness
1 parent 7e72091 commit ea3625d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bad_randomness/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ and take a fixed amount of sequential time to evaluate
3434

3535
## Examples
3636

37+
- The `random` function in [theRun](https://etherscan.io/address/0xcac337492149bdb66b088bf5914bedfbf78ccc18#code) was vulnerable to this attack. It used the blockhash, timestamp and block number to generate numbers in a range to determine winners of the lottery. To exploit this, an attacker could set up a smart contract that generates numbers in the same way and submits entries when it would win. As well, the miner of the block has some control over the blockhash and timestamp and would also be able to influence the lottery in their favor.
38+
3739
## Sources
3840

3941
- https://ethereum.stackexchange.com/questions/191/how-can-i-securely-generate-a-random-number-in-my-smart-contract

0 commit comments

Comments
 (0)