Liquidation
The liquidation mechanism plays a pivotal role in margin trading, exerting a direct influence on the health and prosperity of the market.
Monitoring
Liquidations on Mount Exchange are processed through smart contracts. The monitoring process involves several key steps:
Collect Key Market Parameters: Gather essential data from the contract market, such as the maintenance margin rate.
Retrieve Active Positions: Identify the current positions held within the market.
Obtain Mark Price Data: Access real-time price information from on-chain oracles.
Evaluate Liquidation Triggers: Calculate whether the positions meet the criteria for liquidation.
Initiate Liquidation: If the conditions are met, liquidation is processed through the relevant smart contracts.
Executor
Liquidation Execution:
Upon receiving a liquidation request, an evaluation is conducted to determine if the conditions for liquidation have been met.
If the conditions are not met, a response is issued indicating that liquidation cannot proceed.
If the conditions are met, the system immediately checks liquidity availability via the Router.
If sufficient liquidity is present, the order is executed through the Router.
If liquidity is insufficient, the ADL (Auto-Deleveraging) Manager steps in to facilitate order matching across multiple counterparties, ensuring the necessary liquidity is met.
After successful liquidation, users are notified (if they have linked their email).
Rewards are distributed to those who initiated the liquidation, either in real-time or cumulatively, based on past performance.
Abnormal Liquidation
Abnormal liquidations can occur due to delays or extreme price volatility, leading to positions being liquidated at a net value that results in bad debt within the USD ledger. In such cases, corrective measures are taken:
Inject Funds from the Insurance Fund: Funds are transferred from the Insurance Fund to cover the bad debt.
Eliminate Bad Debt: Negative balances are adjusted to zero, allowing the user to resume normal trading.
Insufficient Insurance Fund: If the Insurance Fund cannot fully cover the bad debt, the following mechanism may be applied:
Proportional Splitting Mechanism: The remaining debt is distributed proportionally among traders in the pool who have made a profit, sharing the cost.
Last updated