---
eip: 779
label: EIP-779
title: "Hardfork Meta: DAO Fork"
status: Final
type: Meta
created: 2017-11-26
requires: 606
official: https://eips.ethereum.org/EIPS/eip-779
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-779.md
canonical: https://eips.huatuo.xyz/eip-779/
lang: en
tldr: "Documents the 2016 DAO Fork: an irregular state change at block 1,920,000 that moved the ether of The DAO and its child DAOs into a refund contract, without changing any protocol rules."
tags: [hardfork, meta, dao, history, irregular-state-change]
---

# EIP-779: Hardfork Meta: DAO Fork

> This documents the changes included in the hard fork named "DAO Fork". Unlike other hard forks, the DAO Fork did not change the protocol; all EVM opcodes, transaction format, block structure, and so on remained the same.

**TL;DR:** Documents the 2016 DAO Fork: an irregular state change at block 1,920,000 that moved the ether of The DAO and its child DAOs into a refund contract, without changing any protocol rules.

## What problem does it solve?

In June 2016, an attacker exploited a bug in **The DAO**, a large investment contract, and began draining its ether into "child DAO" contracts. The child DAO rules locked those funds for a period, which gave the community time to respond. After public debate and a stake vote, Ethereum clients shipped a hard fork that returned the ether to DAO token holders.

EIP-779 was written in late 2017, after the fact. It records exactly what that fork did, so the DAO Fork has a Meta EIP like every other hard fork.

## How it works

Unlike other hard forks, the DAO Fork **changed no protocol rules**. Opcodes, transaction format and block structure all stayed the same. It was a one-time **irregular state change**:

- **List `L`:** the accounts were fixed using block 1,880,000. They were The DAO, its `extraBalance` account, every child DAO created by the DAO creator contract, and each child's `extraBalance`. The full list is in the spec.
- **Transfer:** at the start of block **1,920,000** on mainnet, the entire ether balance of every account in `L` moved to a **WithdrawDAO** contract at `0xbf4ed7b27f1d666546e30d74d50d173d20bca754`.
- **Refunds:** WithdrawDAO has a `withdraw()` function. It takes a holder's DAO tokens and sends back one wei per token unit taken. A trustee address can withdraw only the leftover surplus.
- **Fork marker:** blocks 1,920,000 through 1,920,009 must carry the ASCII string `dao-hard-fork` in their `extraData`. This let nodes on each side of the split quickly tell which chain a peer was following.

## Sample code

Check the fork marker on a mainnet block (ethers v6):

```ts
import { JsonRpcProvider, toUtf8String } from "ethers";

const provider = new JsonRpcProvider(process.env.RPC_URL);
const block = await provider.getBlock(1_920_000);

console.log(block!.extraData);                // 0x64616f2d686172642d666f726b
console.log(toUtf8String(block!.extraData));  // "dao-hard-fork"
```

## Things to know

- This proposal is Final. It records an event that already happened (July 2016), so it did not propose new behavior.
- The fork was controversial. Nodes that refused it kept following the original, unforked chain, which became **Ethereum Classic**.
- The precedent led to later proposals to recover other lost funds by irregular state changes, such as [EIP-999](/eip-999/) (Withdrawn) and the general framework in [EIP-867](/eip-867/) (Stagnant). None were adopted, and the DAO Fork remains the only irregular state change on Ethereum mainnet.
- The DAO Fork came after Homestead ([EIP-606](/eip-606/)), which is why this EIP lists it as required.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-779
