Cover Image for Token Sales Anatomy

Token Sales Anatomy

Blockchain
Research

The question of how much money worth one or other cryptocurrency, arises in different aspects. One way to answer is to estimate the amount of money people initially invested in cryptocurrency during the ICO. In some cases, this amount can be validated just by blockchain data, in other cases it cant. Let’s dig deeper into how ICO mechanic works and how it can be analyzed post factum based on the trusted data source — blockchain itself.

Initial Token Offering

When you issue your own token on blockchain, or plan to create own crypto coin, a big question appears, of how to distribute it first. If you just own it alone, there is no much value in such a token. There are a number of opportunities, and the new projects select from options:

  1. Issue the tokens and sell them to others during Initial token (coin) offering in ITO / ICO process. This is basically an initial exchange between your brand new token and some existing asset, typically existing cryptocurrency;
  2. Distribute token to people, that most need it, and may give it some value by generating demand and supply. An interesting scenario is when the token gets the value straight from the fact that some community owns it.

This investigation mostly concern the first case. Sometimes the cases mixed, with some tokens are sold and another part is distributed.

Successful ICO creates a big boost for the project, as it supplies the initial investment, and simultaneously generates the audience and community of supporters around the project.

Also Read: Do not be Fooled by Crypto Quiz Games!

Basic ICO Mechanics

So how it actually happens? In a decentralized world, there is no central authority, which sells tokens and ensures the correctness of conditions. Instead, there is a smart contract, provisioning the token sales.The simple example of how it actually works is shown on the diagram_:_

Basic ICO Mechanics

Source: bloxy.info

StatusCrowdsale smart contract doing here all the job of selling token to the buyer, exchanging 7 ETH to 70K SNT tokens. The tokens are ‘minted’, similar to the cryptocurrency mining process, from the system (zero) address in the system. Though the smart contract for token sale can be quite complex, , the easy lines of code ensures this process:

// calculate how much token to give, based on exchange rate and
// amount of ETH transfered ( contained in _toFund variable )
uint256 tokensGenerated = _toFund.mul(exchangeRate);// create ( mint ) new tokens
assert(SNT.generateTokens(_th, tokensGenerated));// how tokens are generated
function generateTokens(address _owner, uint _amount
) onlyController returns (bool) {
...
// Update balances and generate event on transfer tokens from system // (zero) address to token buyer updateValueAtNow(balances[_owner], previousBalanceTo + _amount);
Transfer(0, _owner, _amount);

}

If we even do not know the smart contract source code or logic, we still have a knowledge based on the transaction diagram above, which is built completely from the on-chain data:

  1. Smart contract exchanged ETH to SNT token in one transaction
  2. The same address (token buyer) sent ETH and got SNT token
  3. SNT token originated from zero system address, which in common means it was minted

Take a look at another transaction for the same smart contract, happened later:

transaction

Source: bloxy.info

Apparently, now the crowd sale smart contract rules did not allow to accept the ETH sent for token sale, probably because of hard cap approached. However, the ETH were accepted and sent back to the sender. An important conclusion is that you cant rely on ETH amounts, sent to contracts, or other addresses, as the base for the ICO funds collected.

Also Read: FairWin Scam Smart Contract Coinpath Investigation

There are variations of the scheme, where tokens are pre-mined and sent from a “token wallet”. First, the token wallet receives of the total amount of tokens:

token wallet

Source: bloxy.info

and after sending token from this wallet (0x778…):

token

Source: bloxy.info

Variation of this scheme is when token is sent from the same address, as ETH is transferred to:

scheme

Source: bloxy.info

… or ETH sent directly to the token contract, as in this example:

token contract

Source: bloxy.info

Transaction-Based Analysis

Knowing the structure of the ICO transaction, we now can extract the data from the blockchain data. We are selecting the transactions from the blockchain following the criteria:

  1. Token buyer initiates the transaction with a smart contract
  2. Smart contract sends token back to the token buyer in exchange to ETH

