我如何獲得超過 1 乙太幣到 100 The DAO 代幣的退款
在 The DAO 眾籌階段的最後兩週購買 DAO 的任何人每 100 個 The DAO 代幣(DAO)支付超過 1 個乙太幣(ETH)。每 100 個 DAO 超過 1 ETH 的 ETH 數量儲存在 The DAO 的extraBalance賬戶中。extraBalance 賬戶的餘額現已轉入管理員的多重簽名錢包。
如硬分叉後如何使用提款合約將我的 The DAO 代幣轉換為乙太幣中所述?, DAO 代幣持有者目前可以以 100 DAO = 1 ETH 的比率將其 DAO 轉換為 ETH。
如果我支付的金額超過 1 乙太幣到 100 The DAO 代幣,我該如何獲得退款?
DAO 退款
- 如何在硬分叉後使用提款合約將我的 The DAO 代幣轉換為乙太幣?
- $$ THIS $$ 我如何獲得超過 1 乙太幣到 100 The DAO 代幣的退款
- 我的 The DAO 代幣被拆分為子 DAO,如何獲得退款?
- 如何將我的 The DAO 代幣轉換為 Ethereum Classic 鏈上的乙太幣?
- 如何在硬分叉後有條件地將乙太幣發送到另一個帳戶以保護自己免受重放攻擊
也可以看看:
2017 年 3 月 29 日更新
最新說明可在The DAO Refunds中找到。
在硬分叉區塊 #1,920,000 中,來自 The DAO 及其子 DAO 的 ETH 餘額(包括來自 extraBalance 賬戶的餘額)被轉移到提款合約中。
在硬分叉之後,在第1,920,090塊,在此交易中呼叫了取款聯繫人的
trusteeWithdraw()
函式,將 463,798.08818109 ETH 轉移到TheDAOCurator 多重簽名錢包中。請參閱Griff Green 撰寫的The DAO 的 Edge Cases Multisig (Post Hard Fork)中的ExtraBalance部分,了解計劃中的退款流程。
您應該能夠在github.com/bokkypoobah/TheDAOData中找到您為 Extra Balance 帳戶做出貢獻的帳戶,並在哪些帳戶為 The DAO 的 extraBalance 帳戶做出貢獻?:
- 製表符分隔值格式:CreatedTokenEventsWithNonZeroExtraBalance_v4.txt
- Excel 格式:CreatedTokenEventsWithNonZeroExtraBalance_v4.xlsx。使用文件-> 另存為。然後從您的電腦打開。
筆記:
- 確保您有權訪問原始帳戶和密碼以解鎖該帳戶。
- 您在https://github.com/bokkypoobah/TheDAOData/blob/master/CreatedTokenEventsWithNonZeroExtraBalance_v4.xlsx電子表格中的 extraBalance 金額應該是正確的。
- 您可能希望在提取 ETH 後轉移它們。要防止在非硬分叉的 Ethereum Classic 鏈上重放您的 ETH 轉移交易,請參閱如何在硬分叉後有條件地將乙太幣發送到另一個帳戶以保護自己免受重放攻擊。
更新時間 2016 年 9 月 13 日 08:07 UTC
從將於 9 月 15 日資助的 ExtraBalance 提款合約開始,提款合約將於 2016 年 9 月 15 日由
Griff Green
策展人提供資金。然後,您將能夠使用下面列出的方法提取您的乙太幣。您將在這篇連結的文章中找到使用乙太坊錢包執行提款合約的更詳細指南(類似於下面的方法 2)。在嘗試執行提款之前,請檢查0x755cdba6AE4F479f7164792B318b2a06c759833B的 ETH 餘額是否非零。更新時間 2016 年 9 月 17 日 14:08 UTC
提款合約已被策展人充值 344,917.580854976758120496 ETH。您現在可以執行提款了!
以下是3種提取資金的方法:
- 方法 1 - MyEtherWallet
- 方法 2 - 乙太坊錢包
- 方法 3 -
geth
方法 1 - 使用 MyEtherWallet 提款
更新時間 2016 年 9 月 17 日 07:00 UTC從
@tayvano
:在嘗試提款之前,請通過檢查extraBalance 提款合約是否有餘額來確保資金已存入。由於我們要到 9 月 17 日晚上才能使用,所以我們已經推送了這個直播。謝謝你。
從https://www.myetherwallet.com/#the-dao執行 MyEtherWallet (請小心,因為網際網路上會出現具有類似 URL 的虛假 MyEtherWallet 網路釣魚站點,旨在竊取您的私鑰。)
方法 2 - 使用乙太坊錢包提款
更新 2016 年 9 月 8 日 05:22 UTC - ExtraBalWithdrawal 合約已升級 - 如果您已設置舊版本,請替換舊版本。另請注意,提款契約尚未履行。
2016 年9 月 9 日 UTC 更新06:04 - @ledgerwatch 創建了文件如何從 extraBalance 退款契約中退出,其中包括一些重放保護步驟。
確保您已下載Ethereum Wallet 0.8.1或更高版本。
第一次啟動乙太坊錢包 0.8.1 時,對問題“你想啟動與漏洞相關的資金恢復到可以由 The DAO 代幣持有者提取的契約的鏈嗎?”選擇“是”。 . 您現在已經選擇使用硬分叉的乙太坊鏈。
方法 2 - 步驟 1 - 觀察
ExtraBalToken
合約在乙太坊錢包中,選擇頂部菜單中的契約頁面。點擊觀看契約。
- 輸入契約名稱
ExtraBalToken
- 輸入契約地址
0x5c40ef6f527f4fba68368774e6130ce6515123f2
- 在 JSON INTERFACE 欄位中輸入以下文本:
[{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":false,"inputs":[],"name":"seal","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"data","type":"uint256[]"}],"name":"fill","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"sealed","outputs":[{"name":"","type":"bool"}],"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]
- 點擊確定。您的 Watch 合約應如下所示:
方法 2 - 步驟 2 - 觀察
ExtraBalWithdrawal
合約在乙太坊錢包中,選擇頂部菜單中的契約頁面。點擊觀看契約。
- 輸入契約名稱
ExtraBalWithdrawal
- 輸入契約地址
0x755cdba6ae4f479f7164792b318b2a06c759833b
- 在 JSON INTERFACE 欄位中輸入以下文本:
[{"constant":false,"inputs":[],"name":"clawback","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"}]
- 點擊確定。您的 Watch 合約應如下所示:
方法 2 - 步驟 3 - 執行
ExtraBalToken.Approve
這將批准將代幣從您的帳戶轉移到
ExtraBalWithdrawal
契約。確保您發送 0 個乙太幣,因為此交易可能會在 Ethereum Classic 鏈上重播。在頂部菜單中選擇契約頁面。點擊EXTRABALTOKEN。
在READ FROM CONTACT 下頁面左側的Balance of欄位中,輸入您的帳戶地址, ALL IN LOWERCASE。您的 wei 提款餘額應顯示在您的地址下方。
- 複製此餘額圖
在頁面右側的 WRITE TO CONTRACT 下
- 選擇功能Approve。
- 在spender中,輸入聯繫人
0x755cdba6ae4f479f7164792b318b2a06c759833b
的地址ExtraBalWithdrawal
。- 從頁面左側複製結果餘額中的值,並將該數字粘貼到****值欄位中。
- 在執行自中,選擇您的帳戶。
- 在 Send ETHER 欄位下輸入0作為 ETH 的數量。
- 點擊執行按鈕,輸入您的密碼並確認。
方法 2 - 步驟 4 - 執行
ExtraBalWithdrawal.Withdraw
— 暫時不要執行此指令。策展人未
extraBalWithdrawal
履行契約,執行將失敗。當您能夠執行此腳本時,將更新此文章 —這將從
ExtraBalWithdrawal
合約中提取 ETH 到您的賬戶。確保您發送 0 個乙太幣,因為此交易可能會在 Ethereum Classic 鏈上重播。在頂部菜單中選擇契約頁面。點擊EXTRABALWITHRAWAL。在頁面右側的 WRITE TO CONTRACT 下,選擇功能Withdraw。在執行自中,選擇您的帳戶。在 Send ETHER 欄位下輸入0作為 ETH 的數量。點擊執行按鈕,輸入您的密碼並確認。這是螢幕圖像:
方法 3 - 提款使用
geth
更新 2016 年 9 月 8 日 05:22 UTC - ExtraBalWithdrawal 合約已經升級,下面的程式碼已經過測試。
geth
請注意下面腳本中的新地址和 ABI 。確保您執行的是geth 版本 1.4.10或更高版本。並使用 執行你的 geth 命令,
--support-dao-fork option
以便你在硬分叉的區塊鏈上。— 暫時不要執行以下命令。策展人未
extraBalWithdrawal
履行契約,執行將失敗。當您能夠執行此腳本時,將更新此文章 —user@Kumquat:~$ geth --support-dao-fork console // Allow chain to sync var account = "{your account}".toLowerCase(); personal.unlockAccount(account, "{your account password}") var extraBalTokenAddress = "0x5c40ef6f527f4fba68368774e6130ce6515123f2"; var extraBalTokenABIFragment = [{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"type":"function"}, {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"type":"function"}]; var extraBalTokenContract = eth.contract(extraBalTokenABIFragment).at(extraBalTokenAddress); var extraBalWithdrawalAddress = "0x755cdba6ae4f479f7164792b318b2a06c759833b"; var extraBalWithdrawalABIFragment = [{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"type":"function"}]; var extraBalWithdrawalContract = eth.contract(extraBalWithdrawalABIFragment).at(extraBalWithdrawalAddress); var balance = extraBalTokenContract.balanceOf(account); console.log("Your extraBalTokenContract.balance() for " + account + " is " + web3.fromWei(balance, "ether") + " ethers"); // Approve the transfer of your tokens from the extraBalToken contract // to the extraBalWithdrawal contract var approve = extraBalTokenContract.approve(extraBalWithdrawalAddress, balance, {from: account, value: 0}); console.log("approve() returned " + approve); // Wait for approve() to be mined. Repeat checking using the following command until you get a non-null result. eth.getTransactionReceipt(approve).blockNumber; var withdraw = extraBalWithdrawalContract.withdraw({from: account, value: 0}); console.log("withdraw() returned " + withdraw); // Wait for withdraw() to be mined. Repeat checking using the following command until you get a non-null result. eth.getTransactionReceipt(withdraw).blockNumber; // Your withdrawal should now be complete. Check your account balance has received the withdrawal amount. web3.fromWei(eth.getBalance(account), "ether");
ExtraBalToken 合約
thedao.slack.com/messages/extrabal_community 中的@ledgerwatch將 ExtraBalToken 合約部署到0x5c40ef6f527f4fba68368774e6130ce6515123f2。
contract ExtraBalToken { uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; /* This generates a public event on the blockchain that will notify clients */ event Transfer(address indexed from, address indexed to, uint256 value); /* Send coins */ function transfer(address _to, uint256 _value) { if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows balanceOf[msg.sender] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place } /* Allow another contract to spend some tokens in your behalf */ function approve(address _spender, uint256 _value) returns (bool success) { allowance[msg.sender][_spender] = _value; return true; } /* A contract attempts to get the coins */ function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { if (balanceOf[_from] < _value) throw; // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows if (_value > allowance[_from][msg.sender]) throw; // Check allowance balanceOf[_from] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient allowance[_from][msg.sender] -= _value; Transfer(_from, _to, _value); return true; } /* This unnamed function is called whenever someone tries to send ether to it */ function () { throw; // Prevents accidental sending of ether } uint constant D160 = 0x10000000000000000000000000000000000000000; address public owner; function ExtraBalToken() { owner = msg.sender; } bool public sealed; // The 160 LSB is the address of the balance // The 96 MSB is the balance of that address. function fill(uint[] data) { if ((msg.sender != owner)||(sealed)) throw; for (uint i=0; i<data.length; i++) { address a = address( data[i] & (D160-1) ); uint amount = data[i] / D160; if (balanceOf[a] == 0) { // In case it's filled two times, it only increments once balanceOf[a] = amount; totalSupply += amount; } } } function seal() { if ((msg.sender != owner)||(sealed)) throw; sealed= true; } }
契約 ABI 為:
[{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":false,"inputs":[],"name":"seal","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"data","type":"uint256[]"}],"name":"fill","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"sealed","outputs":[{"name":"","type":"bool"}],"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]
.@ledgerwatch 然後
fill(...)
用類似於我的getTheDAOCreatedTokenEventsWithNonZeroExtraBalance_v4腳本的腳本生成的 extraBalance 值編輯 ExtraBalToken 合約。我的腳本的結果可以在CreatedTokenEventsWithNonZeroExtraBalance_v4.txt或CreatedTokenEventsWithNonZeroExtraBalance_v4.xlsx中找到。我已經測試了 ExtraBalToken 合約 - 請參閱 github.com/bokkypoobah/TheDAOData/ExtraBalTokenValuesReconciliation 上的對賬腳本和報告。
然後
seal()
在區塊#2,202,674中編輯了合約。
ExtraBalWithdrawal
契約更新 05:22 Sep 8 2016 UTC (在原始碼中
ExtraBalWithdrawal
)WithdrawDAO
已升級並部署到新地址。trusteeWithdraw(...)
已替換為clawback()
。@ledgerwatch 將升級後的合約部署到0x755cdba6ae4f479f7164792b318b2a06c759833b。
// Refund contract for extraBalance // Amounts to be paid are tokenized in another contract and allow using the same refund contract as for theDAO // Though it may be misleading, the names 'DAO', 'mainDAO' are kept here for the ease of code review 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(0x5c40ef6f527f4fba68368774e6130ce6515123f2); address constant public trustee = 0xda4a4626d3e16e094de3225a751aab7128e96526; function withdraw(){ uint balance = mainDAO.balanceOf(msg.sender); if (!mainDAO.transferFrom(msg.sender, this, balance) || !msg.sender.send(balance)) throw; } /** * Return funds back to the curator. */ function clawback() external { if (msg.sender != trustee) throw; if (!trustee.send(this.balance)) throw; } }
契約 ABI 為:
[{"constant":false,"inputs":[],"name":"clawback","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"}]
.注意此合約尚未添加乙太幣以供 The DAO 代幣持有者提取。
更多參考資料