{"eip":779,"title":"Hardfork Meta: DAO Fork","description":"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.","authors":["Casey Detrio (@cdetrio)"],"status":"Final","type":"Meta","created":"2017-11-26","requires":[606],"repo":"EIPs","label":"EIP-779","officialUrl":"https://eips.ethereum.org/EIPS/eip-779","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-779.md","url":"https://eips.huatuo.xyz/eip-779/","tldr":{"en":"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.","ja":"2016 年の DAO フォークを記録する文書。ブロック 1,920,000 で The DAO とその子 DAO のイーサを返金用コントラクトに移した不規則なステート変更であり、プロトコルのルールは変更していない。","ko":"2016년 DAO 포크를 기록한 문서. 블록 1,920,000에서 The DAO와 그 자식 DAO의 이더를 환불 컨트랙트로 옮긴 비정상적 상태 변경이며, 프로토콜 규칙은 바꾸지 않았다.","zh":"记录 2016 年 DAO 分叉：在区块 1,920,000 处进行的一次非常规状态变更，把 The DAO 及其子 DAO 的以太币转入退款合约，没有改变任何协议规则。"},"tags":["hardfork","meta","dao","history","irregular-state-change"],"explainers":{"en":{"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"],"related":[606,867,999,1010],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-779/","markdown":"## What problem does it solve?\n\nIn 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.\n\nEIP-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.\n\n## How it works\n\nUnlike 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**:\n\n- **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.\n- **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`.\n- **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.\n- **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.\n\n## Sample code\n\nCheck the fork marker on a mainnet block (ethers v6):\n\n```ts\nimport { JsonRpcProvider, toUtf8String } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst block = await provider.getBlock(1_920_000);\n\nconsole.log(block!.extraData);                // 0x64616f2d686172642d666f726b\nconsole.log(toUtf8String(block!.extraData));  // \"dao-hard-fork\"\n```\n\n## Things to know\n\n- This proposal is Final. It records an event that already happened (July 2016), so it did not propose new behavior.\n- The fork was controversial. Nodes that refused it kept following the original, unforked chain, which became **Ethereum Classic**.\n- 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.\n- The DAO Fork came after Homestead ([EIP-606](/eip-606/)), which is why this EIP lists it as required.\n"},"ja":{"lang":"ja","tldr":"2016 年の DAO フォークを記録する文書。ブロック 1,920,000 で The DAO とその子 DAO のイーサを返金用コントラクトに移した不規則なステート変更であり、プロトコルのルールは変更していない。","tags":["hardfork","meta","dao","history","irregular-state-change"],"related":[606,867,999,1010],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-779/","markdown":"## 何を解決するのか\n\n2016 年 6 月、攻撃者は大規模な投資用コントラクトである **The DAO** のバグを突き、そのイーサを「子 DAO」コントラクトへ流出させ始めました。子 DAO のルールではそれらの資金が一定期間ロックされたため、コミュニティが対応する時間が生まれました。公開の議論とステーク投票を経て、Ethereum クライアントは、イーサを DAO トークン保有者に返すハードフォークをリリースしました。\n\nEIP-779 は、事後の 2017 年末に書かれました。そのフォークが具体的に何を行ったかを記録し、DAO フォークにも他のハードフォークと同じようにメタ EIP を用意するものです。\n\n## 仕組み\n\n他のハードフォークと異なり、DAO フォークは**プロトコルのルールを一切変更しませんでした**。opcode、トランザクション形式、ブロック構造はすべて同じままです。これは 1 回限りの**不規則なステート変更**でした。\n\n- **リスト `L`:** 対象アカウントはブロック 1,880,000 を基準に確定されました。The DAO、その `extraBalance` アカウント、DAO 作成コントラクトが作成したすべての子 DAO、そして各子 DAO の `extraBalance` です。完全なリストは仕様に載っています。\n- **移転:** メインネットのブロック **1,920,000** の開始時に、`L` に含まれる全アカウントのイーサ残高のすべてが、`0xbf4ed7b27f1d666546e30d74d50d173d20bca754` にある **WithdrawDAO** コントラクトへ移されました。\n- **返金:** WithdrawDAO には `withdraw()` 関数があります。保有者の DAO トークンを受け取り、受け取ったトークン単位 1 つにつき 1 wei を返します。受託者（trustee）のアドレスは、残った余剰分だけを引き出せます。\n- **フォークの目印:** ブロック 1,920,000 から 1,920,009 までは、`extraData` に ASCII 文字列 `dao-hard-fork` を含める必要があります。これにより、分岐したそれぞれの側のノードは、ピアがどちらのチェーンに従っているかをすばやく見分けられました。\n\n## サンプルコード\n\nメインネットのブロックでフォークの目印を確認する（ethers v6）:\n\n```ts\nimport { JsonRpcProvider, toUtf8String } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst block = await provider.getBlock(1_920_000);\n\nconsole.log(block!.extraData);                // 0x64616f2d686172642d666f726b\nconsole.log(toUtf8String(block!.extraData));  // \"dao-hard-fork\"\n```\n\n## 知っておくべきこと\n\n- この提案は Final です。すでに起きた出来事（2016 年 7 月）を記録するものなので、新しい動作を提案してはいません。\n- このフォークには議論がありました。これを拒否したノードは元のフォークされていないチェーンに従い続け、それが **Ethereum Classic** になりました。\n- この前例は、失われた他の資金を不規則なステート変更で回復しようとする後の提案につながりました。[EIP-999](/eip-999/)（Withdrawn）や、[EIP-867](/eip-867/)（Stagnant）の汎用フレームワークなどです。いずれも採用されず、DAO フォークは今も Ethereum メインネットで唯一の不規則なステート変更です。\n- DAO フォークは Homestead（[EIP-606](/eip-606/)）の後に行われたため、この EIP はそれを必須として挙げています。\n"},"ko":{"lang":"ko","tldr":"2016년 DAO 포크를 기록한 문서. 블록 1,920,000에서 The DAO와 그 자식 DAO의 이더를 환불 컨트랙트로 옮긴 비정상적 상태 변경이며, 프로토콜 규칙은 바꾸지 않았다.","tags":["hardfork","meta","dao","history","irregular-state-change"],"related":[606,867,999,1010],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-779/","markdown":"## 어떤 문제를 해결하나요?\n\n2016년 6월, 공격자가 대규모 투자 컨트랙트인 **The DAO**의 버그를 악용해 그 이더를 \"자식 DAO\" 컨트랙트로 빼돌리기 시작했습니다. 자식 DAO의 규칙은 그 자금을 일정 기간 잠가 두었고, 덕분에 커뮤니티가 대응할 시간이 생겼습니다. 공개 토론과 지분 투표를 거쳐, 이더리움 클라이언트들은 이더를 DAO 토큰 보유자에게 돌려주는 하드 포크를 배포했습니다.\n\nEIP-779는 사후인 2017년 말에 작성되었습니다. 그 포크가 정확히 무엇을 했는지 기록하여, DAO 포크도 다른 모든 하드 포크처럼 Meta EIP를 갖게 합니다.\n\n## 어떻게 동작하나요?\n\n다른 하드 포크와 달리 DAO 포크는 **프로토콜 규칙을 전혀 바꾸지 않았습니다**. opcode, 트랜잭션 형식, 블록 구조는 모두 그대로입니다. 이는 일회성 **비정상적 상태 변경**이었습니다.\n\n- **목록 `L`:** 계정들은 블록 1,880,000을 기준으로 확정되었습니다. The DAO, 그 `extraBalance` 계정, DAO 생성자 컨트랙트가 만든 모든 자식 DAO, 그리고 각 자식 DAO의 `extraBalance`입니다. 전체 목록은 명세에 있습니다.\n- **이전:** 메인넷 블록 **1,920,000**이 시작될 때 `L`에 속한 모든 계정의 이더 잔액 전부가 `0xbf4ed7b27f1d666546e30d74d50d173d20bca754`의 **WithdrawDAO** 컨트랙트로 옮겨졌습니다.\n- **환불:** WithdrawDAO에는 `withdraw()` 함수가 있습니다. 보유자의 DAO 토큰을 받고 받은 토큰 단위당 1 wei를 돌려줍니다. 수탁자(trustee) 주소는 남은 잉여분만 인출할 수 있습니다.\n- **포크 표식:** 블록 1,920,000부터 1,920,009까지는 `extraData`에 ASCII 문자열 `dao-hard-fork`를 담아야 합니다. 이로써 갈라진 양쪽의 노드가 피어가 어느 체인을 따르는지 빠르게 구분할 수 있었습니다.\n\n## 샘플 코드\n\n메인넷 블록에서 포크 표식 확인하기(ethers v6):\n\n```ts\nimport { JsonRpcProvider, toUtf8String } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst block = await provider.getBlock(1_920_000);\n\nconsole.log(block!.extraData);                // 0x64616f2d686172642d666f726b\nconsole.log(toUtf8String(block!.extraData));  // \"dao-hard-fork\"\n```\n\n## 알아둘 점\n\n- 이 제안은 Final 상태입니다. 이미 일어난 일(2016년 7월)을 기록하는 것이므로 새로운 동작을 제안하지 않았습니다.\n- 이 포크는 논란이 있었습니다. 이를 거부한 노드들은 포크되지 않은 원래 체인을 계속 따랐고, 그 체인이 **이더리움 클래식**이 되었습니다.\n- 이 선례는 비정상적 상태 변경으로 다른 분실 자금을 회수하려는 후속 제안으로 이어졌습니다. [EIP-999](/eip-999/)(Withdrawn)와 [EIP-867](/eip-867/)(Stagnant)의 일반 프레임워크가 그 예입니다. 어느 것도 채택되지 않았고, DAO 포크는 지금도 이더리움 메인넷의 유일한 비정상적 상태 변경입니다.\n- DAO 포크는 Homestead([EIP-606](/eip-606/)) 이후에 이루어졌기 때문에 이 EIP는 이를 필수로 명시합니다.\n"},"zh":{"lang":"zh","tldr":"记录 2016 年 DAO 分叉：在区块 1,920,000 处进行的一次非常规状态变更，把 The DAO 及其子 DAO 的以太币转入退款合约，没有改变任何协议规则。","tags":["hardfork","meta","dao","history","irregular-state-change"],"related":[606,867,999,1010],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-779/","markdown":"## 它解决什么问题？\n\n2016 年 6 月，攻击者利用大型投资合约 **The DAO** 的一个漏洞，开始把其中的以太币转入“子 DAO”合约。子 DAO 的规则会把这些资金锁定一段时间，这给了社区应对的时间。经过公开辩论和持币投票后，以太坊客户端发布了一次硬分叉，把以太币退还给 DAO 代币持有者。\n\nEIP-779 写于 2017 年底，是事后补写的。它准确记录了那次分叉做了什么，使 DAO 分叉和其他硬分叉一样拥有一份 Meta EIP。\n\n## 它如何运作\n\n与其他硬分叉不同，DAO 分叉**没有改变任何协议规则**。操作码、交易格式和区块结构都保持不变。它是一次性的**非常规状态变更**：\n\n- **列表 `L`：** 账户以区块 1,880,000 为准确定。包括 The DAO、它的 `extraBalance` 账户、由 DAO 创建者合约创建的每一个子 DAO，以及每个子 DAO 的 `extraBalance`。完整列表见规范。\n- **转移：** 在主网区块 **1,920,000** 开始时，`L` 中每个账户的全部以太币余额都被转入位于 `0xbf4ed7b27f1d666546e30d74d50d173d20bca754` 的 **WithdrawDAO** 合约。\n- **退款：** WithdrawDAO 有一个 `withdraw()` 函数。它收走持有者的 DAO 代币，每收走一个代币单位就退回 1 wei。受托人（trustee）地址只能提取剩余的盈余。\n- **分叉标记：** 区块 1,920,000 到 1,920,009 的 `extraData` 中必须带有 ASCII 字符串 `dao-hard-fork`。这让分裂双方的节点能迅速判断对等节点跟随的是哪条链。\n\n## 示例代码\n\n检查主网区块上的分叉标记（ethers v6）：\n\n```ts\nimport { JsonRpcProvider, toUtf8String } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst block = await provider.getBlock(1_920_000);\n\nconsole.log(block!.extraData);                // 0x64616f2d686172642d666f726b\nconsole.log(toUtf8String(block!.extraData));  // \"dao-hard-fork\"\n```\n\n## 需要注意\n\n- 该提案处于 Final 状态。它记录的是已经发生的事件（2016 年 7 月），因此没有提出新的行为。\n- 这次分叉存在争议。拒绝它的节点继续跟随原来的、未分叉的链，那条链成为了 **Ethereum Classic**。\n- 这一先例引发了后来以非常规状态变更来追回其他丢失资金的提案，例如 [EIP-999](/eip-999/)（Withdrawn）以及 [EIP-867](/eip-867/)（Stagnant）中的通用框架。它们都没有被采纳，DAO 分叉至今仍是以太坊主网上唯一的非常规状态变更。\n- DAO 分叉发生在 Homestead（[EIP-606](/eip-606/)）之后，所以该 EIP 把它列为前提。\n"}},"requiredBy":[608,8133]}
