#
Insurance Fund and Liquidation Account
The insurance fund is an essential component of the exchange's risk management system, serving as a financial backstop to absorb losses from liquidated positions. In the Nekuti Matching Engine, the insurance fund is implemented through a designated liquidation account—a special account that receives all liquidated positions and their residual maintenance margin balances.
#
Insurance Fund vs Liquidation Account
While the terms "insurance fund" and "liquidation account" are often used interchangeably, they can have distinct meanings depending on the exchange's implementation:
Liquidation Account: The special account within the matching engine that directly receives all liquidations. This is the operational component that the engine interacts with during the liquidation process.
Insurance Fund: The broader financial reserve system. In some implementations, the insurance fund may include:
- The liquidation account (hot wallet) managed by the engine
- A cold wallet with additional reserves not stored in the engine
- More complex multi-layered structures as the exchange's risk management needs require
For simple deployments, the liquidation account and insurance fund are one and the same. For more sophisticated operations, the liquidation account can represent the "hot" portion of a larger insurance fund structure.
#
How the Liquidation Account Works
The liquidation account is a specially designated account with unique properties:
Receives All Liquidations: When an account reaches Step 4 of the liquidation workflow, all positions and remaining balances are transferred to the liquidation account.
Receives Residual Margin: Any remaining maintenance margin balance from the liquidated account is transferred along with the positions.
No Maintenance Margin Requirement: Unlike regular trading accounts, the liquidation account has no maintenance margin requirement. This allows it to hold and work out of losing positions without triggering its own liquidation.
Permission-Based Restrictions: The liquidation account can operate under two permission modes:
- Restricted: Protective mode for production environments
- Unrestricted: Flexible mode for testing or special operations
Absorbs Losses Until Bankruptcy: The liquidation account continues to absorb losses from liquidations until its equity reaches zero, at which point Automatic Deleveraging (ADL) is triggered.
#
Liquidation Account Permissions
#
Restricted Permissions
Restricted permissions are the recommended setting for production environments. When set to Restricted, the liquidation account is protected from potentially compromised systems or operational errors:
Orders Must Be Reduce-Only: The liquidation account can only place orders with the Reduce-only flag set, preventing it from increasing positions or opening new positions.
Withdrawals Disabled: The liquidation account cannot perform withdrawals, protecting the insurance fund from being drained.
Purpose: These restrictions ensure the insurance fund can only be used to exit positions received from liquidations, not to speculate or transfer value out of the system.
#
Unrestricted Permissions
Unrestricted permissions provide full trading and withdrawal capabilities:
Use Cases:
- Testing environments where operational flexibility is needed
- Situations requiring special operations on the liquidation account from time to time
- Initial setup and configuration
Risk: The insurance fund can be drained if systems are compromised or operational errors occur. Use with caution in production.
#
Overleveraged Liquidation Account
A unique feature of the liquidation account is its ability to continue operating even when overleveraged:
No Forced Liquidation: If the liquidation account becomes overleveraged (positions exceed what its balance would normally support), it is not subject to liquidation like a regular account would be.
Can Trade Out of Positions: The liquidation account is allowed to continue placing reduce-only orders to work out of its positions, even in an overleveraged state.
Bankruptcy Triggers ADL: If the liquidation account becomes bankrupt (equity reaches zero), the system triggers Automatic Deleveraging (ADL), forcibly closing positions against other traders.
#
Liquidation Fees
The liquidation process involves special fee categories distinct from regular trading fees:
Fee Recipient: Both liquidation maker and taker fees are paid to the exchange's designated fees account.
Fee Waivers: If the insurance fund has insufficient equity to pay liquidation fees, these fees are automatically waived to prevent the insurance fund from going negative on fees alone.
These specialized fee categories allow exchanges to configure appropriate incentives and revenue structures for liquidation events, separate from normal trading activity.
#
Reference
#
API Endpoint
#
Configure Liquidation Account
Set or update the designated liquidation account and its permissions.
POST /ExchangeWideControls/LiquidationAccount?account={accountId}&permissions={permissionLevel}
Parameters
Example
POST /ExchangeWideControls/LiquidationAccount?account=100&permissions=Restricted
This configures account 100 as the liquidation account with restricted permissions, ensuring it can only place reduce-only orders and cannot perform withdrawals.
Response
Returns confirmation of the liquidation account configuration.
#
Notes
One Liquidation Account Per System: Only one account can be designated as the liquidation account at a time. Setting a new liquidation account replaces the previous designation.
Monitoring: Exchanges should actively monitor the liquidation account's balance and positions. Received positions should be closed quickly to prevent further losses from accumulating.
Cold Wallet Integration: For exchanges maintaining cold wallet reserves as part of their insurance fund, establish procedures to periodically transfer funds from cold storage to the liquidation account to maintain adequate buffer against market volatility.
Production Recommendation: Always use
Restrictedpermissions in production environments to protect against system compromise or operational errors.Related Documentation:
- See Liquidation Workflow for how accounts are liquidated and transferred to the insurance fund
- See Automatic Deleveraging (ADL) for what happens when the insurance fund becomes insolvent
- See Liquidation Strategy for how multi-instrument liquidations are prioritized