This essay focuses on some recent adoptions becoming popular in the blockchain community while writing smart contracts for ICOs. It skips basic recommendations like ERC20 and enlist some essential features for ICO smart contracts.In use in many successful ICOs they should result in a higher probability to succeed. However I would advise you to only adopt features which are essential to your ICO. As more logic can be used in smart contracts to implement more security features like timeouts, spending limits, multisig, vaults etc. Although, the more logic in the smart contract the bigger the attack surface and the more likely that bugs are introduced that risk undermining the security features.Notice that this article is not describing the features your ICO tokens should have to provide a utility value to your Contributors.
1. Capped Contracts
Min cap (also known as Soft cap) is the minimum financial goal of a crowdsale. In Layman’s terms, it’s the minimum amount at startup, which is deemed sufficient to carry on with a project.Max cap (also known as Hard cap) is the maximum desired financial goal from an ICO. It’s the amount that the project needs to develop or improve their product. The team usually believes this amount will cover the successful development of the project until the moment it becomes profitable.Still most projects set a very high cap that is unlikely to be achieved. Only a few famous projects like Status or Brave browser successfully reached their hard cap. You can find a list of complete/uncomplete ICOs on ICOdrops.Soft cap is the minimal amount required by your project, to make it viable, in order to continue. If you do not reach that amount during your ICO then you should allow your investors to refund their money using a push/ pull mechanism.
2. Mintable Tokens
In real world, a mint is an industrial facility to manufacture coins that can be used as currency.In the world of cryptocurrency too, It is often necessary to mint new tokens during crowd sales. Consider the case when the number of tokens issued at the beginning of crowdsale have been completely consumed and you still have investors coming in for your crowd sale, you need to mint tokens now. The standard ERC20 token does not cover this functionality and we need to implement it separately.
3. Multisig Contracts
Multisig means that multiple signatures are required as opposed to a single signature. Multiple signatures are important for organizations to check misuse of authority. This is powerful because you can normally decide on the number of total signatures that can sign a transaction for a given account and then decide how many should be in the subset of those signatures that have to sign before a transaction is accepted. This is also known as m-of-n, where m could be say 3, the number of signatures that are required to send before the transaction is even accepted, and n could be 7, the total number of signatures that can sign if they wish. The signatures in n must be predetermined at the time of the multisig account creation, and m will always be a subset of n.Consider the following scenario:Suppose I am working with a company that wants to accept Bitcoin for international trades. The company, for security reasons, would not want a single one of its employees to have access to the company BTC wallet’s password. Any transaction would have to meet the approval of more than one employee.It is also useful in scenarios where one of the multig owners loses his private key of the wallet. Another term, N-1 is also a common term in multisig. N-1 is the same as 6 of 7 signatures incase n is 7. N-1 just means that m is always less than n by one. There is normally a deadline for all signatories to sign as well and if enough sigs aren’t present and the deadline is reached, the transaction will not be broadcasted.
4. Finalizable Contracts
Finalizable contract is derived from Open-Zeppelin, it allows owners to add logic of extra work once the crowdsale is finished. It is always used once the crowdsale is finished to add some extra finalization work to the contract. It has an internal finalization function which can be overridden to add finalization logic. The overriding function should call super.finalization() to ensure the chain of finalization is executed entirely.
5. Upgradable Contracts
Upgradable contracts are divided into two types of contracts- Upgrade Agent and Upgrade Token.Upgrade Agent contract is inspired by Lunyr. It transfers tokens to a new contract. Upgrade agent itself can be the token contract or a middleman contract doing the heavy lifting.While Upgrade Token contract provides a token upgrade mechanism where the users can opt-in amount of tokens to the next smart contract revision. It follows the following upgrade states:
- NotAllowed: The child contract has not reached a condition where the upgrade can begin.
- WaitingForAgent: Token allows upgrade, but we don’t have a new agent yet.
- ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet.
- Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens.
6. Refundable Contracts
In case the soft cap decided at the beginning of your crowdsale is not reached, you need to refund your investor's money. Open-zeppelin does it by creating a refund vault, which stores money while the crowdsale is in progress. It refunds money if the crowdsale fails, otherwise forwards it if successful.This is done using a pull mechanism, while keeping the Re-Entrancy problem into consideration to avoid attacks from malicious contracts/users.
7. Burnable Tokens/Freezing Tokens
After a crowdsale ends, what should happen to the remaining unsold tokens? You can use them as a rewarding mechanism, profiting to your reliable customers or you can burn them, which can eventually lead to an increase in overall value of your tokens.Another popular option these days is freezing them. It is similar to keeping them untouched for a particular interval of time This is useful in case you want to have multiple funding rounds.For instance you can sell 25% of your tokens now, raising money and then a year later have a 2nd crowdfunding round at higher token rates after your idea's success. Gnosis, a Gibraltar-registered company had a successful ICO with the same strategy.
8. Time Vault Contracts
This contract helps establish time limits, before which a user won’t be able to withdraw his tokens. It is useful to stop vindictive investors to take their investment back before a crowdsale ends. Although mostly it is used to keep a check on owners of the crowdsale, stoping them to run away with their investors money. It was first implemented by Lunyr where the founders received 15% of issued tokens and they had their tokens locked in a time vault contract for 180 days.
Article By Luc Falempin
Hello @ahsanbarlas,
Your post "The 8 Most Popular Features of ICO Smart Contracts" hast just been resteemed !!!.😄😄😄
By following me, you have achived this service.
😉😄😉 Thank you for using our FREE Resteem Service @tow-heed🙂🙂🙂
Hello! Good article! I'm interested in the them of ICO and crypto-currency, I'll subscribe to your channel. I hope you will also like my content and reviews of the most profitable bounties and ICO, subscribe to me @toni.crypto
There will be a lot of interesting!
Yes sure...Hope to see you again and thanks