• Wait for some time after the hard fork before attempting to convert your DAOs into ETHs. There is no deadline for the withdrawals. The safest thing to do is wait.
  • The Withdrawal contract only allows the conversion of The DAO tokens (DAO) into ethers (ETH) at the rate of 100 DAOs = 1 ETH. There is a separate process for purchasers who paid more than 1 ETH per 100 DAOs to get refunded the extra amount paid
  • Be sure to upgrade to the latest version the client of your choice: geth, parity, mist.

 

The DAO contract was attacked on 17th June 2016 where the attacker drained about USD 50 million worth of ethers using a recursive call vulnerability in The DAO contract code. Please find below how to get back your invested funds.

Ethereum Hard-Fork


Following the attack, Ethereum community, miners and exchanges leading the vote, decided to go hard-fork. After some code change and the upgrade of Ether clients, the hard-fork was completed on July 20th. Nearly 12 million ETH have been moved from the “Dark DAO” and “Whitehat DAO” contracts into the WithdrawDAO recovery contract.

DAO token sales


1- For people who paid 1 ETH per 100 DAOs

In the first 14 days of the sales, The DAO tokens were created at a rate of 1 ether = 100 tokens.

In the subsequent days before the end of the creation period, the number of ethers for each 100 tokens created increases until the final rate of creation is 1.5 ethers = 100 tokens. The ETH amount in excess of 1 ETH per 100 DAOs was stored in The DAO's extraBalance account.

At the hard-fork block #1,920,000 , the ETH balance from The DAO and it's child DAOs (which includes the balance from the extraBalance account) were transferred into the Withdrawal contract. Immediately after the hard-fork, at block #1,920,090, the Withdrawal contact's trusteeWithdraw() function was called in this transaction to transfer 463,798.08818109 ETH into TheDAOCurator multisig wallet.

  1. The way the Withdrawal contract has been coded means that you HAVE to approve the transfer of ALL DAOs in your account, as the Withdrawal contract will only transfer ALL of your DAOs in the one go. If you do not approve all of your DAOs to be transferred, the withdraw() function will throw an error, consuming all the gas specified with the transaction.
  2. If a legitimate split from The DAO has been executed, then the DAO balance has been moved to the child DAO and the DAO balance in The DAO is zeroed.

2-  For people that sent ether to the extraBalance and childDAO token holders

join the #child_dao_community at thedao.slack.com and contact contact @griff to provide details of your split including:

  1. Split DAO's you joined (proposal numbers).
  2. Address of your childDAO
  3. Addresses that you used to split.
  4. How many DAO tokens each address burned.
  5. Best way to contact you :slightly_smiling_face:
  6. Any other relevant info that will help (did you send ETH as a proposal deposit? Is there one address you want all of the ETH to be sent to?)

Fund withdrawal


Method 1 - MyEtherWallet

  1. Go to http://www.myetherwallet.com/#the-dao

  2. Upload / Paste your Keystore file / Private Key to access your wallet.

  3. Press big red button.

  4. Confirm that you are sure you want to withdraw.

  5. Wait a couple seconds and 2 transaction links will appear. Wait about 30 more seconds and check the balance of your account on Etherscan. You should have more ETH and 0 DAO.

Method 2 - Ethereum Wallet

1- Watch the DAO contract

  1. Make sure that you have downloaded Ethereum Wallet 0.8.1 or later.
  2. The first time you start Ethereum Wallet 0.8.1, select "Yes" to the question "Do you want to activate the chain in which funds linked to the exploit are restored to a contract where they can be withdrawn by The DAO token holders?". You have now made the choice to use the hard-forked Ethereum chain.
  3. add and watch the DAO contract. Use the same procedure as described in the link, but set:

 

If Ethereum Wallet is freezing, see UPDATE 23/07/2016 in How to remove The DAO contract from Ethereum Wallet (Mist) watch list as it is freezing?.

2- Approve the transfer of your DAOs to the withdrawal contract

  1. Get the account address from which you want to convert your DAOs into ETHs

  2. Get the balance of the account from which you want to convert your DAOs into ETHs

  3. Approve the transfer of your account's DAO balance to the Withdrawal contract address

3- Execute the withdrawal contract function

  1. Withdraw ETH from the Withdrawal contract

Method 3 - geth

Below is the code to run:

geth --support-dao-fork --unlock {your account} console
...
Unlocking account {your account}
Passhrase: {enter your passphrase}
// Allow your blockchain to sync

> var account = "{your account}";
undefined

> var theDAOAddress = "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413";
undefined

> var theDAOWithdrawalAddress = "0xbf4ed7b27f1d666546e30d74d50d173d20bca754";
undefined

> var theDAOABIFragment = [{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"type":"function"}, {"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"type":"function"}];
undefined

> var theDAO = web3.eth.contract(theDAOABIFragment).at(theDAOAddress);
undefined

> var approve = theDAO.approve(theDAOWithdrawalAddress, theDAO.balanceOf(account), {from: account});
undefined

> eth.getTransaction(approve);
// Repeat the command above until you see that blockNumber is not null

// Wait a few blocks (~ 15 seconds each) for your approve transaction to get mined

> var theDAOWithdrawalABIFragment = [{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"type":"function"}];
undefined

> var theDAOWithdrawal = web3.eth.contract(theDAOWithdrawalABIFragment).at(theDAOWithdrawalAddress);
undefined

> var withdrawal = theDAOWithdrawal.withdraw({from: account});
undefined

> eth.getTransaction(withdrawal);
// Repeat the command above until you see that blockNumber is not null

 

Method 4 -  Mist Browser

  1. Install and start mist browser.
  2. The first time you start Ethereum, select "Yes" to the question "Do you want to activate the chain in which funds linked to the exploit are restored to a contract where they can be withdrawn by The DAO token holders?". You have now made the choice to use the hard-forked Ethereum chain. Exit from Ethereum Wallet.
  3. Make sure you've selected only the account which you used to purchase "The DAO" tokens.
  4. In Mist browse to https://slacknation.github.io/medium/12/12.html
  5. Click on "Approve", wait for one block
  6. Click on "Refund", wait for one block

 

See also