Ether – Which Accounts Contributed to The DAO’s ExtraBalance Account?

etherthe-daothedao-refundtokens

Anyone who bought DAOs in the last two weeks of The DAO crowdfunding phase paid more than 1 ether (ETH) per 100 The DAO tokens (DAO). The ETH amount in excess of 1 ETH per 100 DAOs was stored in The DAO's extraBalance account. The balance of the extraBalance account has now been transferred into the curator's multisig wallet.

Accounts that contributed to the extraBalance account may be eligible for a refund for the portion in excess of the 1 ETH = 100 DAOs paid to purchase The DAO tokens.

How do I find out which accounts contributed to The DAO's extraBalance account?

See also:

Best Answer

Summary

You can find the list of accounts that contributed to the Extra Balance account in github.com/bokkypoobah/TheDAOData:

This has been reconciled against Arachnid's (@NickJohnson) extrabalance.json that will be used in the refunding process.

Arachnid's results have some small differences to the results in Etherscan (manual checking):

#          Arachnid     Etherscan   Difference
------ ------------  ------------ ------------
 1       0.52441835    0.49946081  -0.02495753
 2       0.72448254    0.49946081  -0.22502173
 3       0.56221045    0.23076923  -0.33144122
 4       0.74601404    0.13333333  -0.61268071
 5       0.00944670    0.00944670   0.00000000
 6       0.20000000    0.20000000   0.00000000
 7     124.16187229  124.49331351   0.33144122
 8       2.94313417    3.55581488   0.61268071
 9      11.85088003   11.88919432   0.03831430
10       0.43567698    0.25000000  -0.18567698
11      99.85263732  100.00000000   0.14736268
12       5.74702074    5.99700000   0.24997926
------ ------------  ------------ ------------
Total  247.75779361  247.75779361   0.00000000
------ ------------  ------------ ------------    

For details, see the github.com/bokkypoobah/TheDAOData/ExtraBalanceReconciliation.md report.

See How do I get a refund for the amount I paid in excess of 1 ether to 100 The DAO tokens if you want further information on the refund process.



Details

Click on extraBalance non-zero internal transaction to view the list of DAO purchase transactions that contributed to the extraBalance account.

  • Exclude the internal transaction at block #1848080 as this was the transfer of the extraBalance account balance into the main The DAO account.
  • The first The DAO token purchase contributing to the extraBalance account was on block #1,520,861 on May-15-2016 09:00:16 AM UTC.
  • The last The DAO token purchase contributing to the extraBalance account was on block #1,599,205 on May-28-2016 08:59:47 AM UTC.
  • Any The DAO token purchase between blocks #1,520,861 and #1,599,205 would have some contribution to the extraBalance account and would therefore be eligible for a refund of the excess over 1 ETH = 100 DAOs.
  • You can search for your account in the data files below. Only events created between blocks #1,520,861 and #1,599,205 contributed non-zero amounts to the extraBalance account. Also note that there are 25 transactions that were meant to contributed to the extraBalance account, but was an error due to an out-of-gas condition.



geth Script To Retrieve Created Token Events With Non-Zero Extra Balance Contribution

UPDATE 25 Jul 2016 - The v2 script below now takes into account the createTokenProxy() calls where the account sending the transaction can be different to the beneficial owner of the DAO tokens. Thanks @Nick Johnson for pointing out the difference between the createTokenProxy() and normal calls.

UPDATE 05 Aug 2016 - The v3 script below now takes into account Wallet Contracts and Out Of Gas errors.

From github.com/bokkypoobah/TheDAOData/getTheDAOCreatedTokenEventsWithNonZeroExtraBalance_v3:

#!/bin/sh

# ------------------------------------------------------------------------------
# Retrieve The DAO CreatedToken events with non-zero extraBalance amounts. 
# These events are from block 1520861 to 1599205 when the creation phase ended.
#
# Usage:
#   1. Download this script to getTheDAOCreatedTokenEventsWithNonZeroExtraBalance .
#   2. `chmod 700 getTheDAOCreatedTokenEventsWithNonZeroExtraBalance`
#   3. Run `geth console` in a window.
#   4. Then run this script `./getTheDAOCreatedTokenEventsWithNonZeroExtraBalance`
#      in a separate window.
#
# Enjoy. (c) BokkyPooBah 2016. The MIT licence.
# ------------------------------------------------------------------------------

geth attach << EOF | egrep "Header|Data"
var theDAOABIFragment = [{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"CreatedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Transfer","type":"event"}];
var theDAOAddress = "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413";

// Full non-zero extraBalance contributions
var theDAOStartingBlock = 1520861;
var theDAOEndingBlock = 1599205;

// Test
// var theDAOStartingBlock = 1520861;
// var theDAOEndingBlock = 1520861;

// Test - by proxy
// var theDAOStartingBlock = 1599204;
// var theDAOEndingBlock = 1599204;

// Test - directly
// var theDAOStartingBlock = 1521563;
// var theDAOEndingBlock = 1521563;

// Test - wallet contract
// var theDAOStartingBlock = 1547894;
// var theDAOEndingBlock = 1547895;

// Test - Out of gas
// var theDAOStartingBlock = 1594238;
// var theDAOEndingBlock = 1594240;


