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:
| Source | Description |
|---|---|
| Trading Commission Fees | Maker and taker fees collected from all trades |
| Liquidation Clearance Fees | Fees 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:
- Loss Calculation: The system calculates the total loss including:
- Position PnL (typically negative in liquidation)
- Liquidation clearance fee
- Balance Application: The loss is applied to the user's balance
- 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
- 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
Where:
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:
- The system creates a MARKET order with IOC (Immediate or Cancel) time-in-force
- The order attempts immediate execution at the best available market price
- If fully filled, liquidation completes
Step 2: Bankruptcy Handling
If the IOC order is not fully filled (insufficient liquidity):
- Position status changes to BANKRUPT
- A scheduled task periodically retries bankruptcy positions
- Retry orders use IOC to capture any available liquidity
- The process continues until the position is fully closed
Step 3: Deficit Coverage
After position closure:
- The system calculates the final PnL
- If the user's balance is negative, the insurance fund covers the deficit
- User's balance is restored to zero
Example Scenario (GMYD/sCNH)
Scenario: Trader holds a long position that gets liquidated during a flash crash.
| Parameter | Value |
|---|---|
| Position | 1,000 GMYD Long |
| Entry Price | 2.00 sCNH |
| Liquidation Price | 1.85 sCNH |
| Margin (Isolated) | 200 sCNH |
| Liquidation Clearance Fee Rate | 0.5% |
What Happens:
- Mark price drops to 1.85 sCNH → Liquidation triggered
- Due to rapid market movement, order executes at 1.70 sCNH
Calculation:
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
| Aspect | Standard Exchange | Our Implementation |
|---|---|---|
| Fund Balance Display | Publicly displayed, real-time tracking | Revenue sources tracked but not aggregated as single display value |
| ADL (Auto-Deleveraging) | Triggered when fund depleted | Not implemented; insurance fund covers all deficits |
| Fund Injection | Liquidation profits only | Commission fees + Liquidation clearance fees |
| Coverage Scope | Limited by fund balance | Platform absorbs all bad debt |
Transaction History Types
The following transaction types relate to insurance fund operations:
| Type | Description |
|---|---|
COMMISSION | Trading fees collected (contributes to fund) |
LIQUIDATION_CLEARANCE | Liquidation fees charged (contributes to fund) |
INSURANCE_RECHARGE | Coverage of user's negative balance (fund usage) |
Summary
The insurance fund serves as the final safety net in the risk management system:
- Protection: Users are protected from debt in extreme market conditions
- Transparency: All fund operations are recorded in transaction history
- Sustainability: Commission and liquidation fees ensure fund availability
- 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.