10

The idea of a stablecoin in Ethereum is to create a token that is pegged to the price of say $1 USD.

What are the main ways of achieving a stable cryptocurrency? What DApps are implementing them and how are their approaches different?

  • It is easy to sell for fixed price than variable price :) Please post your code you wrote to achieve the same. We cannot write the entire contract for you, obviously. in fact there is a place for that called upwork – niksmac Apr 22 '16 at 16:45
10

In alphabetical order, here are some DApps implementing a stablecoin, and the differences in their approaches. This is a community wiki for all to improve. (This is just a starting point.)

Decentralized Capital

How do I know that each DC asset is backed by its real world counterpart?

We are working with our banking partner institute a mechanism whereby the bank will release daily proof-of-reserves (POR). Comparing this report to the DC assets visible on the Ethereum blockchain will show that every DC asset is fully backed by its government currency counterpart. Until we establish this mechanism, DC will release daily bank statements detailing existing deposit amounts.

Maker

Introducing Maker states:

Maker is able to maintain the price stability of the Dai through the Dai Credit System, which backs the Dai with collateral stored in Ethereum smart contracts, while simultaneously functioning as an internet-based, p2p credit market that commoditizes credit by allowing anyone with valid collateral to take out loans that have low transaction costs and no middle man fees.

String

String uses Contract For Difference (CFDs) as outlined in Slide 11 from a presentation given at DEVCon1:

“Liquidity Partners” bridge DAO to traditional finance by selling zero based CFDs they 100% hedge by purchasing underlying asset

Real world compliance framework governed by an association, with continuous auditing, horizontal legal relationships and practically secured using multi-signature systems. Compliance requires liquidity providers to honor “virtual” CFDs they sell to the DAO and also 100% hedge their positions by purchasing the underlying asset.

5

The best service to use for this is Oraclize.it.

The serves as an oracle for a number of currencies and variables (i.e. exchange rates, weather, etc) which are constantly updated by a Wolfram Mathematica server. As it says here, you shouldn't use contract for anything important. since it piggy backs on the Oraclize pricing internals it could suddenly change if Oraclize changes their pricing model.

You can called the USD-to-Wei oracle in your contract via this line:

USDOracle oracle = USDOracle(0x1c68f4f35ac5239650333d291e6ce7f841149937);

And you can interact with it via these two functions:

function WEI() constant returns (uint);

function USD() constant returns (uint);

Again, maybe you might want to look at the original contracts if you want to design your own, but that's a good starting point.

https://github.com/pipermerriam/ethereum-usd-oracle/blob/master/contracts/USDOracle.sol

  • Getting data is only one part of the problem here, but if you tried to use oraclize for this you'd need to build in a separate layer of governance to handle what happens when the data source you originally asked it to pull from stopped providing that particular service. – Edmund Edgar Apr 23 '16 at 5:31
  • Digix (gold) use the London Bullion Market for their pricing oracle. As for what would happen if the data source stopped providing the service, I'm not sure what you mean. Do you mean have two or three data sources queued then switch to another if the chief data source fails? – Physes Apr 23 '16 at 11:38
  • If you're trying to make a long-term stablecoin then two or three data sources queued up probably won't work either. Available data sources just don't come with a promise that they'll be available in the future. So what you'd have to do would be to come up with some kind of governance process - say stakeholder voting - that would allow you to switch to a completely new data source. – Edmund Edgar Apr 24 '16 at 2:02
  • I just realized your comment was probably aimed at a different question that was (wrongly imho) merged with this one, that's about a fixed price for a short-term sale. Yes, for that use Reality Keys or Oraclize. I run Reality Keys so I'm obviously biased but it's probably better for these purposes, as it aims to give you an actual price whereas Oraclize aims to tell you what someone else says the price is, so if your upstream data source breaks Reality Keys will substitute a different one whereas with Oraclize you'll be SOL. But if it's very short-term it probably won't matter. – Edmund Edgar Apr 24 '16 at 2:08
4

See the previous answer for who's implemented what but a few approaches are:

  • Back the coin by an independent, trusted entity. They have the power to create coins if the rate is too low, and they spend their own money to buy coins and destroy them if the rate is too high. This will break if that entity becomes unwilling or unable to carry on doing this.
  • The same as previously, but the independent, trusted entity consists of the holders of your currency. They can vote to issue more currency, or a subset of them can vote to destroy their own coins.
  • Assuming you have a way of getting data about the exchange rate, have a war-chest in an Ethereum-native currency like Ether or Bitcoin, that can be automatically redeemed for your currency. This will break if the value of the war-chest drops below what the coins are supposed to be redeemable for.
  • Also assuming you have a way of getting data about the exchange rate, have a separate free-floating token alongside the main currency. When new money is printed, it gets distributed to holders of these tokens. When someone needs to destroy coins, they get these tokens in return and hope that more money will need to be printed in future.

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.