How to participate in the BAT (Basic Attention Token) ICO

ICO is the buzzword these days. Everyone's doing it, no one's sure what they'd do with the raised funds, usually in millions. Most of the ICOs are using Ethereum as their infrastructure to raise money. If you think buying Bitcoin or Ethereum is still hard, try to get into an ICO and buy some Tokens first hand. Some of the well known ICOs has been sold out within hours, if not minutes.

If you have some Ether you are one step closer to have the requirements to participate in an ICO. Some of the ICOs make it easy to enter, they just require you to send an Ethereum transaction from a wallet you control to the ICO smart contract and everything is done. You will receive your tokens on the sending address when the ICO is done. Some other partner with an exchange that does the ICO on their behalf, much easier to enter but contradicts the whole notion of decentralization. Some other, well, they are not that simple.

Even if you have bought tokens using any approach, holding tokens yourself and sending them around is still a challenge.
One great tool for token transactions is MyEtherWallet. It's an open source client side web application that you can use to manage your tokens.
Let's try to use it to enter BasicAttentionToken ICO.

What you need:

  • Some ethereums to buy tokens with
  • A will to do something big or lose some money
  • Fast reaction time (In case it's a popular ICO)

You need to import your Ethereum private key to MyEtherWallet, it can be done using any standard format. Also you can generate one on the MyEtherWallet if you hold your Ethers on an exchange, and withdraw to the generated address. Make sure you keep the backup in a safe place

After importing/unlocking your wallet, you'd see something like this:

Now let's see how BasicAttentionToken's ICO is implemented.

After accepting their terms and conditions, it shows some information about how to enter the ICO. It looks like there are using their own smart contract to collect the funds, which you can see here and the source code here.

What these mean:

  • BAToken (Mainnet): The main Ethereum smart contract address to send the transaction to.

  • Starting Block number: The block number when smart contract starts accepting funds. Any transaction before that block will get rejected and the funds (minus the gas) will be refunded to the sender

  • Function Signature: The data to show which function is being called, in this case it's createTokens()(src). This could have been replaced by a catch all payable function but anyways that is a minor technical decision, however a huge usability issue.

  • ABI Link: Application Binary Interface. This is a link to the ABI which defines the functionality of the smart contract. ABI is a JSON that defines how you can call a specific function within a smart contract, more like an API documentation for smart contracts if you will.

So let's try to put these information in use.
MyEtherWallet tries to communicate everything with its users, even when you input the BAToken smart contract address, it fills out all the required information and also shows you the starting time of the ICO, a great sample of good usability.

By Clicking on Generate Transaction, it generates the Raw transaction and signs it with your private key, ready to be broadcasted to the network.

With the knowledge that the ICO has not yet started, let's send the transaction and see what happens (like the other 239 transactions sent to the main address at the time of the writing).

So as expected, the transaction got rejected and we lost around $0.96 worth of ethereum, which goes to the miners. It's interesting to see there are transactions as big as 100 Ether ($22,469) which are being sent to the main address before ICO starts, which only can mean the lack of knowledge of the whales.

So there it is. you have all the tools needed to enter any ICO. let's hope you can get in the next big ICO.

Factoid: While looking at the ICO contract I noticed an interesting transaction. This is a transaction for 123.9103722399996 Ether ($27,765.84) which spent 8.4000000000004 Ether ($1,882.27) as gas. Cheers to all the miners.