SpeedRunEthereumChallenge #3: 🎲 Dice Game

challenge banner

🎰 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

SpeedRunEthereum.com!