1

I am trying to create an ERC20 token using the following workflow.

  1. Create a new token, let's say 'XYZ' with an initial total supply of 1000 coins.
  2. List them on exchanges and also create coin's own wallet for purchasing the coins.
  3. When initial supply of 1000 coins is exhausted and a user tries to purchase more coins, let's say 150 coins, then my smart contract mints new tokens (150) on the fly and credits to user's wallet on successful payment. And the cycle continues. Obviously, the total supply will keep increasing accordingly.

In OpenZeppelin smart contracts, there are methods for minting and burning tokens but can they be used without any issues?

More importantly, I need to understand if there are any kind of flaws with the workflow mentioned above. Could be technical, financial or otherwise.

  • Yes, it's called mintable token. It's ok to create it with the model you described. Although, if you plan to add it to exchanges they may not like it because of the mintable nature of the token. It's easier to commit scam/ get security risk for a token with mintable feature. – Igor Barinov Sep 30 '18 at 5:46
0

https://ethereum.org/token covers most of what you describe, so no, I don't think there are any issues with doing that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.