EIP-779 Hard fork meta: The DAO Fork ("Hardfork Meta: DAO Fork")

Final · Other · EIP status Final · created 2017-11-26

A meta document recording the contents of The DAO Fork hard fork. It left the protocol rules unchanged and, at block 1,920,000, performed an irregular state change moving the ether of the child DAO accounts into the withdrawal contract WithdrawDAO.

Why it is needed

The DAO and the child DAO contracts that split off from it held ether, and returning this money to its original holders required consolidating the balances of specific accounts into one place. However, there was no way within Ethereum's ordinary rules to forcibly move another account's balance. So instead of changing the rules, a special measure was carried out that directly rewrote the blockchain ledger's state once, an irregular state change. Such a measure must be applied identically by every node on the same block, or the chain would fork. A formal record was therefore needed pinning down exactly which account's balance moves, at which block, to which contract, by precise address and block number. EIP-779 is the document that preserved that record within the EIP system.

What changes

Today

After EIP-779

Who is affected

In depth

A hard fork that did not change the protocol

Ordinary hard forks change protocol rules, such as adding EVM opcodes or changing transaction formats. The DAO Fork was different. The original text states explicitly that every EVM opcode, transaction format, and block structure remained unchanged. Instead, it carried out an irregular state change moving the ether balances of a specific list of accounts (the child DAO contracts) to a designated account (the WithdrawDAO contract). It was a fork that rewrote the ledger itself once rather than the rules, and clients apply this state change as a hardcoded rule when processing that block.

Composition of target account list L

At block 1,880,000, four categories of accounts are encoded into list L: The DAO (0xbb9bc244d798123fde783fcc1c72d3bb8c189413), its extraBalance (0x807640a13483f8ac783c557fcdf27be11ea4ac7a), every child created by the DAO creator (0x4a574510c7014e4ae985403536074abe582adfc8), and each child's extraBalance. The original text lists all 116 addresses as a reference list, eliminating any room for disagreement among clients about which accounts were subject to the fork.

Ether movement at block 1,920,000

The fork's codename is DAO Fork and it activated at mainnet block 1,920,000. At the start of that block, the full ether balance of every account in list L is transferred to the contract deployed at 0xbf4ed7b27f1d666546e30d74d50d173d20bca754. This transfer occurs as a state change built into the block processing rules, with no transaction sent by anyone. The original text designates the slock.it blog's hard fork specification and two Ethereum Foundation blog posts as the authoritative source for the full specification, noting that the EIP body is a summary of those.

Behavior of the WithdrawDAO contract

The receiving contract was compiled with Solidity compiler v0.3.5-2016-07-01-48238c9 and deployed in transaction 0xfeae1ff3cf9b6927d607744e3883ea105fb16042d4639857d9cfce3eba644286 at block 1,883,496. withdraw() looks up the caller's mainDAO token balance via balanceOf, then uses transferFrom to attribute the tokens to the contract and send to return the same quantity of ether. If either step fails, it throws and reverts everything. trusteeWithdraw() sends any surplus, computed as the contract's ether balance plus the DAO tokens the contract holds minus totalSupply, to the trustee address (0xda4a4626d3e16e094de3225a751aab7128e96526). The original text includes the full deployment code and runtime bytecode, allowing the deployed code to be verified directly.

extraData marker obligation

Blocks in the range [1,920,000, 1,920,009] MUST include 0x64616f2d686172642d666f726b, the ASCII string dao-hard-fork, in the extraData field. Since this marker appears in the ten blocks immediately after the fork activates, one can confirm from the block header alone whether that block was produced under the fork's rules.

A post hoc record document in Final status

This EIP's type is Meta and its status is Final, so it no longer changes. Its requires field specifies EIP-606. The references are the original slock.it specification from July 2016 and the Ethereum Foundation blog post To fork or not to fork, and the EIP itself was written on November 26, 2017. Rather than a new proposal, it is a post hoc record organizing within the EIP system the contents of a fork that had already run on mainnet.

Original EIP · ← EIPs