Intermediate Track 04
π‘οΈ
Code is Law β Bugs Mean Losses
2023 DeFi hack losses: $180M
Smart contracts cannot be changed after deployment. A single line of bug puts all assets at risk.
What you'll learn in this module
- β Key smart contract vulnerabilities: reentrancy, integer overflow, access control flaws
- β Practical defenses: CEI pattern, ReentrancyGuard, and how to apply them in code
- β The role and importance of formal security audits and bug bounty programs
π
Reentrancy
The DAO hack. ~3.6M ETH ($60M) drained. Caused Ethereum's hard fork.
π’
Overflow
Exceeding uint limit wraps to 0. Solidity 0.8+ prevents this by default.
π
Access Control
Admin functions callable by anyone. Parity wallet $30M incident.