dfips icon indicating copy to clipboard operation
dfips copied to clipboard

DFIP: dUSD repeg by directional fee and reward + additional dUSD burn + LM rewards

Open madsmat opened this issue 1 year ago • 3 comments

DFIP Overview

  1. Requester(s): Telegram: @Maaze19 & @benbe14 | Twitter: @Maaze19 @ben14be
  2. Reddit discussion thread (optional): https://www.reddit.com/r/defiblockchain/comments/xd7m6p/dusd_repeg_dfip_discussion_dusd_repeg_by/
  3. Proposal fee (50 DFI) txid: c8a92c7713a94066ddba924ea85af5c9a1c926f12cac5fadfbaebd92c9df0993

Describe your proposal

Simple and intuitive solution to help repeg dUSD permanently

Even if dUSD is near to 1$ this DFIP could help avoid bigger depeg trades in the future.

One sentence summary: take an addtional fee from trades which would unpeg the dUSD-dex-price further and distribute them to those traders, who are helping to repeg dUSD to 1$

Complete Simulation with onchain data (experts): https://1drv.ms/x/s!AjnWQ5JHqJQUcO_izW-NvJyqWAQ?e=86GTKc

Who has to pay fees?

Fees have to be paid if a trade is against the oracle price. E.g. if the oracle price of dUSD is 1$, the dex price is 0.90$, selling dUSD will include a fee while buying dUSD will be rewarded with fees collected by sellers. If the dex price is above the oracle price, buyers have to pay a fee while sellers will be rewarded.

How will the fee be distributed?

The collected fee consists of three different parts:

  1. Counter trade reward (dynamic) This part of the fee will be rewarded to the trader who is doing the counter trade (towards peg)

  2. Commission (5% of counter trade reward) The commission will be distributed to liquidity providers as a penalty for the trader to imbalance their position

  3. Burn (5% of counter trade reward) The burn part is an anti whale measure to make it more expensive manipulating prices and help to repeg.

Which token will be collected as fee?

If the price is below 1$, fees will be collected and distributed in dUSD, otherwise in DFI. Because it doesn't make sense to burn USDT or USDC, both have to be automatically converted to DFI when collected (burn part). All other fee parts will be distributed in USDT or USDC.

To which pools will the dynamic fee be applied?

We would like to propose this DFIP only for the dUSD-USDT and the dUSD-USDC Pools. After everything works as planned, this DFIP can be rolled out to dUSD-DFI and all dToken Pairs. Therefore we have to check the impact of delayed oracles due to a long blocktime or stock market data. (New DFIP will follow for this)

When would it be activated?

Because first we have to fill the reward pool, the activation happens in 3 major steps:

  1. Implementation
  2. Activating through a hard fork
  • Commission reward will be paid out
  • Burn fee & counter trade reward will be collected until the reward pool is big enough to pay all rewards to repeg price (1$)
  1. burn and counter trade rewards activated
  • Ensure that never more rewards will be paid out than collected."

How will the fee be calculated?

Fee calculation is simple:

  1. check the difference between dex and oracle price BEFORE the swap
  2. check the difference between dex and oracle price AFTER the swap
  3. Calculate the fee based on data before and after (see playground sheet or example)
  4. If the depeg will be bigger, the formula is automatically positive => have to pay If the depeg will be smaller, the formula is automatically negative => eligible to be rewarded"

Example: dUSD < 1$

If a sell of 5000 dUSD would depeg a pool from -5% to -10% fee calculation would look like this:

Caution: free choosen numbers, a sell of 5000 dUSD would never have such a huge price impact (= fee will be way less)

5000*(-5%) = -250 dUSD

5000*(-10%) = -500 dUSD

= |-250 dUSD| + |-500 dUSD| / 20

= 37.5 dUSD counter trade fee

  • 1.875 dUSD (5% burn fee)

  • 1.875 dUSD (5% commission for liq provider)

Sum Fee = 41.25 dUSD (0.825% for 5% further depeg)

How does this DFIP benefit the DeFiChain community?

  1. Potential permanent repeg of dUSD to about $1
  2. Benefitting the DefiChain-Ecosystem by helping to repeg dUSD will only give advantages, on the other hand unpeg dUSD or make huge transactions which lead to huge price impacts will be charged with fees
  3. burn fee will further help burning dUSD (less algo-dUSD) or DFI which could have a positive longterm impact on the dfi price
  4. comission fee will give further rewards for liquidity providers (higher APR)
  5. so called "sandwich-bots" will also pay those fees at least on one side of their trades which makes them less profitable and less harmfull

Non-obligation

I understand that vote of confidence for DFIP carries no obligations by any developers to implement the proposals. DeFiChain is a community projects. Pull requests can be submitted by community and reserved to be evaluated for safety and general community acceptance.

madsmat avatar Sep 28 '22 08:09 madsmat

Def. interesting proposal. Thank you

julianhosp avatar Sep 28 '22 09:09 julianhosp

Please coordinate this DFIP with the idea of Phigo trying to find a more optimal pool size for all 3 DUSD pools. In addition, if Phigo's idea is implemented, a kind of additional dUSD burn with the released rewards from the dUSD pool should take place. He will certainly also submit a DFIP for his idea.

What about the Dex Stab Fee =f(algo_ratio)? Should this fee then be abolished by your fee?

Overall I see your DFIP as a way to keep whales away from shorting dUSD. Shouldn't the counter trade fee be even bigger to effectively punish whales?

If it is effective enough, we could finally lower the DEX Stab Fee to the value it should actually have (~3.5% (09/28/2022)).

seb18781 avatar Sep 28 '22 11:09 seb18781

Wouldn't it be simpler to just lock the dUSD{C,T}-DUSD pools to a min 0.95:1 max 1.05:1 ratio or so? Then arbitrage can still happen on the DFI pool.

John-Gee avatar Oct 05 '22 01:10 John-Gee

Hi there, based on the txid provided above, it seems like you have sent the proposal fee to the incorrect address. The right address should be 8defichainBurnAddressXXXXXXXdRQkSm.

Kindly rectify the proposal with the updated txid by Monday, 7th November 2022, 2359 UTC for it to be considered for November 2022 voting round. Thank you!

Graciaho avatar Nov 07 '22 08:11 Graciaho

Hi there, based on the txid provided above, it seems like you have sent the proposal fee to the incorrect address. The right address should be 8defichainBurnAddressXXXXXXXdRQkSm.

Kindly rectify the proposal with the updated txid by Monday, 7th November 2022, 2359 UTC for it to be considered for November 2022 voting round. Thank you!

My bad! TXid is now updated! 122a2d302950cdb35a49b6336280e92ad13485c06323d3b20783fc0c713c3939

madsmat avatar Nov 07 '22 15:11 madsmat

Thank you for the update!

Graciaho avatar Nov 07 '22 15:11 Graciaho