Ethernaut 3 - CoinFlip Foundry Solution 2023 | Solidity & Blockchain Randomness Issues
Johnny Time
π Ethernaut Challenge 3 - CoinFlip Foundry Solution 2023 π
Are you ready to take your Smart Contract Hacking skills to the next level? In this tutorial, we'll dive deep into solving the "Ethernaut 3 - Coin flip" challenge using Foundry. Our goal is to win the CoinFlip game 10 times in a row! I'll guide you through every step of the process.
π Prerequisites π
Before we start, make sure you've completed these prerequisites:
Watch the first video in our series on how to get started with Ethernaut and set up your Foundry environment for tackling challenges: https://www.youtube.com/watch?v=UWy-CcnulCA&list=PLKXasCp8iWpjYKwk0hcdVDVZlpW_NGEYS
Clone the Ethernaut Foundry Solutions Repository on GitHub (don't forget to leave a star π): https://github.com/RealJohnnyTime/ethernaut-foundry-solutions-johnnytime
Subscribe to the JohnnyTime YouTube channel for more tutorials, updates, and the full Ethernaut Foundry Solutions playlist.
π¨βπ» Become a Certified Smart Contract Hacker π©βπ»
If you're looking to turn Smart Contract Hacking into a career, check out our full Smart Contract Hacking Course. Gain in-depth knowledge, practice with hands-on exercises, and receive an official Smart Contract Hacker certificate, use the following discount link: https://johnnytime.xyz/smart-contract-hacker
π§Understanding Randomness in Solidity:π§
- Solidity Randomness Vulnerabilities: Learn about the challenges associated with achieving true randomness in Solidity, a crucial topic in the world of smart contracts.
- Blockchain Randomness Issues: Delve into the complexities of generating randomness on the Ethereum blockchain and the potential vulnerabilities.
π Spotting the Vulnerability π
The CoinFlip contract generates its random number and decides how to flip the coin is wrong. We can create another smart contract that will generate the same value in advance, play the game and that's how we can make sure that we win in every round!
See you in the next tutorial! π
Timestamps 00:00 Intro 00:55 CoinFlip Challenge Overview 02:00 Smart Contract Overview 06:40 The Randomness Vulnerability 07:20 CoinFlip Solution 15:45 Summary ... https://www.youtube.com/watch?v=02uda3XpQfg
214808461 Bytes