Stella
  • Overview
    • 🌠Getting Started
  • STELLA TRADE
    • 🌐Overview
    • 📚Perpetual Futures 101
  • 🏗️Architecture
  • 🔮Price oracles
  • ⚠️Liquidations
  • ⚙️Platform Specifications
  • 🔌Integration Guide
  • STELLA YIELD
    • ❓How Stella Works?
    • 🤝Pay-As-You-Earn (PAYE) Model
    • 🚀Stella Strategy
      • Why Stella Strategy is Unique?
      • Strategy Type
      • Asset Type
      • Strategy Exposure
      • Collateral Factor
      • Borrow Factor
      • Credits
      • Price Range & Liquidity Shape
      • Liquidation
        • Liquidation Discount
        • Post-Liquidation Value
        • Pendle/Penpie Liquidation Price
      • Price Impact
      • Leverage
      • Supported Strategies
    • 🏦Stella Lend
      • Why Stella Lend is Unique?
      • Pool Type
      • Supported Assets
      • Yield Vault
      • Withdrawal Delay
    • 💰Yield Calculation
      • PAYE Graph
      • Yield Sharing
    • ⚠️Risk Framework
      • Precautionary Measures
      • Slow Mode
  • App Guide: Stella Yield
    • Walkthrough Stella APP
    • Open a position
    • Close a Position
    • View Your Position
    • Add/Remove Extra Collateral
    • Claim Assets from Liquidated Position
    • Deposit & Withdraw Assets
  • Developers
    • 📃Contract Addresses
      • Core
      • Stella Strategy
      • Stella Lend
      • Oracle
    • 📜Contract ABI
    • ⚙️API
  • Tokenomics
    • 🎯ALPHA Token
    • ⚡Staking & Protocol Fees
    • 👥Token Distribution
  • Additional Information
    • 🟠About Stella
    • 🔎Audit Reports
    • 📣Community Links
    • 📸Media Kit
    • ❔FAQ
    • 📖Terms of Use
Powered by GitBook
On this page
  • Liquidation Workflow
  • Key Formulas

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

  1. Trigger Condition: Liquidation is triggered when the margin balance of a user or market maker falls below the required maintenance margin.

  2. 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.

  3. 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:

  WalletBalance = TotalNetDeposit + TotalRealizedPnL - TotalCommissionFees

Available Balance: The funds available for opening new positions or meeting margin requirements

AvailableBalance = WalletBalance - FreezeAmount + UnrealizedPnL

Maintenance Margin: The minimum margin required to maintain an open position:

MaintenanceMargin = PositionValue × MaintenanceMarginRate

Liquidation Criteria: A position is liquidated when:

AvailableBalance < MaintenanceMargin

Liquidation Price: Determines the price at which liquidation occurs for a specific sub-account.

Liquidation Fees

An incentive provided to the liquidator, calculated as:

LiquidationFee = LiquidationClearanceRate × LiquidationNotionalValue
LiquidationNotionalValue = Position size × Mark price

Post-Liquidation Margin Refund

If any funds remain after liquidation, they are refunded to the user:

PostLiquidationMarginRefund = max(MarginBuffer - LiquidationFee, 0)
MarginBuffer = Remaining funds after deducting unrealized PnL
LiquidationFee = Liquidator’s incentive

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.

PreviousPrice oraclesNextPlatform Specifications

Last updated 7 days ago

⚠️