Categories
News

Solving the DUSD peg

This blog article is a copy (& translation) of the reddit article by Kügi following the results of this twitter space and a lot of previous discussions.

The current discount in DUSD is a result of excess DUSD within the DeFiChain ecosystem. DUSD was designed to NOT have an immediate arbitrage system such as UST, in order for it not to have detrimental effect on either DFI or DUSD in the long term. Those excess DUSD were added via the DFI payback (burning DFI for DUSD). Going forward, we suggest having a mathematical balance between crypto-backed DUSD and algorithmic DUSD.

This will be achieved with the following four mechanisms in a fast blockchain upgrade scheduled for the first week of July 2022:

  1. Increasing the utility of DUSD by converting interest rates for dTokens and liquidation penalties to DUSD before burning them. (right now they are swapped to DFI and then burned)
  2. Making the DUSD fee on the DUSD-DFI pair asymmetric: only when going from DUSD to DFI.
  3. Until the DEX fee and dynamic interest rates get implemented, which will be discussed in detail below, the Ticker Council will follow the same process manually. Before each update, Ticker Council pre-announce a rate that will become active at least 24 hours prior. This is similar to the mechanics of DeFiChain pricing oracles with the purpose to allow the users to react to it rather than getting a sudden rate change without warning.
  4. Until the DFI-FutureSwap is part of the automatic consensus (see below), the DFI payback premium is increased to 5%, which incentivises arbitrage traders to buy up the discount all the way. This will also lead to less algorithmic DUSD created.

All four measures could be introduced rapidly within the next few weeks and would have an instant positive impact on the DUSD price

The next three will take a bit more development time, as they will automate the dynamic processes mentioned above. They could get included in a blockchain upgrade a bit further down the line. There is no fundamental change to the processes described above, they are just implemented for automation:

  1. Introducing a dynamic, DEX stabilization fee for DUSD on the DUSD-DFI pair. The size of the fee is determined by the ratio of algorithmic DUSD to the total amount of outstanding DUSD.
  2. Dynamic interest rates on DUSD loans, based on the current discount/premium of DUSD, evaluated with the DFI price oracle.
  3. Introducing FutureSwaps for DFI -> DUSD (only one way: burning DFI for DUSD). Same mechanics as the dToken FutureSwap, but the DFI FutureSwap works at 1% premium and is executed every 960 blocks (roughly 8 hours). With this, the DFI payback of DUSD loans is deactivated completely.

We will create separate DFIPs for each point (except point 3, which doesn’t need a DFIP) so MNs can vote on them separately.

DUSD loan interest rate

In case of a DUSD premium, reduced interest rates should incentivize additional DUSD loans. With a minimum base-interest rate of 5%, a DUSD interest rate of -5% means netto 0% interest. It is to be noted that if a vault is on a loan scheme with 3%, and the DUSD interest rate is -5%, the DUSD loan is interest free, i.e. 0%, but not negative interest rate. Net interest rate is always >= 0%.

In case of a DUSD discount, increased interest rate will incentivize DUSD loans to be closed.

The interest rate will be adjusted every 2880 blocks (~24 hours) based on the moving average of the DUSD price.

Calculation of the interest rate should follow the following formula:

Let DUSD_DEX_price = (DFI reserve at DFI-DUSD DEX pool / DUSD reserve at DFI-DUSD DEX pool) * active oracle DFI price
Let COEFFICIENT_DISCOUNT = 500
Let COEFFICIENT_PREMIUM = 3.4

If DUSD_DEX_price < 0.99
   DUSD loan interest rate = (COEFFICIENT_DISCOUNT ^ (0.99 - DUSD_DEX_price)) - 1
Else If DUSD_DEX_price < 1.01
   DUSD loan interest rate = 0
Else If DUSD_DEX_price < 1.05
   DUSD loan interest rate = 1 - (COEFFICIENT_PREMIUM ^ (DUSD_DEX_price - 1.01))
Else
   DUSD loan interest rate = -0.05

Sample rates:

  • DUSD_DEX_price 1.05 results in -5%
  • DUSD_DEX_price 1.04 results in -3.7%
  • DUSD_DEX_price 1.03 results in -2.4%
  • DUSD_DEX_price 1.02 results in -1.2%
  • DUSD_DEX_price 1.01 results in 0%
  • DUSD_DEX_price 0.99 results in 0%
  • DUSD_DEX_price 0.98 results in 6.4%
  • DUSD_DEX_price 0.97 results in 13.2%
  • DUSD_DEX_price 0.95 results in 28.2%
  • DUSD_DEX_price 0.90 results in 74.9%
  • DUSD_DEX_price 0.80 results in 225.6%
  • DUSD_DEX_price 0.70 results in 500.6%

DEX stabilization fee

The stabilization fee is based on the ratio of algorithmically created DUSD. It is changed every 2880 blocks (~24 hours) based on the moving average of this ratio.

