lessonΒ·30 minΒ·Chapter 1 of 3
Reentrancy Attacks
Pro Content
This course is part of the Pro plan. Upgrade to access all premium content.
Upgrade to ProReentrancy is the most infamous smart contract vulnerability. It occurs when a contract makes an external call before updating its state. The called contract can 're-enter' the original function, exploiting the stale state. The 2016 DAO hack exploited reentrancy, leading to a $60M loss and Ethereum's hard fork. Prevention: follow the Checks-Effects-Interactions pattern (update state before external calls), use OpenZeppelin's ReentrancyGuard, or use transfer() which forwards only 2,300 gas (insufficient for reentrancy).
π‘ Key Takeaway
This lesson covers the fundamental concepts. Make sure you understand these before moving to the next chapter.