Scanning ICO contracts on Etherscan

September 22, 2017

When you see announcments like Monaco ICO final stats: 71,392 ETH raised (~US$25m), 8752 investors, average price paid per MCO: US$2.88, MCO created: 9,476,400  or The Bancor TGE attracted 10,885 buyers with more than 15,000 transactions sent to the address for purchases during the event  do you ever wonder where the numbers come from? Do you ever wonder how you could cross check these numbers if you had a spare 5 mins in your day?

I did and here is how.

Because money is being poured into smart contracts in the form of ether to the Ethereum network, you need to grab the Ethereum blockchain in order to query or inspect it. Online service such as Etherscan are great as well. In fact, I’ll be using Etherscan in my examples here.

The first step is to find the ICO smart contract address. Etherscan provides an easy way to search for a particular ICO. The tricky part is that the initial ICO contract address might not be readily apparent. It takes a bit of digging around. For example the Monaco ICO deposit contract address is 0xacE62F87aBE9F4eE9fd6E115D91548DF24ca0943. For Bancor, it’s 0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c

Once you have the contract address, in the case of Monaco you should see 15812 transactions. You’ll also see the value of ether being contributed in the “from” column.

If you add up all the ether contribution it should give you the total amount the ICO raised. There’s a download CSV link at the bottom but this only downloads a max of 2000 transactions. When you click “View All” you get 317 pages and there is no download link.


APIs to the rescue!

Etherscan has a API that allows you to get the data programmatically. The query you want to make is:<put_transaction_address_here>

Once you run this query, use your favourite programming language to parse it, typically via json, and then sum up the total ether.

Where ever you see a red exclamation mark, you’ll have to filter the results out with:

if ($value['isError'] == 1) {
do something here;

I ran this on the Monaco ICO and got: 71,360 ETH which isn’t too far from 71,392 ETH reported.

I got 11,698 transactions from the API. If I take out the duplicates I get 8743 which again isn’t far off “8752 investors”. I’ve probably missed a few investors via “pagination”.

To take this to the next level, you can”follow the money” and start building a picture and start watching the funds.

So there you have it. A bit of scripting + querying the ethereum blockchain and you should be able to verify for yourself the amount raised.

Leave a Comment!

Your email address will not be published. Required fields are marked *