How does the insurance pool in Derify work

Derivation Lab
6 min readJul 19, 2021

--

Just like all CEX that supports perpetual trading, the insurance pool plays an important role in all DEX: When facing drastic price fluctuations, there may be some positions with losses exceeds the account balance, which means after liquadation, the remaining account balance will still unable to pay off the debt incurred during a margin call, causing the account to be bankruptcy, all excess losses will thus be borne by the exchange, thus an Insurance Pool is vital.

Derify will also use funds from the insurance pool to cover similar losses. The insurance pool is the most important layer of our risk control, and loss distribution will happen when the insurance pool is also short in funds (centralized exchanges reduce their own risk by automatically closing trader’s profitable positions, but this brings poor user experience). Derify Protocol’s insurance pool mechanism will be elaborated in detail here.

The role of the insurance pool in Derify Protocol

As we know from the previous article on market making and Position Change Fees, instead of using an order-book to match transactions, Derify controls the risk by keeping the balance between long positions and short positions. The smart contract calculates the profit/loss at the price of opening/closing positions directly and provides incentives for arbitrageurs to maintain such balance. However, in the actual trading, risk exposure will always be present because of the responding delay of arbitrageurs (motivation for arbitrage only comes after naked positions appear) , and the risk exposure may be quickly magnified due to mandatory liquidation in a volatile market (such as a price spike or crash). When users withdraw their funds but the system is in a net loss, funds from the insurance pool will be used as a supplement to ensure the normal settlement of the fund withdrawal.

How to calculate the insurance payout

Example: After a period of trading, suppose the total profit of profitable positions is 11 million USD, but the system liquidity pool only has 10 million USD. The system net loss is 1 million USD. At this point, Alice withdraws 1,100 USD where 1,000 USD = (1100 — 1100 * 1M / 11M) is covered by the liquidity pool and the rest of 100 USD is covered by the insurance pool.

Example: After a period of trading, suppose the total profit of profitable positions is 10 million USD, but the system liquidity pool only has 11 million USD. The system net profit is 1 million USD. At this point, Bob withdraws 1,000 USD that is fully redeemed by the liquidity pool. The additional 100 USD from the liquidity pool (1,000 * (11M -10M) / 10M) will be injected into the insurance pool.

The Cashflow of The Insurance Pool

Besides the risk exposure and user fund withdrawal, the fund inflow and outflow of the insurance pool is related to trading fee and forced liquidation. The insurance pool will have different rules for fund inflows and outflows depending on the status of the fund.

System Net Profit

When the system makes a net profit, the inflow funds of the insurance pool include: 40% of the trading fee, the rebate of invalid brokers (30% of the trading fee), liquidation of the remaining margin, and the part of system net profit when users withdraw funds; The outflow of funds from the insurance pool includes: bDRF redemption, DRF buy back & burn.

System Net Loss & Sufficient funds in Insurance Pool

When the system has a net loss and the insurance pool is sufficient (the balance of the insurance pool is greater than the system net loss), the inflow funds of the insurance pool include: 40% of the trading fee, invalid brokers rebate (30% of the trading fee), liquidation of remaining margin.
the outflow funds of the insurance pool include: bDRF redemption, DRF buy back & burn, and the part of system net loss when users withdraw funds.

System Net Loss & Insufficient funds in Insurance Pool

When the system has a net loss and the insurance pool is insufficient (the balance of the insurance pool is less than the system net loss), the inflow funds of the insurance pool include: 40% of the trading fee, invalid brokers rebate (30% of the trading fee), liquidation of remaining margin.
the outflow funds of the insurance pool include: part of system net loss when users withdraw funds.

System Net Loss & Depleted Insurance Pool

When the system has a net loss and the insurance pool is depleted (the balance of the insurance pool is 0), the inflow funds of the insurance pool include: 40% of the trading fee, invalid brokers rebate (30% of the trading fee), liquidation of remaining margin. There is no remaining funds in the insurance pool, and the system will issue bonds to redeem the system net loss when users withdraw funds.

Insurance pool plays a key role in risk management. Thus, Derify’s goal is to optimizing the insurance pool mechanism and increasing the size and security of the insurance pool. In order to ensure safety while maximizing the capital utilization rate, we adopt the following principles: when the insurance pool doesn’t have sufficient fund, the rate of injection is accelerated; when the insurance pool has sufficient fund, the rate of injection is reduced. Even so, we still cannot guarantee the insurance pool can always cover fund withdrawal, especially in extreme market conditions. Therefore, we introduced a bond mechanism based on the insurance pool, which add an additional protection layer. Regarding the bond mechanism and corresponding details, we will disclose it in our next article. Stay tuned.

--

--

Derivation Lab
Derivation Lab

Written by Derivation Lab

Founding Team of Derify protocol. Official website: derify.finance

No responses yet