Skip to main content

Insurance fund

What is the Insurance Fund?

The insurance fund is a risk management mechanism designed to protect users from debt liability when liquidations occur under extreme market conditions.

In volatile markets, rapid price movements can cause liquidation orders to execute at prices significantly worse than the liquidation trigger price. When losses exceed the available margin, the insurance fund absorbs the bad debt, ensuring that:

  • Users are never left with negative balances or debt obligations
  • The platform maintains financial integrity without requiring users to deposit additional funds to cover deficits

How is the Insurance Fund Generated?

The insurance fund accumulates from the following revenue sources:

SourceDescription
Trading Commission FeesMaker and taker fees collected from all trades
Liquidation Clearance FeesFees charged during liquidation (calculated as: Liquidated Notional × Liquidation Fee Rate)

Note: All sCNH-margined perpetual contracts share the same insurance fund pool.

Insurance Fund Operation

When Liquidation Results in Deficit

When a position is liquidated and the execution price is worse than the liquidation price, the following occurs:

  1. Loss Calculation: The system calculates the total loss including:
    • Position PnL (typically negative in liquidation)
    • Liquidation clearance fee
  2. Balance Application: The loss is applied to the user's balance
  3. Deficit Detection: If the balance becomes negative (loss exceeds margin):
    • For Isolated Margin: The loss may exceed the position's allocated margin
    • For Cross Margin: The loss may exceed the entire wallet balance
  4. Insurance Fund Coverage: The insurance fund automatically covers the deficit:
    • User's balance is reset to zero
    • The shortfall amount is recorded as an insurance fund deduction
    • User faces no debt obligation

Formula

Deficit=max(0,Total LossAvailable Margin)\text{Deficit} = \max(0, \text{Total Loss} - \text{Available Margin})

Where:

Total Loss=Realized PnL+Liquidation Clearance Fee\text{Total Loss} = |\text{Realized PnL}| + \text{Liquidation Clearance Fee}

Liquidation Order Execution

To minimize insurance fund usage, the platform employs a strategic liquidation process:

Step 1: Initial Liquidation Attempt

When a position meets liquidation criteria:

  1. The system creates a MARKET order with IOC (Immediate or Cancel) time-in-force
  2. The order attempts immediate execution at the best available market price
  3. If fully filled, liquidation completes

Step 2: Bankruptcy Handling

If the IOC order is not fully filled (insufficient liquidity):

  1. Position status changes to BANKRUPT
  2. A scheduled task periodically retries bankruptcy positions
  3. Retry orders use IOC to capture any available liquidity
  4. The process continues until the position is fully closed

Step 3: Deficit Coverage

After position closure:

  1. The system calculates the final PnL
  2. If the user's balance is negative, the insurance fund covers the deficit
  3. User's balance is restored to zero

Example Scenario (GMYD/sCNH)

Scenario: Trader holds a long position that gets liquidated during a flash crash.

ParameterValue
Position1,000 GMYD Long
Entry Price2.00 sCNH
Liquidation Price1.85 sCNH
Margin (Isolated)200 sCNH
Liquidation Clearance Fee Rate0.5%

What Happens:

  1. Mark price drops to 1.85 sCNH → Liquidation triggered
  2. Due to rapid market movement, order executes at 1.70 sCNH

Calculation:

Position Value at Entry=1,000×2.00=2,000 sCNH\text{Position Value at Entry} = 1{,}000 \times 2.00 = 2{,}000 \text{ sCNH} Position Value at Close=1,000×1.70=1,700 sCNH\text{Position Value at Close} = 1{,}000 \times 1.70 = 1{,}700 \text{ sCNH} Realized Loss=2,0001,700=300 sCNH\text{Realized Loss} = 2{,}000 - 1{,}700 = 300 \text{ sCNH} Liquidation Fee=1,700×0.5%=8.5 sCNH\text{Liquidation Fee} = 1{,}700 \times 0.5\% = 8.5 \text{ sCNH} Total Deduction=300+8.5=308.5 sCNH\text{Total Deduction} = 300 + 8.5 = 308.5 \text{ sCNH} Net Return=200308.5=108.5 sCNH\text{Net Return} = 200 - 308.5 = -108.5 \text{ sCNH}

Result:

  • Without insurance fund: User would owe 108.5 sCNH
  • With insurance fund: User's balance reset to 0 sCNH, deficit of 108.5 sCNH covered by insurance fund

Key Differences from Standard Implementation

AspectStandard ExchangeOur Implementation
Fund Balance DisplayPublicly displayed, real-time trackingRevenue sources tracked but not aggregated as single display value
ADL (Auto-Deleveraging)Triggered when fund depletedNot implemented; insurance fund covers all deficits
Fund InjectionLiquidation profits onlyCommission fees + Liquidation clearance fees
Coverage ScopeLimited by fund balancePlatform absorbs all bad debt

Transaction History Types

The following transaction types relate to insurance fund operations:

TypeDescription
COMMISSIONTrading fees collected (contributes to fund)
LIQUIDATION_CLEARANCELiquidation fees charged (contributes to fund)
INSURANCE_RECHARGECoverage of user's negative balance (fund usage)

Summary

The insurance fund serves as the final safety net in the risk management system:

  1. Protection: Users are protected from debt in extreme market conditions
  2. Transparency: All fund operations are recorded in transaction history
  3. Sustainability: Commission and liquidation fees ensure fund availability
  4. Simplicity: Automatic coverage without user intervention

Important: The insurance fund ensures that you will never owe money to the platform due to liquidation losses. Your maximum loss is limited to your deposited margin.