ERC-20 – What is Token Minting and How is it Prevented After ICO?

erc-20ico

I am trying to know how ICO works (on a high, intuition-level), somehow it is hard to find information on the following questions.

  1. As I understand this minting is the process where you create the tokens. What exactly is happening there? You create an erc20 contract and it has a list of people who paid into your ico and then you more or less say balance of the address of the investor is now XY coins? (and maybe convert it later if you have a non-eth blockchain)

  2. What prevents me from minting afterwards again if I am the owner/creator of the token-contract?

  3. Somewhere I read that you should do minting on separate offline machine and transfer ownership after that to not expose your private key? Why would the private key get exposed while doing the ICO?

Best Answer

Smart contracts are computer programs. You can code almost any business logic you want in them. That includes the business logic for minting new coins.

The trust of your ICO contributors is the reason why you should have clear rules regarding when you wouldn't be able to mint new coins. Who would send you money for tokens if you can print an unlimited amount of them any time?

You can implement some stop conditions in your mint() function:

  • require that the total number of tokens to be less than a max hard cap
  • require that the current block height to be less than a specific height (to put a deadline in the ICO contribution phase for example)
  • keep a counter for the number of participants and require that number to be less than 100k for example.

Given all the ICO scams that are currently running, people tend to be as cautious as possible when sending money to an ICO. One such measure is to actually read the source code of the ICO smart contract. I wouldn't participate in an ICO with mintable tokens where I can't see the mint() function for example.

Related Topic