If the ratio is below 50%, there is no additional DEX stabilization fee.

Above 50%, the fee increases exponentially according to the following formula

Let ALGO_DUSD_RATIO = 1 - (Loan DUSD / total DUSD supply)
Let COEFFICIENT = 1.8
If ALGO_DUSD_RATIO > 0.5
   DEX stabilization fee = (COEFFICIENT ^ (ALGO_DUSD_RATIO - 0.5)) - 1
Else
   DEX stabilization fee = 0% 

sample results:

  • When ALGO_DUSD_RATIO is 0.5, DEX stabilization fee is 0%
  • When ALGO_DUSD_RATIO is 0.51, DEX stabilization fee is 0.59%
  • When ALGO_DUSD_RATIO is 0.52, DEX stabilization fee is 1.18%
  • When ALGO_DUSD_RATIO is 0.55, DEX stabilization fee is 2.98%
  • When ALGO_DUSD_RATIO is 0.60, DEX stabilization fee is 6.05%
  • When ALGO_DUSD_RATIO is 0.65, DEX stabilization fee is 9.21%
  • When ALGO_DUSD_RATIO is 0.75, DEX stabilization fee is 15.8%
  • When ALGO_DUSD_RATIO is 0.90, DEX stabilization fee is 26.5%

How the DFIPs turned out

summarized by U-Zyn Chua on 6/23/22, explaining:

Special voting round of @defichain DUSD proposals has concluded with 6 passing proposals.

The node release supporting the upgrade is scheduled over the new few days, which means @defichain will be able to support approved $DUSD by early July with a minor upgrade.

The Ticker Council would reiterate that:

  • There are no DEX fee changes before the upgrade;
  • Fee changes before DUSD is at $1 will be gradual;
  • That there are no raising of DUSD loan interest rates until DUSD is at $1.
Categories
News

The Differences Between UST on Terra And DUSD on DeFiChain

After the recent turbulence surrounding the Luna ecosystem, we would like to have a closer look into what has happened there and explain the differences between the DeFiChain ecosystem and its different approach when it comes to the utility of the DeFiChain stablecoin DUSD.

What has happened to the Luna ecosystem

Over the last couple of days, Luna, one of the leading EVM blockchains, experienced a sharp decrease in the $LUNA price. As a result, its algorithmically pegged stablecoin called $UST lost its peg to the US dollar. Let us quickly have a look at what exactly has happened there:

$UST stabilizes its peg by allowing anyone to redeem 1 $UST for $1 worth of $LUNA or 1 $LUNA for its equivalent value in $UST. To incentivise arbitrageurs, $UST must possess true utility. The main utility in the Luna ecosystem is derived from the Anchor protocol, which guarantees a 19.5% yield and is currently responsible for more than 50% of $UST’s circulating supply. However, Anchor’s dominance over $UST is also an issue, as it has lost more than half of its total TVL this week. If $UST leaves Anchor and is swapped for other assets, then this creates sell pressure on $UST.

Unfortunately this is a major issue for $LUNA, because whenever $UST is minted, the equivalent dollar value of $LUNA is burnt. This is great for $LUNA as it reduces the total supply. But it also works the other way: Whenever $UST supply reduces, $LUNA is minted. If more $LUNA is minted, then this increases the total supply, resulting in more tokens entering the market and driving down the price of $LUNA. This is exactly how the death spiral started in the last 24 hours and kicked off  a whole cascade of events including FUD and people panicking out.

Why DUSD and the DeFiChain ecosystem work differently

he DeFiChain ecosystem and here in particular $DUSD has by design much broader utility applications, and thus real value. But before we jump into that, we should have a look into how value is created –– value is a function of three variables: value = “utility” x “scarcity” x “the number of people using it”.

So when utility drops, the value drops. We have already learned that $UST only had one single utility – its promise to yield you 19.5% in APR. DUSD on DeFiChain on the other hand has three distinctive utility applications:

  • The first one is similar to the Luna ecosystem and revolves around the possibility to generate APRs.
  • The second use case is that all dTokens are traded against DUSD and
  • The third application is that DUSD can be used as collateral for setting up Vaults.

When it comes to scarcity, then there is also a clear distinction between the $LUNA and the DeFiChain ecosystem. There is simply no way how you can create DFI with DUSD. This is a design feature and was implemented on purpose, preventing a hypothetical scenario where the stablecoin is dragging down the price of $DFI. Even in times where dTokens decreased by high percentages, the inherent DUSD mechanism reduces the DUSD supply and increases the scarcity.

Summary

Our engineers put utmost importance into designing a thought-through system, built on solid game theory principles. Thus, the wider DeFiChain community should not be worried about any similar occurrences that happened in the Luna ecosystem. The DeFiChain system by design is resilient enough to withstand similar events. In case you have any questions, please feel free to ask them on our social media channels, first and foremost Twitter.