SpeedRunEthereumChallenge #3: π² Dice Game
π° Randomness is tricky on a public deterministic blockchain. The block hash is an easy to use, but very weak form of randomness. This challenge will give you an example of a contract using block hash to create random numbers. This randomness is exploitable. Other, stronger forms of randomness include commit/reveal schemes, oracles, or VRF from Chainlink. the Ethereum protocol!
π One day soon, randomness will be built into the Ethereum protocol!
𧀠Every time a player rolls the dice, they are required to send .002 Eth. 40 percent of this value is added to the current prize amount while the other 60 percent stays in the contract to fund future prizes. Once a prize is won, the new prize amount is set to 10% of the total balance of the DiceGame contract.
𧨠Your job is to attack the Dice Game contract! You will create a new contract that will predict the randomness ahead of time and only roll the dice when youβ²re guaranteed to be a winner!
π¬ Meet other builders working on this challenge and get help in the Telegram Group