During the last year, many cryptocurrency and blockchain adepts with a business idea and sufficient funds have been launching Initial Coin Offering – ICO. Eventually, in quite short spans of time, finances for further development of the concept were raised all over the world. For instance, Ethereum-based project Status, during its ICO period, raised around $108 million in investments for development of a decentralized application similar to Telegram. This is one of the many examples of successful ICO implementation. From the look of it, the following couple of years will see a rapid increase of a number of investors, which means that properly prepared token sales would bring not only business development funds but also a considerable share of profit.

In order to launch an ICO, you’ll have to create an app that would accept investors’ cryptocurrency and, once the sufficient funds are raised, distribute it among them in the form of your company’s tokens.

In this post, we won’t be discussing in detail a process of preparation for an ICO (and, for example, mention that you’ll have to gather a team of variously skilled experts, analyze the market, formulate a good whitepaper, provide active participants of your official communities and forum threads with bounties, etc.). Its focus is explaining how to launch an ICO on Ethereum – a platform that employs a standardized token generation protocol ERC-20, and which technical tasks you’re going to have to face in the process.

Why Ethereum?

As opposed to Bitcoin, Ethereum is based on a language that is fully based on a Turing system. Thus, the platform uses abstraction mechanisms. Without getting into theory, we can say that this allows for the acceleration of transactional processes by using physical and time resources of Ethereum Virtual Machine (Bitcoin doesn’t feature a virtual machine); not by increasing commissions, as practiced in Bitcoin-based solutions.

We hope this explains to you a bit why it is worth choosing Ethereum for an ICO. Now then, let’s find out how to do an ICO on Ethereum and, particularly, focus on the smart contracts creation procedure.

Composing smart contracts

A composition of an economic model based on a smart contract is a crucial stage of the discussed process. Its proper implementation can practically guarantee the overall success of an ICO. That’s why you must define all the terms of the agreement of such a contract beforehand. Then, thoroughly test them out in the deployment environment. Do not post a code on GitHub until tests for each term are conducted. Be prepared to answer a potential investor’s questions like what a certain block of the code means.

Questionable code constructions can include the following:

Above the norm token generation. An investor would consider your code unreliable if your programmers made it so that it implies generation of an unlimited number of tokens. If your smart contract has such a feature, make sure to mention that in the whitepaper. Otherwise, those investors that personally detect it in an open code would hardly consider your ICO trustworthy and transparent.

Involvement of only one computer in the blockchain. Your smart contract isn’t reliable if it provides an ability to implement transactions without multisignature. Suppose you are an investor and you decide to invest 1 thousand c.u. in tokens. Then, suddenly, you find out that the platform on which an ICO was launched uses a one, single computer for conversions confirmation. Even if you’re 100% confident in the integrity of a beneficiary, there are no guarantees that their computer won’t be accessed by hackers. That’s exactly why you have to cover an ability to implement transactions ONLY (!) with the involvement of a multisignature during the stage of a smart contract composition.

An absence of an open code on GitHub. Everything related to smart contracts for ICO must have a public access. And such an access must not be organized “in five minutes before the ICO launch” but at least 2-3 days in advance (ideally, a month in advance). A code must be fully packaged and non-customizable. Otherwise, any customizations can undermine investors’ trust. In order to minimize the need to correct smart contracts in any way, turn to experts that would thoroughly analyze and test them.

In such a manner, even if you’re not a programmer yourself but a business owner just starting out that decided to hire a separate team of developers to launch an ICO on Ethereum, you’ll have to know what you’re posting on GitHub. That way you’ll be able to assess the work done from an investor’s perspective and indicate flaws before an ICO launch.

Adherence to ERC-20 standard

In order for your smart contracts to comply with an ERC20 standard, you’ll have to make sure that they include the following list of methods, events, and lines:

function totalSupply(), which returns a total number of generated tokens;

function balanceOF(address _owner), which returns a number of tokens bought by an address;

function transfer(address _to, uint256 _value), which transfers a set number of tokens to an address _to;

function transferFrom(address _from, address _to, uint256 _value), which allows for debiting of funds that don’t exceed the value:

function allowance(address _owner, address _spender), which indicates a maximum allowable amount of funds for debiting from the user account;

event Transfer(address indexed _from, address indexed _to, uint256 _value), which must be involved in each transaction;

event Approval(address indexed _owner, address indexed _spender, uint256 _value), which appears on confirmation of allowance for debiting tokens;

string public constant name, which stores the token’s name;

string public constant symbol, which stores a symbol that would define your token;

uint8 public constant decimals, which represents a number of symbols following the decimal point (usually, it equals 18).

Smart contracts deployment

Suppose, the code defining a smart contract is successfully placed on GitHub and now, you’ll have to commence its deployment on the web.

If you figured out the basics of ICO at least superficially, then you surely know that every ICO consists of two contracts: token contract and crowdsale contract. We’ll try to briefly describe the specifics of each.

Let’s start with figuring out how the token contracts are implemented in practice. We recommend not to reinvent the wheel and only slightly customize existing token templates defined in OpenZeppelin library for Ethereum (factually, they are all ready for the MVP creation without any adjustments whatsoever).

All in all, the things you’ll have to put down in the contract manually would consist of approximately as much code as follows:

Now, let’s figure out by which principle the crowdsale contracts work. In fact, it’s all pretty simple. A certain amount of funds converted into the ether is being sent to a certain address of a user. Then, this ether is converted into tokens and is sent back. This data is fixated in one of the blockchain segments and, thus, the transaction is confirmed via the digital signature.

To finish everything up, you’ll have to include a special script in the code that would once in a predefined interval of time search blockchain for the transaction that features the above-defined addresses. Once it’s detected, the script would launch a token.mint(msg.sender, msg.value) function and, simultaneously, implement the process of token transfer to a defined user account. Down below, you can see a particular case of the crowdsale contract implementation.

Read also: How to Develop a Cryptocurrency Exchange Platform

Conclusion

As you can see, ICO is one of the most profitable and efficient crowdfunding approaches. Releasing tokens for sale, not only do you get investments for your business development but also automatically attract real customers to your products and services.

As to the technical aspect of the ICO, the Ethereum platform is perfect for its implementation as it was initially created for application execution, as opposed to Bitcoin (which was initially intended to be a currency for reliable decentralized transactions). If you decided to launch token sales but haven’t gathered a team of experts as of yet, let us help you! We specialize in blockchain construction and possess a colossal smart contracts development experience. Additionally, we’re ready to take care of all the processes related to ICO preparation from start to finish (including the processes dedicated to marketing and economic aspects of the discussed affair). Employ our service and you will get a properly functioning project that would definitely bring the desired profit.