Skip to main content

How Did the DAO Hack in 2016 Utilize a Reentrancy Attack?

The DAO (Decentralized Autonomous Organization) was a complex smart contract that allowed users to withdraw their funds. The attacker exploited a reentrancy vulnerability in the withdrawal function.

The function sent Ether to the user's address before updating their internal token balance. The attacker's contract, upon receiving the Ether, used its fallback function to recursively call the withdrawal function again.

Because the DAO's internal balance had not yet been updated, it repeatedly sent Ether for the same initial request, allowing the attacker to drain millions of dollars worth of ETH.

If a User Has an Allowance of 100 Tokens and a Balance of 50, What Is the Maximum the Contract Can Pull?
What Happens to My Investment If a Rebase Token’s Smart Contract Is Exploited?
How Does the Burning of the ‘Base Fee’ under EIP-1559 Affect the Supply of Ether?
What Was “The DAO Hack” and What Were Its Consequences for Ethereum?