Upgrade Instructions for Derify V2.0
Recently, Derify has launched a testing version of V2.0, and this article aims to provide an explanation of the modified and additions made to the V2.0 version.
Addition of new feature modules
The Multi-currency margin feature module
In principle, any fungible token can be used as margin for perpetual contract trading. The biggest change in version 2.0 is the introduction of multi-currency margin functionality. In this version, users can choose and deposit different currencies as margin for opening positions (initially supporting BEP20 assets on the BNB Chain, with support for assets on other chains to be added later).
The entire trading logic for version 1.0 of BUSD collateral remains the same. Each type of collateral has its own independent liquidity pool, insurance pool, bond, and repurchase fund. If a user chooses to trade with a particular margin, all associated fees and profits/losses will be calculated based on that margin’s currency.
For example, if Alice uses CAKE tokens as margin and opens a 10,000 CAKE long position with 20x leverage when BTC is priced at $25,000, and the next day BTC’s price rises to $27,000, Alice’s unrealized profit would be 800 CAKE, calculated as 10,000 * (27,000–25,000) / 25,000.
The Grant feature module
In version 2.0, anyone can add Grants to incentivize user behavior.
The incentivized behaviors currently fall into three categories: Holding mining, Broker, and trading competitions.
- Holding mining is used to incentivize greater liquidity, with holding users sharing the Grant prize pool three times a day based on the proportion of their holdings in each trading pair, following the same rules as the transaction fee income from holding mining.
- Brokers are incentivized to promote trading of a certain margin through the use of a broker incentive program. The program distributes a Grant pool on a daily basis, which is divided among brokers based on the proportion of trading volume generated by their users.
- The trading competition is a newly added activity type that encourages users to generate profits through perpetual contract trading and receive additional rewards. Traders will be ranked based on their trading profits during the competition period and will share the Grant prize pool at the end of the competition.
The Grant initiator can select a specific type of margin and corresponding incentive behavior, while inputting the number of tokens in the prize pool, the duration of the grant, and the number of days until the grant begins. Please note that the prize pool currency must be DRF tokens.
For example, Alice initiated a trading competition called Grant for BUSD collateral, with a total prize pool of 10,000 DRF, lasting for 30 days and starting in 5 days. Users participating in BUSD collateral trading (the top 30% ranked by profit) will have the opportunity to share the token rewards of 10,000 DRF when the competition ends in 35 days.
The Buyback feature module
In version 1.0, only one BUSD repurchase fund was used for DRF repurchase and destruction. In version 2.0, each margin has an independent repurchase fund, and different margins have different repurchase cycles. When a cycle expires, if the DRF price is lower than the previous cycle’s price, a repurchase will be triggered, and the repurchase will be automatically completed through DEX routing. The repurchase funds for different margins will be sorted according to their repurchase time, thus forming a repurchase list plan in version 2.0, which will continuously repurchase and destroy DRF.
The Myspace feature module
The user can view their margin accounts for all currencies, as well as trading and position information, on their Myspace page.
Overview feature module
Users can view statistical data for all margin currencies across the entire network on the overview page, such as the net trading value (in USD), net position value (in USD), maximum position mining yield for each margin, trading volume, and position size.
New ranking page
Introducing a new ranking page that displays the earnings from position mining and trading competitions. This page provides a clear and intuitive overview of the various earnings rankings for all users on the platform.
Upgraded gas fee sharing mechanism for holding mining rewards
The distribution of mining rewards for holding positions is executed and paid for by the system account, with the cost deducted from the total amount of mining rewards distributed each time. In version 1.0, each user who receives rewards bears the cost on an average basis, which results in users with smaller holdings receiving rewards that are less than the cost of gas, ultimately leading to these users being unable to benefit from holding mining rewards. In order to improve the user-friendliness of the product for users with smaller holdings, version 2.0 changes the previous method of averaging the cost among users to a proportional distribution based on the amount of rewards received. The upgrade of the gas fee sharing mechanism ensures a fairer and more user-friendly distribution of rewards.
Increase the threshold for buyback destruction slippage
We have added a price slippage threshold for DRF buyback and burn, which limits the percentage increase in price for each buyback. By setting a slippage threshold, we can effectively prevent arbitrage behaviors such as sandwich attacks and improve the utilization of buyback funds.
Important Links & Docs:
Audit Report: https://www.certik.com/projects/derify-protocol
You are more than welcome to share/like/comment this article. For the better future of DeFi!