Liquidations

What are Liquidations?

Liquidations play a vital role in maintaining the stability of the RateX protocol. When traders leverage their positions by depositing margin, they gain increased exposure to the underlying asset's yield. However, as market movements fluctuate, positions can experience negative unrealized PnL. This negative PnL can erode the deposited margin, potentially creating a risk for the protocol.

To ensure the system's health and protect all users, RateX employs a Collateral Ratio (CR) as a key indicator for leveraged yield trading positions. The CR reflects the health of a position and is calculated as follows:

CR=AssetValue+DepositedMarginLiabilityValueCR = \frac{AssetValue + DepositedMargin}{LiabilityValue}

Maintaining a sufficient Collateral Ratio is crucial to avoid liquidation. If the CR of a position falls below a designated threshold, known as the Maintenance Collateral Ratio (MCR), a liquidation event is triggered. This process serves to safeguard the protocol and its users from further losses.

Aftermath of Liquidation: Restoring Protocol Health

When a liquidation event is triggered due to a Collateral Ratio (CR) falling below the Maintenance Collateral Ratio (MCR), the RateX protocol's liquidation engine takes control of the position to minimize losses. This process follows a specific order to ensure the system's stability:

Step 1: Closing the Position via Market Order

The liquidation engine attempts to enter an opposite trade to the original position using a market order. This means it will buy back (for a short position) or sell (for a long position) the necessary assets to close the trader's position as quickly as possible.

After the position is closed, any remaining deposited margin is distributed. A predetermined percentage (50%) is allocated to the Insurance Fund, which serves as a safety net for the protocol. The remaining portion of the deposited margin is returned to the trader.

Step 2: Insurance Fund Intervention

If the liquidation engine cannot close the position above a specific threshold known as the bankruptcy price, the Insurance Fund steps in. To maintain protocol solvency, the Insurance Fund covers the difference between the liquidation price and the bankruptcy price. This ensures that even in unfavorable market conditions, the protocol can fulfill its obligations to other users.

Step 3: Auto-Deleveraging

In rare circumstances, if the Insurance Fund becomes depleted due to a significant number of liquidations, and there are still bad debts (uncovered losses), the next step safety net is activated. This mechanism proportionally distributes the remaining bad debts among all open positions within the protocol.

Step 4: Socialized Loss for LP

If the ADL still can’t absorb the liquidation loss, the LPs will need to cover the remaining amount.

Last updated