var theDAO = web3.eth.contract(theDAOABIFragment).at(theDAOAddress);
var theDAOCreatedTokenEvent = theDAO.CreatedToken({}, {fromBlock: theDAOStartingBlock, toBlock: theDAOEndingBlock});
console.log("Header\tFrom\tTokenOwner\tCreatedBy\tBlockNumber\tTxHash\tTimestamp\tGMTDateTime\tAmount\tTheDAOAmount\textraBalanceAmount\tTheDAOTokens\tGasUsed\tGasPrice\tCost\tNonce\tError");
theDAOCreatedTokenEvent.watch(function(error, result){
  var tx = eth.getTransaction(result.transactionHash);
  var txReceipt = eth.getTransactionReceipt(result.transactionHash);
  var gasUsed = txReceipt.gasUsed;
  var gasPrice = tx.gasPrice;
  var cost = gasUsed * gasPrice;
  var amount = tx.value;
  // console.log("Data amount: " + amount);
  var block = eth.getBlock(tx.blockNumber);
  var d = new Date(block.timestamp * 1000);

  var status = debug.traceTransaction(result.transactionHash);
  var extraBalanceAmount = 0;
  var tokenOwner = tx.from;
  var createdBy = "Owner";
  var error = "";
  status.structLogs.forEach(function(e) {
    if (e.op == "CALL") {
      var stack = e.stack;
      extraBalanceAmount = web3.toBigNumber("0x" + stack[stack.length-3]);
      // baac5300 = createTokenProxy(address) - https://www.4byte.directory/signatures/?bytes4_signature=0xbaac5300
      if (stack[0].substring(56) == "baac5300") {
        tokenOwner = "0x" + stack[2].substring(24);
        createdBy = "Proxy";
      } else if (stack[0].substring(56) == "b61d27f6") {
        amount = web3.toBigNumber("0x" + stack[stack.length-3]);
      } else if (stack[0].substring(56) == "00000966") {
        if (("0x" + stack[3].substring(24)) != tokenOwner) {
          tokenOwner = "0x" + stack[3].substring(24);
          createdBy = "Wallet Contract";
        }
      }
    }
    if (e.error.length > 0) {
      error = e.error;
    }
  });
  var theDAOAmount = amount - extraBalanceAmount;
  var theDAOTokens = theDAOAmount * 100;

  console.log("Data\t" + tx.from + "\t" + tokenOwner + "\t" + createdBy + "\t" + tx.blockNumber + "\t" + tx.hash + "\t" +
    block.timestamp + "\t" + d.toGMTString() + "\t" + web3.fromWei(amount, "ether") + "\t" + 
    web3.fromWei(theDAOAmount, "ether") + "\t" + web3.fromWei(extraBalanceAmount, "ether") + "\t" + 
    web3.fromWei(theDAOTokens, "ether") + "\t" + gasUsed + "\t" + gasPrice + "\t" +
    web3.fromWei(cost, "ether") + "\t" + tx.nonce + "\t" + error);
});

EOF    



Data Retrieved By geth - Created Token Events With Non-Zero Extra Balance Contribution

The sum of the amount flowing into the extraBalance account is 344,917.579923467 ETH. There is a small discrepancy of ~ 10 ETH in this amount compared to the amount withdrawn into The DAO of 344,907.73799008 ETH in this internal transaction on Jul-08-2016 03:41:06 PM GMT.

Here is the data from github.com/bokkypoobah/TheDAOData in:



Sample Data

Header  From    TokenOwner  CreatedBy   BlockNumber TxHash  Timestamp   GMTDateTime Amount  TheDAOAmount    extraBalanceAmount  TheDAOTokens    GasUsed GasPrice    Cost    Nonce   Error
Data    0x32be343b94f860124dc4fee278fdcbd38c102d88  0xbad9ab5fd55aff4a8aec47166e1a2894d68cc473  Proxy   1520861 0xb989cba5fad84d78e305909bf97605dc35b3cb6caf0e32a2009c3a2dda876003  1463302816  Sun, 15 May 2016 09:00:16 GMT   134 127.61904761904762  6.380952380952380953    12761.904761904761  83139   30000000000 0.00249417  64340   
Data    0x44d7bd707d831f1cb9ae9fd6d129d56d3040564b  0x44d7bd707d831f1cb9ae9fd6d129d56d3040564b  Owner   1520866 0xf34ead2d5b1886e1b428082ff621aa2145e0f77b001011d1db99b15d356a26bf  1463302856  Sun, 15 May 2016 09:00:56 GMT   40  38.095238095238095  1.904761904761904762    3809.5238095238096  80960   21000000000 0.00170016  0   
Data    0x7727b2afc5a6816452a455e65a6a7dd01d03af4b  0x7727b2afc5a6816452a455e65a6a7dd01d03af4b  Owner   1520866 0xafee9c83d41dd151b970f8241e27796db2aceaaace73bf1ecdc2dcc0f53a288f  1463302856  Sun, 15 May 2016 09:00:56 GMT   1   0.9523809523809523  0.04761904761904762 95.23809523809522   50960   20000000000 0.0010192   5   
Data    0x3c7b53f4fa75cd9499bd593c37d5b9872151058a  0x3c7b53f4fa75cd9499bd593c37d5b9872151058a  Owner   1520870 0xaeca3a70346d726ac77ad598cc5e819acb644317a0bf33c81d2b6c3c8acdcc1a  1463302917  Sun, 15 May 2016 09:01:57 GMT   110 104.76190476190476  5.238095238095238096    10476.190476190475  80960   21000000000 0.00170016  5   
Data    0xa8c8b89fd99a25b4a085dff3d967b47b10b37034  0xa8c8b89fd99a25b4a085dff3d967b47b10b37034  Owner   1520870 0xcc146aeea6d229dce6edd463c6d80fdd4e88af0a407ca6e9d72da31775eeb043  1463302917  Sun, 15 May 2016 09:01:57 GMT   0.01    0.009523809523809524    0.000476190476190477    0.9523809523809524  50960   20000000000 0.0010192   29