Introducing DefiDollar

atvanguard
DefiDollar
Published in
5 min readMay 24, 2020

Quite recently there has been a lot of discussion about Dai moving from its peg and the hassle of involved governance proposals to maintain its stability. Also, even centralized stable coins are often trading above or below the peg.

Other risks associated with centralized coins include counterparty risk, bank run risks, asset seizure risk, and effects from negative interest rates.

DefiDollar

DefiDollar is an attempt at being an index of stable coins that uses Defi primitives to stay near the dollar mark and subsidize the collateralization ratio. Let me demonstrate the mechanics of the DefiDollar by walking you through its complete lifecycle.

  • Since DefiDollar (DUSD) is backed by existing stable coins, for the sake of the illustration, we start with choosing two stable coins, A and B for e.g. Dai and sUSD as the underlying reserves, in an equal ratio.
  • To mint 200 DUSD, the user deposits 100 coins each of A and B.
  • Within the mint transaction, A and B are locked in Aave, and the corresponding interest-bearing Aave coins aA and aB are deposited in a liquidity (balancer) pool. Interest income from Aave is redirected to an earnings pool.
  • aA and aB in the pool can be traded using an Automated Market Maker mechanism (a pool-based swap mechanism used by Uniswap and curve.fi and for which balancer provides a framework).
The DefiDollar way
  • Now, say the price of A fluctuates to $1.1 and B goes to $0.9.
  • This opens an arbitrage opportunity since, in the pool, A and B are still in a 1:1 ratio. Hence, arbitrageurs will trade A for B from the pool which will cause the values of both the pools to come close to $100 each and the DefiDollar will be balanced again. A small fee from these trades will also be directed to the earnings pool.

While the arbitrage opportunity discussed above will keep the relative prices of the underlying coins in sync, there is still a possibility that the DefiDollar slips from its peg. A couple of such scenarios are when all of the underlying coins have fallen above or below the $1 mark.

Oracles

To be able to explain this, let me draw your attention back to the earnings pool discussed above, which was accruing earnings from the interest and trade fees. Let’s say this pool has accrued 5 coins of A and B each over some time. This pool will act as a volatility cushion.

Say the price of A and B has dropped to $0.97 and $0.98 respectively and so DUSD would be at about $0.975. To rebalance the pools again, an oracle (chainlink) would periodically be pushing prices of the underlying coins to the core smart contract.

Prices are fetched from the chainlink reference contract

Since the pool of A is valued at $97; to cover the deficit of $3, the protocol will send (3 / .97) = 3.092 coins from the earnings pool to the main pool. Similarly, the pool of B is in a deficit of $2, and hence (2 / 0.98) = 2.04 of B will be sent to the main liquidity pool. This way DefiDollar will be at the $ mark again.

After there are enough funds for the volatility cushion, any following earnings will act as the protocol fee.

What happens if the DefiDollar moves from its peg?

If DUSD is trading above the peg, there is an instant profit to be made since the protocol allows one to generate a DUSD by locking $1 worth of other stablecoins. Arbitrageurs will mint more DefiDollars and sell them in markets causing the price to be driven down.

If DUSD is trading below the peg, there is instant profit to be made since the protocol allows to redeem one DUSD for $1 worth of other stablecoins. Arbitrageurs will buy the coins and redeem them from the protocol causing the price to be driven up.

The above mechanism is different from how the Maker system works. Following is an excerpt from The Rise of sUSD.

Maker is a clever system: levers and pulleys designed to maintain a soft peg without coercion. A combination of monetary policy and arbitrage opportunities drives the peg towards $1 in either direction. But, during a period in March 2019 when the peg was drifting slightly, Twitter user and DeFi whisperer @DegenSpartan highlighted a subtle crack in the arbitrage model.

When the peg is under $1, the Maker system theoretically incentivizes CDP owners − the users who have leveraged their ETH collateral to mint DAI − to buy back the stablecoin at a discount to repay their debt below cost. However, this mechanism wasn’t quite working that March, and to understand why, we need to remember that the most common type of CDP user is someone who is long ETH and wants to lever up using DAI. At this stage in the market cycle, the market sentiment was overwhelmingly bullish. Unfortunately for the peg, a couple of cents of arbitrage wasn’t enough to encourage enough traders to unwind their positions.

There are always some arbitrageurs waiting in the wings, but at some point the overlap between CDP owners and traders positioned to perform arbitrage disappears. And the equilibrium price where this occurs could very well be 96 or 97 or 98 cents.

Key Benefits

  • A more stable coin.
  • Stablecoin hedging
  • An avenue for AMM based efficient stable coin swaps.
  • Requires minimal governance.
  • Captures the momentary upticks in yield of a particular underlying asset i.e. it is common to see Dai, sUSD, bUSD giving out 30%+ APR but only for a few hours.
  • Risk diversification. The protocol will be unopinionated about whether centralized coins can be used as an underlying asset. However, there is likely some substantial diversification potential.

Live on Kovan Testnet

DefiDollar is live on the kovan testnet and can be played around with on https://defidollar.xyz/. We currently support DAI, TUSD and MKR (swapped to underlying assets through Uniswap V2) to mint DUSD. These coins can be obtained from the faucet links beneath the input amount box in our app. Kovan ETH can be obtained from the faucet. We also have a dark mode!

If you like the idea please mint/burn some DUSD, swap Aave interest-bearing coins, rebalance DUSD using the chainlink oracle and let us know your thoughts. 👋

DefiDollar was created by Deep Joshi, who worked on all things design, Manthan Joshi who hacked on the frontend and Arpit who coded the smart contracts! Our DMs are open :)

--

--