Astros
  • Astros - Dex Aggregator
    • 🙌Introduction
    • 💡Contact Page
    • ⚒️Astros UI SDK
      • ⭐Getting Started
      • 🅰️Aggregator Components
    • 🧰Aggregator SDK
    • ⚙️Aggregator API
    • Cross-Chain Swaps SDK
      • 🚀Quick Start
      • 🪜Dive into
  • Astros - Perpetual
    • 🙌Introduction
    • 📚Tutorial
      • Deposits and Withdrawals
      • Trading
    • 📈Perpetual Trading
      • Funding
      • Margin
      • Index and Mark Price
      • Liquidation Process
      • Insurance Funds
      • ADL
      • Trading Fees
    • 👬Referral
Powered by GitBook
On this page
  • Liquidation Price Calculations
  • Perpetual Margin Level Calculation
  • Margin Modes and Liquidation Impact
  • Liquidation Outcomes at Bankruptcy Price
  1. Astros - Perpetual
  2. Perpetual Trading

Liquidation Process

PreviousIndex and Mark PriceNextInsurance Funds

Last updated 1 month ago

Astros utilizes Mark Price to minimize liquidation risks due to market manipulation or low liquidity. Liquidation occurs when the margin balance of a position reaches or falls below the maintenance margin threshold.


Liquidation Price Calculations

The liquidation price is calculated differently based on the direction of the position:

For Long Positions:

Liquidation Price=(Average Entry Price)×(1+Maintenance Margin Fraction)−Position Margin BalanceContract Size\text{Liquidation Price} = (\text{Average Entry Price}) \times (1 + \text{Maintenance Margin Fraction}) - \frac{\text{Position Margin Balance}}{\text{Contract Size}}Liquidation Price=(Average Entry Price)×(1+Maintenance Margin Fraction)−Contract SizePosition Margin Balance​

For Short Positions:

Liquidation Price=(Average Entry Price)×(1−Maintenance Margin Fraction)+Position Margin BalanceContract Size\text{Liquidation Price} = (\text{Average Entry Price}) \times (1 - \text{Maintenance Margin Fraction}) + \frac{\text{Position Margin Balance}}{\text{Contract Size}}Liquidation Price=(Average Entry Price)×(1−Maintenance Margin Fraction)+Contract SizePosition Margin Balance​

Perpetual Margin Level Calculation

To assess the current margin health of a perpetual contract position, Astros computes the margin level as follows:

\text{Perpetual Margin Level (%)} = \frac{\text{Position Maintenance Margin}}{\text{Position Margin Balance}} \times 100%

A margin level approaching or falling below 100% indicates an imminent liquidation risk.

Astros

Margin Modes and Liquidation Impact

Astros provides two distinct margin modes, each with different liquidation implications:

1. Isolated Margin Mode

In isolated margin mode, liquidation risk and consequences are confined strictly to the margin and funding fees associated with the particular position being liquidated. Other positions and balances remain unaffected.

2. Cross Margin Mode

In cross margin mode, liquidation impacts are broader. When liquidation occurs, the trader risks losing:

  • All collateral allocated.

  • Accrued funding fees associated with open positions.

  • Margins reserved for active orders (frozen margin).

  • The entirety of the available account balance.


Liquidation Outcomes at Bankruptcy Price

During liquidation at the Bankruptcy Price, two possible outcomes emerge:

  • Surplus Scenario: If liquidation occurs at a price more favorable than the bankruptcy price, excess collateral is automatically transferred into the Insurance Fund.

  • Deficit Scenario: If liquidation cannot be executed above the bankruptcy price, the resulting deficit is first covered by the Insurance Fund. However, if the Insurance Fund balance is insufficient to cover this deficit, the liquidation is further managed through the Automatic Deleveraging (ADL) mechanism, which systematically reduces other positions to restore financial stability.

📈