A Curvy DefiDollar

Arpit Agarwal
Jul 19, 2020 · 5 min read

DefiDollar (DUSD) is an index of stable coins that uses Defi primitives to stay near the dollar mark and subsidize the collateralization ratio. Our vision behind DUSD is to provide an avenue for diversifying your crypto-dollars position; to dampen the potentially disastrous effects of a particular stablecoin like tether failing (partially or completely) from its peg.

DUSD was originally built for the ETHGlobal HackMoney and the details about the first design were published in the following post. Here is a quick demo video.

In this post, we propose a revised DUSD design that allows for higher yields, a more robust peg safety mechanism, and yield farming techniques. While the ideas are the same; the underlying protocols have since been changed.

Tl;dr
DUSD is a stablecoin that is collateralized by Curve Finance liquidity provider (LP) tokens. It uses chainlink oracles for its stability mechanism. We leverage Curve to handle the logic around integrating with lending protocols and token swaps; which are essential ingredients for the stability of DUSD. We also introduce a staking mechanism for additional peg safety. If you’d like to remain updated with announcements, discussions, and community calls, please join our discord server and follow us on twitter.

The DUSD cliff

There are 4 components to the DUSD system.

A. Streams
This is the price reference data from the chainlink oracles for the supported stablecoins.

B. Peaks
Peak refers to a yield generating protocol in which the underlying stablecoins are deposited. The system will start with supporting 2 peaks: the curve susdV2 and y pools; hence it will be possible to mint DUSD with DAI, USDT, USDC TUSD, sUSD. The contracts are being written in a manner that it will be possible to add other peaks like Aave, Uniswap — but this idea is still under exploration. Note that the peak will hold the respective LP tokens from the protocol it supports. It will be possible to modify/add/remove peaks from the protocol based on community deliberations.

Mint / redeem
The user is free to choose any of the supported peaks to mint/redeem DUSD. However, note that the DUSD system will be an average of the funds in all the peaks. Later, we might explore the possibility of assigning weights to assets that are deposited at each peak (e.g. 60% y pool and 20% susdV2 pool and 20% in Aave).

There will be a separate contract for each supported peak. This choice was made to keep the gas usage low. Here is how the curve finance peak will look like:

C. Base
This is the core contract of the entire DUSD system and is in charge of the actual mint/redeem DUSD operations, pulling oracle prices, distributing protocol income to DUSD stakers — which brings us to the fourth component.

D. Valley
Valley refers to the DUSD staking system. If the underlying stable-coins fall below their $1 peg, the DUSD system will become under-collateralized. To offset this risk, DUSD has a native staking mechanism. It’s possible to stake DUSD with the system which acts as additional collateral for the DUSD coins that are in free circulation (not staked). In the event of peg failure of the underlying stablecoin assets, the stakers act as buyers of the last resort in the DUSD system. For bearing this risk, stakers will receive all the underlying income generated from having deposited funds in Curve.

Explaining the concept with a scenario:

  1. Let’s say 110 DUSD are backed by $110 worth of stable-coins like DAI, USDC which are deposited in Curve and hence generating income.
  2. Alice, with a higher risk appetite, decided to stake 10 DUSD. Since these staked funds act as collateral for the system, effectively the freely circulating 100 DUSD are collateralized with $110 worth of stable-coins.
  3. Over some time period the protocol generated income (on the entire $110) from underlying curve pools and now has a total of $115 in assets. At this point Alice may decide to withdraw her stake and receive her proportional share (100%) from the income, so will withdraw $10 + $5 (denominated in DUSD). Note that though the protocol income was about 4.5%, however, that is directed entirely towards staked funds. This results in a 50% APR for Alice.
  4. There may be a situation that causes one of the underlying stable-coins to break it’s peg, causing the system to be backed by $100 (instead of $110).
  5. In this situation, the entire burden of the under-collateralized system is borne by Alice. So effectively, while the freely circulating 100 DUSD are still backed by $100, the staked DUSD are worth nothing (i.e. they will remain locked in the protocol). This is how staked funds provide a volatility cushion.
  6. Say, a black swan event occurred which caused the underlying assets to fall further to $80. Since we still want DUSD to be redeemable with the protocol; the system will use the price feed from the oracle to devalue a DUSD token to $80/100 DUSD = $0.8 / DUSD.

We yield farmin’

As for the crops, you might have noticed that the peaks will accumulate yield farming rewards from the protocols they hold the LP tokens of. The mechanism to distribute the farmed tokens is currently under active discussion. Here are some of our thoughts in decreasing order of preference:

1. Once or twice a week, admin collects farmed tokens on behalf of the protocol and distributes them to the DUSD holders based on how long they held DUSD for by running an off-chain script.

2. Make farmed tokens collect-able in realtime but this will lead to much higher gas requirements for mint/redeem/stake operations.

3. Use the farmed funds to create an 1. additional volatility cushion, 2. a SAFU fund in case the dapp funds are compromised and 3. income for the defidollar team. While this sounds the best way of using the funds however, we do not want DUSD believers to lose out on farming opportunities.

4. Admin distributes farmed rewards to stakers alone. This is not a preferred choice because all DUSD liquidity providers (minters/holders) should receive farmed benefits and not just stakers; however, it does lead to higher APR for stakers and hence will help in enhancing the peg safety.

I’d like to reiterate that the above proposals are under active discussion and we’d love to hear your thoughts on the above or any new effective techniques. To be a part of the crop discussions, please join our discord server and say Hi 👋

Smart contracts and Audits

We are in the final stages of the smart contract work and on the lookout for good auditors who would be willing to audit the Defidollar smart contracts at a subsidized cost since we are bootstrapping :) Say hi on our discord or twitter if you’d be interested in performing the audit. Our solidity code stands at about 500 lines for now.

DefiDollar

Multi-Chain Defi Protocol Lab