dFuture introduces external quotations from the oracle, supports a single currency mortgage, and attempts to provide DeFi derivatives trading services with zero slippage and no impermanence.
Written by: dFuture
In the traditional trading market, centralized exchanges are often suspected of doing evil through pin insertion and private printing of coins due to the non-openness and opacity of transaction data. At the same time, the recent incident of OKEx’s failure to withdraw cash has increased traders’ concerns about the security of assets deposited on exchanges.
The decentralized spot exchange represented by Uniswap has solved the problem of spot trading to a certain extent, but there is still a lack of a sufficiently robust decentralized futures (perpetual contract) exchange similar to Uniswap in the market.
dFuture is a decentralized derivatives exchange. Traders can complete long/short transactions through leverage safely and efficiently at a price that far exceeds the trading depth of centralized exchanges at a price without slippage; LP (liquidity) The provider only needs to mortgage a single settlement currency (currently USDT), which can obtain stable, risk-free, and high-return income without impermanent losses.
After a month of testing in the Alpha version, dFuture has officially opened the Beta version for all users. The official version of dFuture will be officially released within two weeks after the completion of the security audit.
How dFuture works
dFuture is developed based on the QCAMM protocol (Quoted Price and Constant Sum Based Automated Market Maker). The first phase of the agreement aims to establish a financial derivatives transaction agreement based on external quotations and dynamic commissions based on constant sum formulas.
The QCAMM protocol obtains the current comprehensive quotation of the trading category through multiple external oracles and decentralized exchanges. Traders can directly complete long or short taking orders based on this quotation. No pending orders are required, and there is no slippage. LP’s mortgage amount is directly proportional. LP only provides a single currency mortgage, and there is no impermanence loss.
The main features of the QCAMM protocol include:
- External quotation: The transaction price is not determined by an algorithm like AMM, but is obtained from multiple external decentralized data sources, including oracles and decentralized exchanges;
- 0 Slippage: The trader can directly take orders at the current quotation within the range of the platform’s allowable open position, and there is no price slippage;
- Deep trading depth: The trading depth of the trader only depends on the LP mortgage amount and the size of the platform’s naked position;
- LP has no impermanence loss: LP only needs to mortgage a single settlement currency, which is currently USDT. By only collateralizing USDT, there is no impermanent loss in QCAMM; the design of QCAMM ensures that LP can ensure risk-free profit from a long investment cycle.
How to ensure that traders have a fair deal with no slippage and high transaction depth
In the QCAMM agreement, after the platform integrates multiple external quotations to form the platform price, the trader can directly complete the long or short transaction with the counterparty at that price, and the transaction price has no slippage. The transaction depth at this time depends on the counterparty’s transaction depth. The counterparty of a trader is divided into reverse trader and LP. If the current reverse trader’s total position is more, the trader is equivalent to forming a counterparty with the reverse trader; if the reverse trader’s total position is small, then The trader is equivalent to forming a counterparty with the LP, where the LP acts as a liquidity provider.
Therefore, the trader’s trading depth is calculated by the total amount of LP mortgage and the platform’s naked position (naked position = ABS (platform multi-order total position-platform empty position total)). When the platform’s naked position is consistent with the trader’s trading direction, the transaction Depth = total LP mortgage-naked position on the platform; when the naked position on the platform is opposite to the transaction direction, transaction depth = total LP mortgage + naked position on the platform. In most cases, this transaction depth is much better than that of a centralized exchange.
How to ensure that LP is profitable without risk
Under the QCAMM agreement, LP only needs to mortgage a single settlement currency, which is currently USDT, so there is no risk of impermanent loss.
The main risk LP faces is that when the platform’s naked position is not zero, LP and the trader are the counterparties, and the naked position is the LP’s risk exposure. The QCAMM protocol introduces the role of arbitrageur to actively trade on the platform through the mechanism of “dynamic handling fee/dynamic holding fee”, thereby forming a dynamic balance of the platform, controlling the LP risk at a low level of fluctuation, and realizing the risk-free profit of the LP. The specific principle is as follows:
- For the trading platform, if the sum of the long position and short position of the platform is equal, that is, the long position and the short position are offset, and the naked position is 0. At this time, LP will not have any risk and can continue to obtain the trader’s trading procedures Fees and holding interest to achieve risk-free profit; therefore, the problem of controlling LP risk is transformed into how to make naked positions zero;
- The QCAMM protocol uses the mechanism of “dynamic fee/dynamic holding fee based on constant sum formula” to control the naked position to 0. Taking dynamic fee as an example, the constant sum formula means “handling fee for long orders + handling fee for short orders = constant value” . When the naked position is small, the platform charges both long and short transaction fees at the same time, and the fee rate is lower than that of centralized exchanges; when the naked position is large, for example, the direction of the naked position is long, you need to pay more when opening a long order. High handling fee, and when opening a short order, the platform will refund the handling fee to the trader; the change value of the handling fee is proportional to the deviation between the naked position and the LP pool mortgage amount;
- By returning the service fee, there is arbitrage space on the platform, which will attract arbitrageurs into the transaction. When there is a state of refunding the handling fee, if the naked position is long, the arbitrageur can place a short order on this platform and place a long order on the Cefi exchange such as Huobi to offset the risk of the position, and at the same time get the platform’s handling fee refund , So as to realize risk-free arbitrage; at the same time, due to the trading of arbitrageurs, the naked position of this platform will return to zero, and the LP risk exposure will decrease accordingly;
In short, under the QCAMM agreement, LP risk will be in a dynamic equilibrium process for a long time. In the long run, LP’s risk exposure will always be maintained at a relatively low level, so as to realize LP’s long-term risk-free profit.
Dynamic commission/dynamic holding interest based on constant sum formula
Traders are required to pay transaction fees when trading on the dFuture platform. Unlike traditional trading platforms, in order to control platform trading risks, transaction fees will dynamically change based on the ratio of the platform’s current naked positions to the LP pool. Currently, the platform sets a maximum of 1:1 for naked positions and LP pools, so the ratio of naked positions to LP pools is in the range of [-1,1], where a negative value means that the naked position is a single direction; a positive value means that the naked position It is a multi-single direction; as the ratio of the naked position to the LP pool slides between -1 and +1, the handling fee for long and empty orders will also change together, and the same is the handling fee for multiple orders + empty order procedures The fee is constant at a constant value. The calculation formula of the specific handling fee is as follows:
D=(total long position-total short position)/total amount of LP pool long order handling fee X1 = N1 + M1 * D; Empty order handling fee Y1 = N1 – M1 * D; Long order handling fee X1 + empty order handling fee Y1 = 2*N1 (constant value); M1 * D = handling fee offset; Among them, M1=1%; N1 (LP fee advantage)=0.03%;
List of handling fee changes with D value:
The transaction fee changes with the value of D as shown below:
The relationship between handling fee and D value change
Summarizing the above data, it is obvious that when naked positions (total long positions-total short positions) account for 0%-3% of the total amount of the LP pool, the platform charges transaction fees from both parties to the transaction, and at the same time it will tilt towards the naked position When the naked position accounts for more than 3% of the total amount of the LP pool, new open positions in the positive direction of the naked position will need to pay a processing fee, and new positions in the opposite direction of the naked position will be refunded.
The processing of holding interest is the same as transaction fees.
Therefore, the system always encourages trading to tilt in the direction of reducing naked positions, and traders can make additional profits by trading against the direction of naked positions. At the same time, in an active trading market, arbitrage with other exchanges will ensure that traders doing reverse naked positions can obtain stable arbitrage returns and risk hedging.
Data analysis of trading competition in dFuture closed beta
During the internal testing process, dFuture launched an internal trading competition. The competition lasted 20 days. Nearly 50 people participated in the competition. Each participant received 100,000 USDT test tokens for LP mortgage or transaction. In the actual competition process, the LP mortgage pool has been maintained at around 2 million USDT, and the system open position has been maintained between 6 million and 8 million USDT; the system naked position has been fluctuating between 0%-15%, and the formula is constant. The expected goal was achieved in the test.
Most of the platform’s transaction fees and holding interest are attributable to LP. At the end of the game, LP has achieved USDT annualized income of about 90% to 100%.
Summary of dFuture features
Fully decentralized perpetual contract trading platform
The dFuture platform is a fully decentralized derivatives trading platform developed based on the Ethereum platform:
- Transparent transaction rules: All transaction rules and charging rules are recorded in the Ethereum smart contract, which is visible to everyone;
- Transparent transaction data: All transaction data is recorded in Ethereum and visible to everyone;
- Transparent asset protection: LP’s mortgage assets are locked in smart contracts and can only be operated through public smart contracts; traders will only put the opening margin into the smart contract when opening a position;
- No KYC: A decentralized trading platform based on smart contracts, no KYC is required, and users are only tracked through the wallet address;
Comprehensive external quotation
dFuture uses chainlink and uniswap prices to form a weighted average price to guide platform transactions. The price is updated with every block of Ethereum, and the price is updated approximately every 15 seconds. Therefore, the dFuture platform rarely has a pin market that suddenly drops and then pulls back.
Dynamic / low transaction fees and holding interest
In order to allow traders to have a better trading experience, the transaction fee and holding interest of the dFuture platform are extremely low. The benchmark fee is 0.03%, and the benchmark holding interest is 0.05%, which is much lower than the fees charged by centralized exchanges.
In the case of small naked positions, traders can enjoy far lower fees than centralized exchanges; and when the naked positions are large, traders have the opportunity to get the platform’s trading fees and return of holding interest.
LP mortgage pools with different risk preferences
The dFuture platform can support the establishment of LP mortgage pools with different risk volatility composed of different trading pairs and leverage ratios. The naked positions of each trading pair are shared, and they participate in the calculation of dynamic handling fees and dynamic holding interests of each trading pair.
A LP mortgage pool supports different trading pairs. Compared with the LP mortgage pool only supports one type of trading pair, it can flexibly increase the maximum open positions of different trading pairs, increase the fund utilization of the LP mortgage pool, and thereby increase the LP mortgage The return rate of the pool; at the same time, by integrating low-risk and medium-risk trading pairs in a mortgage pool, the risk of the mortgage pool is reduced through low-risk trading pairs, and the trading returns through medium-risk trading pairs can also be further improved. rate of return.
When LP is mortgaged, it can choose whether to mortgage to a low-risk pool or a high-risk pool according to its own risk preference, so as to choose to obtain a risk-free stable return or choose a risky high return.
The next step of the job
dFutureV1 is only the first step in the exploration based on the QCAMM protocol. The QCAMM protocol itself has huge room for expansion. We hope to try in the following aspects in the future:
- A mortgage pool with ETH and wBTC as a single settlement currency;
- Within the LP reserve ratio, combined loans and reinvestments based on LP assets will further increase the LP yield;
- Platform income distribution based on algorithm dynamic adjustment;
- Dynamically optimize and adjust trading pairs based on the algorithm for the same mortgage pool;
- Based on fair external quotations, form a trading platform for stocks, futures and foreign exchange;
dFuture is a small member of the entire DeFi ecosystem. We hope that our continuous exploration of decentralized perpetual contracts can make more contributions to the prosperity of the DeFi field.