ICO or Initial Coin Offering is a new way for startups to raise funds for development. Recently more of these ICO are done on the Ethereum network where ether is raised for funding and in return participants receive a standard token that can be transferred and represents ownership of something that is specified in the token’s whitepaper. You can see an example here of BAT token. The corresponding token is a smart contract on Ethereum. As this is the first time a price is linked to the token, it could be the cheapest way to obtain the tokens even though historically most tokens has not performed well against ether. The interesting part is that many ICO sell out pretty quickly, raising millions of dollars in minutes. The Ethereum network often gets congested during those times and some will miss out getting their tokens if they sent it too late, with too low a fee or with wrong parameters.

gasPrice is the most important parameter

If your transaction is correctly formed, gasPrice in general will determine how fast your transaction gets included in a block by miners even though miners can include any transaction they want in any order. This is often confused with gas . gas is the maximum amount of computation resource you are willing to use for the transaction. gasPrice is the price you pay for the amount of computation resource used.

transaction fee = gas x gasPrice

If your transaction only requires 60,000 gas , specifying 200,000 or 300,000 gas should have negligible differences but specifying 20 or 200 shannon gasPrice can make a difference on how fast your transaction will be mined.

How much gasPrice is good enough?

Here we take a look at BAT ICO which raised USD 35 million in 2.5 blocks or 24 seconds. There was so much anticipation that even popular chain explorer etherscan.io crashed for a while during the ICO.

First we look at the distribution of gasPrice for transactions that were heading for the ICO and got mined.

The y axis categorize the gasPrice and the x axis shows the blocks before and after the ICO. 1 on the x axis is the first block where exchange of ether for BAT tokens begins. Due to a maximum funding cap of 156,250 ether, only some of the transactions in block 3 were valid. All other transactions before or after the ICO are rejected. The bigger the circle, the more count of transactions in that gasPrice category and the darker the color the higher the value of the transactions. Interestingly relatively low gasPrice transactions were able to obtain BAT tokens.

Overview of funding in each block

Next we look at the gasPrice of all transactions that were mined on the network during this period.

The y axis this time is in log scale. The highest gasPrice was 580,000 shannon and the user paid 28.9 ether ($6,600) in transaction fees. Luckily he got in. As observed, the gasPrice starts to spike as the ICO starts and a huge percentage of all transactions were headed to the ICO. Although the ICO only lasted 3 blocks, many queued transactions destined to fail continued to be mined, elevating the gasPrice of the network.

Next we take a look at the timing of the transactions.

Higher resolution http://i.imgur.com/7RQgmGt.jpg

The left axis is the time our nodes first detected the transaction in the wild and on the right is the order the transaction is mined. As observed, high gasPrice transactions almost always get included in the immediate block and is placed at the top of the block.

Good timing and a reasonable gasPrice should have been sufficient to be accepted in this ICO.

One of our functions is building analytics on Ethereum,

Contact us at contact@codetract.io

Visit us at https://codetract.io

Follow us on Twitter and Medium for more updates!