|
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.
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.
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.
withdraw()
function will throw an error, consuming all the gas specified with the transaction.join the #child_dao_community at thedao.slack.com and contact contact @griff
to provide details of your split including:
Upload / Paste your Keystore file / Private Key to access your wallet.
Press big red button.
Confirm that you are sure you want to withdraw.
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.
The DAO Withdrawal
0xbf4ed7b27f1d666546e30d74d50d173d20bca754
[{"constant":false,"inputs":[],"name":"trusteeWithdraw","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"mainDAO","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[],"name":"trustee","outputs":[{"name":"","type":"address"}],"type":"function"}]
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?. |
Get the account address from which you want to convert your DAOs into ETHs
Get the balance of the account from which you want to convert your DAOs into ETHs
Approve the transfer of your account's DAO balance to the Withdrawal contract address
0xbf4ed7b27f1d666546e30d74d50d173d20bca754
in the spender-address field.Withdraw ETH from the Withdrawal contract
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 |