The DAO hack and the Ethereum split: the day the village rewrote one page
In June 2016, a flaw in a smart contract called The DAO let an attacker drain about 3.6 million ether. On 20 July 2016, at block 1,920,000, most of the Ethereum network adopted a rule change that moved the funds to a refund contract. The part that refused kept the old chain, which became Ethereum Classic.
In the spring of 2016, the village wrote a big new rule into its notebook. A shared chest: put in your coins, get vouchers back, and together decide which projects to fund. Anyone could leave by asking for their share. The rule would pay them out.
The rule had a flaw in the order of its steps. It handed out coins first and crossed out the balance second. In June, a visitor nobody knew found that he could ask again before the crossing out, and again, and again. About a third of the chest walked out of the gate.
The notebook had done exactly what was written. So the village faced a question no village wants: do we rewrite a page that everyone has already copied? Most houses said yes. Some said never. From that day there were two notebooks.
What it was
The DAO was a smart contract on Ethereum, a kind of investment fund run by code and token votes. The US Securities and Exchange Commission later described it in a formal report: co-founders of a German company, Slock.it UG, were behind it, and "Anyone was eligible to purchase DAO Tokens (as long as they paid ETH)" (SEC, 2017).
The flaw is now known as re-entrancy. The Solidity documentation explains it with two contracts, A and B: when A hands control to B, "This makes it possible for B to call back into A before this interaction is completed" (Solidity docs). If A hasn't updated its own records yet, B can ask twice.
How it happened, step by step
- 30 April to 28 May 2016: the sale. The DAO sold about 1.15 billion DAO tokens for about 12 million ETH (SEC, 2017).
- 17 June 2016: the attack. "An unknown individual or group" began draining the contract. The SEC puts the total at "approximately 3.6 million ETH", which it calls "1/3 of the total ETH raised". Vitalik Buterin wrote the same day: "The attack is a recursive calling vulnerability." He added that "Ethereum itself is perfectly safe": the bug was in The DAO, not in the network (Ethereum Foundation).
- A clock is ticking. The DAO's own code kept the drained ether locked in the attacker's new contract for 27 days (SEC, 2017). That gave the village time to argue.
- 28 June 2016: the soft fork fails. The first plan, a soft fork to freeze the funds, turned out to let anyone run code up to the block gas limit without paying gas. Felix Lange, writing on the Foundation's blog, advised running the earlier client version instead (Ethereum Foundation).
- 15 July 2016: the hard fork plan. Jeffrey Wilcke set out the fork for block 1,920,000. The ether of The DAO and its offshoots would move to a contract with one job: return ether at "1 ETH = 100 DAO". He also wrote that "no decision is the right one" (Ethereum Foundation).
- 20 July 2016, 13:20:40 UTC: block 1,920,000. The block carries the words "dao-hard-fork" in its extra-data field (Etherscan). Buterin's post that day: it "contained the execution of an irregular state change", and the recovery contract was "already returning DAO token holders' ether" (Ethereum Foundation).
- The other notebook. ethereum.org's history page: "Some miners refused to fork because the DAO incident wasn't a defect in the protocol. They went on to form Ethereum Classic" (ethereum.org).
- 25 July 2017: the regulator's verdict. The SEC concluded that "DAO Tokens are securities" under US law, and decided not to bring an enforcement action (SEC, 2017).
The refund sum
At 1 ETH per 100 DAO tokens, someone who bought 10,000 tokens could claim 10,000 divided by 100 = 100 ETH back. Across the whole sale, 1.15 billion tokens divided by 100 is 11.5 million ETH, in line with the roughly 12 million ETH the SEC says was raised.
Why it matters
- Code is not a promise of intent. The DAO did what its code said, not what its buyers thought it said.
- Immutability has a social limit. A network is the people who run it. If enough of them agree to change the record, they can.
- Who gained. DAO token holders who stayed on the forked chain got their ether back.
- Who paid. Anyone who believed "nobody can change the notebook" without exceptions, and the miners and users who stayed on the old chain without a refund.
Where people get it wrong
- "Ethereum was hacked." The network worked as designed. One contract on it had a bug.
- "The fork reversed the transactions." It didn't roll back blocks. It moved balances by a one-off rule in one block.
- "Ethereum Classic is the copy." It is the chain that kept the old rules. Which one is "the original" is a matter of opinion. More in "Bitcoin Cash, Ethereum Classic and other forks".
- "It couldn't happen again." The Solidity documentation still warns about re-entrancy and tells developers to update their own records before calling anyone else. Warnings only help the people who read them.
Read the order of the steps
You don't need to read code to learn the lesson. Before you put money into any contract, ask two questions. Has its code been checked by people with no stake in it? And who can change it if something goes wrong: nobody, a team, or the whole network?
The DAO's answer to the second question turned out to be "the whole village, after a month of arguing". It worked once. Don't plan your savings around it happening twice.
Frequently asked questions
What was The DAO?
The DAO was a smart contract on Ethereum launched in 2016 that worked like an investment fund governed by token votes. It sold about 1.15 billion DAO tokens for about 12 million ETH between 30 April and 28 May 2016, according to the SEC.
How much ether was taken in the DAO hack?
About 3.6 million ETH, roughly a third of what The DAO had raised, according to the SEC's 2017 report. The attacker exploited a flaw that let a contract ask for a payout again before its balance was updated.
What happened at block 1,920,000?
Block 1,920,000, mined on 20 July 2016, carried out the DAO hard fork. It moved the ether of The DAO and related contracts to a recovery contract, where token holders could claim 1 ETH for every 100 DAO tokens.
Why does Ethereum Classic exist?
Some miners and users refused the DAO fork, arguing that the bug was in one contract and not in the protocol. They kept running the unchanged chain, which became Ethereum Classic.
Were DAO tokens securities?
In a report dated 25 July 2017, the US SEC concluded that DAO tokens were securities under US law. It decided not to take enforcement action in that case.
Sources
- US SEC, Report of Investigation Pursuant to Section 21(a): The DAO, Release No. 81207 (25 July 2017)
- Ethereum Foundation Blog, Vitalik Buterin, CRITICAL UPDATE Re: DAO Vulnerability (17 June 2016)
- Ethereum Foundation Blog, Felix Lange, Security alert: DoS vulnerability in the soft fork (28 June 2016)
- Ethereum Foundation Blog, Jeffrey Wilcke, To fork or not to fork (15 July 2016)
- Ethereum Foundation Blog, Vitalik Buterin, Hard fork completed (20 July 2016)
- Etherscan, Block 1,920,000
- ethereum.org, The history of Ethereum (DAO fork)
- Solidity documentation, Security considerations: re-entrancy

