Liquidations
The Liquidation Engine in Stella Trade ensures the platform's solvency by liquidating under-collateralized accounts when their margin balance drops below the required maintenance margin. This process employs a Fill-or-Kill method, effectively unwinding positions using the JIT auction mechanism alongside existing order book liquidity.
Liquidation Workflow
Trigger Condition: Liquidation is triggered when the margin balance of a user or market maker falls below the required maintenance margin.
Fill-or-Kill Execution: All positions in the affected account are liquidated immediately. The system combines JIT liquidity and order book depth to ensure efficient execution.
Settlement: The proceeds from the liquidation are used to cover the shortfall, with any remaining collateral returned to the user after deducting applicable fees.
Key Formulas
Wallet Balance: Represents the total value of tokens in a user’s allocated account:
Available Balance: The funds available for opening new positions or meeting margin requirements
Maintenance Margin: The minimum margin required to maintain an open position:
Liquidation Criteria: A position is liquidated when:
Liquidation Price: Determines the price at which liquidation occurs for a specific sub-account.
Liquidation Fees
An incentive provided to the liquidator, calculated as:
Post-Liquidation Margin Refund
If any funds remain after liquidation, they are refunded to the user:
Insurance Fund
Stella Trade maintains an Insurance Fund to cover rare cases of account insolvency due to extreme market volatility or insufficient liquidity.
The fund is built from platform fees and acts as a safety net:
Protects the ecosystem from systemic risks posed by insolvencies.
If the fund is depleted, losses are socialized across the platform.
Last updated