EIPs/EIPS/eip-779.md

2.3 KiB

eip title author type status created
779 Hardfork Info: DAO Fork Casey Detrio Informational Final 2017-11-26

Abstract

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. Rather, the DAO Fork was an "irregular state change" that transferred ether balances from a list of accounts ("child DAO" contracts) into a specified account (the "WithdrawDAO" contract).

Specification

  • Codename: DAO Fork
  • Activation:
    • Block == 1,920,000 on Mainnet

See references [1] and [2] for the original, full specification. It is summarized here for convenience.

At block 1880000, the following accounts are encoded into a list L:

  • The DAO (0xbb9bc244d798123fde783fcc1c72d3bb8c189413)
  • its extraBalance (0x807640a13483f8ac783c557fcdf27be11ea4ac7a)
  • all children of the DAO creator (0x4a574510c7014e4ae985403536074abe582adfc8)
  • and the extraBalance of each child

At the beginning of block 1920000, all ether throughout all accounts in L will be transferred to a contract deployed at 0xbf4ed7b27f1d666546e30d74d50d173d20bca754. The contract was created from the following Solidity code (compiler version v0.3.5-2016-07-01-48238c9):

// Deployed on mainnet at 0xbf4ed7b27f1d666546e30d74d50d173d20bca754

contract DAO {
    function balanceOf(address addr) returns (uint);
    function transferFrom(address from, address to, uint balance) returns (bool);
    uint public totalSupply;
}

contract WithdrawDAO {
    DAO constant public mainDAO = DAO(0xbb9bc244d798123fde783fcc1c72d3bb8c189413);
    address public trustee = 0xda4a4626d3e16e094de3225a751aab7128e96526;

    function withdraw(){
        uint balance = mainDAO.balanceOf(msg.sender);

        if (!mainDAO.transferFrom(msg.sender, this, balance) || !msg.sender.send(balance))
            throw;
    }

    function trusteeWithdraw() {
        trustee.send((this.balance + mainDAO.balanceOf(this)) - mainDAO.totalSupply());
    }
}

References

  1. https://blog.slock.it/hard-fork-specification-24b889e70703
  2. https://blog.ethereum.org/2016/07/15/to-fork-or-not-to-fork/

Copyright and related rights waived via CC0.