If you’re new to all this cryptocurrency stuff, including smart contracts, ICOs, and TGEs (token generation events), check out our Guide to Blockchain Development to dip your toe in the water. If you find yourself wanting to learn more, look at the Ethereum Whitepaper.
If you already know what Ethereum and smart contracts are, but still have some points to clarify, then read on.
How does one make smart contracts and avoid mistakes? VironIT has experience in writing, testing, and deploying Ethereum smart contracts and its web interface. Over time we have collected questions and answers about smart contract development, so let’s dive right in!
I need pre-ICO and ICO. Should I have 1 or 2 contracts?
If the period between pre-ICO and ICO is short, it is more convenient to create a single smart contract for both pre-ICO and ICO.
If it takes more than a few months, then chances are everything will change considerably, to the point where you will have to create a new smart contract for the ICO phase.
Then the security issue must be considered. Two simple contracts are likely to be more robust than a large and complex one.
For example, project Hackspace Capital raised 18 000 ETH in September using one smart contract, and it worked perfectly for them. Here is a video of an Ethereum Wallet our company recently finished for them.
Ethereum’s smart contracts are not easy to develop and are even more difficult to run and test, and the cost of failure is high.
How to update a deployed smart contract
Please note, Ethereum contracts are immutable. Once deployed to the blockchain, they cannot be updated. The only way to change the code is by destroying it altogether by the SELFDESTRUCT opcode (selfdestruct) (in solidity) and deploy everything again. Imagine how painful this could be having hundreds of backers already. You would have to mint all the tokens again, which may have a devastating impact on your online reputation and the whole ICO’s success.
How to write upgradable contracts in Solidity
To write an upgradable smart contract, you have to connect third-party libraries. However, using such contracts compromises security. This can be seen in the case with Parity, when about $150 million was locked in smart contracts delivered before 20 June 2017.
Some valuable functions to include in your Smart Contract
pause/unpause – to put on hold or resume token operations
setRate – to change token cost
mint – to charge tokens to the right address manually (for example, if you receive payment via bank transfer or in some other way)
changeOwner – to replace a contract holder
changeWallet – to replace an active wallet to receive tokens from a fallback function
How much can I raise? What are HardCap and SoftCap limits?
ICO is a limited time fundraising campaign. There are several variables that describe limits and time frames; these terms are hard cap, soft cap, and total supply.
Soft Cap is the minimum amount of funds required for the ICO to be considered successful.
Hard Cap is the maximum amount of funds raised. For example, if terms haven’t yet been reached, but the hard cap is already assembled, the company stops fundraising and project development starts.
Total supply is the total number of coins or tokens that are in existence, including those circulating in the public market and those that are locked or reserved.
Please consider the following points:
- What will happen with the unsold tokens at the stages of pre-ICO and ICO?
- What will happen if the soft cap is not achieved? How will they be refunded?
- Is it possible to issue additional tokens and, if so, on what conditions?
Should I limit token transfer?
Yes, you should. Please consider the following points:
- What is the amount of issued and mined tokens?
- Is there a limit on the release, as determined by the initial price of the tokens?
Be aware that a big player can derail the rate of your tokens on the stock exchange, buy them for next to nothing, and then resell them when the rate rebounds, so, it’s necessary to restrict the transfer of tokens in the pre-ICO / ICO and after the ICO period. But this will not resolve all the problems if you don’t make a right KYC, the process in which a business identifies and verifies the identity of its clients.
You should come up with a clear plan for the distribution of tokens, such as:
- 20% reserved for founders
- 15% for the purchase of data from data providers
- 60% goes on sale
- 2% for the Advisory Board
- 3% for the Bounty Program
Consider whether the distribution should be automatic or manual.
How to determine the start and end dates of pre-ICO/ICO
We advise you to avoid a fixed date for the start/finish in the smart contract. *hit happens and schedules shift.
That is why it is better to have manual control over the start and end of these events:
- Start pre-ICO / Stop pre-ICO
- Start ICO / Stop ICO
What’s the difference between utility and security tokens?
There are two types of tokens, utility tokens and security tokens.
Utility tokens drive the entire system. They allow one to develop features for the distributed ledger, access, and interaction with the system. They offer a vote in a meaningful way for free information and the possibility of exchanging opinions among token holders.
Security tokens represent a monetary investment in a startup, a share of profits, losses, assets, or liabilities. They offer status as an equity holder, creditor, or lender. Security tokens involve an expectation of profits consisting of dividends, periodic payments, and investment value. Profits are to be derived from the entrepreneurial or managerial efforts of others. Voting rights of the token holders don’t offer meaningful control over the startup.
For example, ICO Head Start uses utility token with a buyback program.
Before working on contracts, you should consider their structure and regulation.
During contract development, you need to remember not only the typical techniques and programming issues, but also about the specifics of the blockchain. A thorough automated testing, auditing of contracts, as well as their code verification are all helpful and necessary to prevent errors from creeping into the contracts. Finish the development stage no later than 7 days before launch to give yourself enough time to ensure the code is faultless.
Whether you are a start-up or business seeking the help of an expert ICO advisor, VironIT will provide you with the means you need to take advantage of the crypto market.
Let us know if this article helped you or if you have any doubts. Please leave comments below if you have any questions.