0

I have been following this! tutorial for setting up an ICO contract. I was following pretty solid in my understanding of the process until I hit the following section:

Notice that this will not create new tokens but change the balance the contract owns. The contract can hold both its own tokens and ether and the owner of the contract, while it can set prices or in some cases create new tokens (if applicable) it cannot touch the bank's tokens or ether. The only way this contract can move funds is by selling and buying them.

Note Buy and sell "prices" are not set in ether, but in wei the minimum currency of the system (equivalent to the cent in the Euro and Dollar, or the Satoshi in Bitcoin). One ether is 1000000000000000000 wei. So when setting prices for your token in ether, add 18 zeros at the end.

When creating the contract, send enough ether to it so that it can buy back all the tokens on the market otherwise your contract will be insolvent and your users won't be able to sell their tokens.

The last section in particular was confusing. What does

send enough ether to it so that it can buy back all the tokens on the market otherwise your contract will be insolvent and your users won't be able to sell their tokens.

mean? It made me start to think, How does the owner of the contract gain access to the ether that the contract holds through the buy/sell functions? How can a contract send enough ether to buy back the tokens, when the whole point is to raise funds. Am I missing something? Thanks!

1 Answer 1

1

Note that the text you have quoted sits under "Automated buying and selling" chapter of the tutorial. It is relevant only if you are creating tokens backed by ether (or other tokens), meaning you commit on buying your tokens back any time. If the whole point of your contract is to raise funds, you do not need this functionality.

1
  • Thank you for the clarification!!! Makes total sense when read in that context! Jan 9, 2018 at 4:48

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.