I would like to create tokens where its price is pegged to the price of Ethereum (i.e. Ether price goes up, my token price goes up). Regardless of number tokens been sold or changed hands.Is it possible? Any examples out there for such scenario?

Appreciate all your help. Thank you so much.


The market finds it's level

To peg something to another currency, you need to have someone who's willing to pay that for the currency.

In this case, the easiest way is if you're willing to simply pay back the person in Ethereum for their tokens using a simple sell function in your contract.

So essentially if someone wants some of your token, then they can buy it by sending you some ether, then when they get sick of holding your token they can call a function and get an equal number of ether back for their tokens.

In this situation you will need to keep an adequate balance (a "float") of ether in the contract to cover your expected daily deposits and withdrawals.

External trader markets can find their level but as you're willing to pay back in equal value, it would be silly for an external party to offer less than equal value.

However if there's a limited supply of your tokens and nobody wants to sell, you may end up in a situation where scarcity forces a higher value than you. This fix for this is to make a suitably large (or near-infinite) supply available for purchase.

  • Thank you norganna. Am I able to control the token price by constantly buying/selling tokens? So it looks like as if the tokens are pegged to ether? Is there a function in the contract which allows the token creator to constantly buy/sell tokens? So it looks as if the tokens were pegged to Ether? Thank you.
    – David Tan
    Apr 23 '18 at 4:04

You may want to study MakerDao and Bancor. The first is a token pegged to fiat where the value is preserved with a reserve of crypto currencies. Bancor is a platform for "smart tokens" that are backed by reserves to stabilize the prices of the tokens.

This systems kinda work, but they might fail under bad circumstances (for example if the prices of cryptocurrencies fall too much).

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.