1

Newbie question. On every contract I made, I have ability to create token, which will become 'the money' exchange in my smart contract. What I don't understand is, how to specify exchange rate of my token to Ether? When people want to buy my token, how to specify the amount of ether or money?

  • 1
    Here is an example github.com/TokenMarketNet/ico/blob/master/contracts/… – Mikko Ohtamaa Apr 11 '17 at 9:51
  • This functionality can be added in your token contract by checking the msg.value field at the time of dispersing tokens. – Aniket Apr 11 '17 at 9:53
  • Thank you @MikkoOhtamaa. Is that mean that the value is flat, not fluctuated as in ether? – asofyan Apr 11 '17 at 10:11
  • Yes, that's the simplest pricing model. – Mikko Ohtamaa Apr 11 '17 at 10:15
  • Two main options. 1) A standing offer in your contract. The simplest policy is a peg: "we buy and sell these tokens for one ETH each". 2) Get the token listed on an exchange. Token value is discovered in a bid/ask marketplace. If that sounds interesting, investigate ERC20 standard interface. – Rob Hitchens - B9lab Apr 11 '17 at 10:32
2

Two main options.

  1. A standing offer in your contract. The simplest policy is a peg: "we buy and sell these tokens for one ETH each". It can literally be any policy you can define since it will be enforced by the token contract.
  2. Get the token listed on an exchange. Token value is discovered in a bid/ask marketplace. If that sounds interesting, investigate ERC20 standard interface. This is appropriate if the token represents some sort of bearer instrument with "backing" that convincingly gives the holder a claim. Any form of asset, privilege or revenue steam you can code is a candidate for the property that gives the token value. The market will discover the value of a token.

Hope it helps.

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.