There are additional rules, required to filter out some other cases, similar to the ICO, but they are not:

  1. no other currencies involved
  2. no DEX ( decentralized exchanges) smart contracts involved
  3. tokens sender did not receive tokens in exchange to ETH

The last point here requires some explanation. As we are blindly looking at blockchain transactions, sometimes is very hard to classify, if the token sales is initial or not.

Secondary Token Sales

Look this example, which is extremely similar to an ICO transaction, except that it is actually not:

Secondary Token Sales

Source: bloxy.info

The only difference between ICO transaction for GNT token lies outside this transaction. Tokens, that are traded by this smart contracts, are on secondary market, they already were bought in ICO process, and now traded again. Somebody created a smart contract to automate this process.

The only way to filter out these transactions from calculating token sales values is to track the source of tokens, being sold in this transaction. To do that, we have to analyze the graph of token transfers, which preceded this transaction:

graph

Source: bloxy.info

As you clearly see from this diagram, GNT tokens were initially bought on ICO for 11,5k ETH by address 0xaaad.. , transferred to the smart contract of interest, creating own trade, ultimately gaining 16.5k ETH from this secondary sale. Not a bad business!

Which Scheme is More Popular?

Now when we see the most common schemes, we can take statistics over the whole blockchain and summarize the transactions of each one. The resulting shows the number of ICOs and corresponding ETH amounts by years:

Scheme

The leader in popularity is “No minting”, “separate token sale contract”. The least popular combination is token smart contract, accepting ETH, with minting.

Money Now, Tokens Later

ICO Smart contract can accept ETH, register the amount of tokens due to transfer to the buyer, and distribute them later. Example of this mechanics is shown below:

Money Now, Tokens Later

Source: bloxy.info

Smart contract actually does not transfer any tokens on the contract, just updating the due balances and fire an event:

// update circulating supply & the ledger address for the customer
tokenBalanceLedger_[msg.sender] = SafeMath.add(tokenBalanceLedger_[msg.sender], _amountOfTokens);

// Tells the contract that the buyer doesn't deserve dividends for the tokens before they owned them;
//really i know you think you do but you don't
int256 updatedPayouts = (int256) ((profitPerShare * _amountOfTokens) - fee);
payoutsTo
[msg.sender] += _updatedPayouts;

// fire event
onTokenPurchase(msg.sender, _incomingEthereum, _amountOfTokens, _referredBy);

Source: etherscan

This type of ICO contracts typically is a part of token contract. Otherwise it would be hard to bind the separate contract to the token distribution in a clear way.

To find the ICOs by this scheme, we have to find multiple ETH transfers to ERC20 tokens smart contracts.

The statistics of this kind of ICOs by years are:

statistics

Interesting, that by ICO count this type of mechanism is not as popular, as “in-transaction” sale, but by the collected ETH amount it far exceeds. It can be explained by couple of the very large ICO: TheDAO in 2016 and EOS in 2017-2018, which used this scheme.

Money Now, Tokens Not Sure

The last in all senses way of doing ICO is taking money on some wallet, with manual token distribution later.

People sending ETH (or other crypto currency) to some designated address, as in this example:

Money Now, Tokens Not Sure

Source: bloxy.info

There is no relation in the blockchain between the future distribution of tokens with the collection of ETH on this address.

Conclusions

  1. It is possible to identify transactions, related to initial token sales (ICO) just looking in the blockchain data;
  2. Most of ICOs follow the scheme, where tokens are distributed automatically by the separate “token sale” smart contract, in the same transaction as ETH payment;
  3. There are multiple variations of the scheme, where tokens are distributed by minting or by transferring pre-minted tokens, in the same, or separate transaction on blockchain.
  4. There are ICOs where the amount, in full or partially, may not be derived from the blockchain data. Most of them do not really use the decentralized nature of the blockchain and can be executed on any other payment mechanism.

Subscribe to our newsletter

Subscribe and never miss any updates related to our APIs, new developments & latest news etc. Our newsletter is sent once a week on Monday.