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!