The DAO was the first major smart contract on Ethereum: a decentralized venture fund that raised ~$150M in ETH in 2016. In June 2016 an attacker exploited a reentrancy bug and drained ~$60M. The response split Ethereum forever.
How the exploit worked
The DAO's splitDAO function sent user's share of ETH before updating their balance. The attacker's contract recursively called splitDAO in the middle of the transfer, draining ETH before the balance was zeroed. The attacker got the same slice paid to them repeatedly.
The classic reentrancy pattern
- Contract sends ETH to attacker.
- Attacker's fallback function calls back into contract.
- Contract sees balance not yet updated.
- Sends ETH again.
- Repeat until pool empty.
Fix (checks-effects-interactions pattern): update state BEFORE external calls. Or use a reentrancy guard.
The response
Ethereum community debated: hard fork to reverse the exploit, or accept it. The debate was philosophical: is code law, or should social consensus override on-chain outcomes?
The split
Vitalik and majority backed a hard fork to restore stolen funds. Minority refused, arguing immutability was Ethereum's most important property. Result: two chains from block 1,920,000:
- Ethereum (ETH): the forked chain that reversed the hack.
- Ethereum Classic (ETC): the original chain where the hack stands.
What it changed forever
- Reentrancy became the most-taught Solidity vulnerability.
- Reentrancy guards became standard in OpenZeppelin.
- The immutability question became live for every future controversy.
Ironic epilogue
ETC has since suffered multiple 51% attacks. The chain that preserved immutability has proven less secure than the one that broke it.
Koinlytics