LogoLogo
  • 👋Welcome to Zeta
  • The Zeta DEX
    • 🔗Official Links
    • 📚Learn how to trade on Zeta
      • 🎓Introduction to Perpetuals
      • 💸Compatible Wallets
      • 📖Getting Started on Zeta
      • ✅Order Types
      • 💟Margin Account Parameters
      • 📑Asset Parameters
      • ⚖️Funding Rates
    • 🔧Trading Specifications
      • Fee Tiers
      • Delisting Process
    • 🏗️Exchange Architecture
      • Margin Accounts
      • Margin System
        • Collateral Framework
        • Liquidations & Insurance
          • Insurance Fund
          • Socialized Loss
      • Oracles
      • Orderbook & Matching Engine
      • Trigger orders
      • Trading Mechanism
      • Perpetual Funding System
    • 📱Mobile is LIVE !
    • 🌉Bridging Guide
      • 💱From Exchanges
      • ⛓️From Other Chains
  • Rewards Programs
    • 🪙$ZEX
      • 🪙Staking
        • Staking $ZEX: Step-by-Step Guide
    • 💱Trading Rewards Program
      • Z-Score Active Boosts
        • 🎁Z-Loot
      • 🥩Stakers' Boosted Trading Rewards
      • $BERA Listing (Live)
      • 🗃️Ended Trading Campaigns and Boosts
        • 🪐Jupiter x Zeta (Finished)
        • 1️⃣Season 1 (Finished)
          • 1️⃣Z-Score Season 1
            • 👥NFT Community Partners
          • ⚡S1 Zeta Cards
        • 2️⃣Season 2 (Finished)
          • 2️⃣Z-Score Season 2
            • 🍴Bitcoin Halving (Finished)
            • 🐶$WIF Listing (Finished)
            • 🔴$RNDR Listing (Finished)
            • ⬛$TNSR Listing (Finished)
            • 🔮Pyth Stakers (Finished)
            • 🟥Backpack Boost (Finished)
            • 🏁AssetDash Elements (Finished)
          • ⚡S2 Zeta Cards (Finished)
          • 🎉Community Airdrop (Finished)
        • $POPCAT Listing (Finished)
        • 👯Referral Z-Score Boost (Finished)
        • $EIGEN Listing (Finished)
        • 🟡$DBR Listing (Finished)
        • 🟡$GOAT Listing (Finished)
        • 🟪$DRIFT Listing (Live)
        • 🟪$PNUT Listing (Finished)
        • $PENGU Listing (Finished)
        • $TRUMP Listing (Finished)
    • 🔒Final Epoch
    • 🚰Maker Rewards Program
    • 👨‍👩‍👦‍👦Referrals Program
      • Genesis Epoch Referral Boost (Finished)
      • Breakpoint Referral Boost
    • 🫂Content & Community Programs
      • Creators Program
      • Community Referral Program
  • Build with Zeta
    • 💽SDKs
      • 🐍Python SDK
        • Market Making Bot
      • 🧱Typescript SDK
        • 📚Examples
          • 👶Basic example
          • ⚙️Cranking
          • 🌊Liquidator
          • 🚅Subscription
          • 📬Versioned Transactions
    • 😴REST Data API
    • 💥Program ABI
    • 🎨Brand Assets
      • 📣Brand Book
      • 📰Media Kit
      • 🎨Logo & Visual Guidelines
  • Zeta X
  • Zeta Node
    • 🌐Validator Details
  • Legal
    • Terms and Conditions
    • Staking Terms and Conditions
    • Privacy Policy
    • Location Restrictions
    • TradingView
    • Audit Reports
  • Educational Resources
    • 🆕New to Solana? Start Here!
    • 🆘Support
Powered by GitBook
On this page

Was this helpful?

  1. The Zeta DEX
  2. Exchange Architecture
  3. Margin System

Liquidations & Insurance

An important component of a robust margining system is liquidation to ensure that one trader does not adversely impact other traders or the security of the platform.

Liquidation

When accounts do not have sufficient capital they will need to be liquidated to ensure that the system at large does not become bankrupt and to ensure that risks are isolated to individual user accounts where possible. The element underpinning this process is the margin check:

AB+UP−IM+min(0,IPnL)>0AB + UP - IM +min(0, IPnL) > 0AB+UP−IM+min(0,IPnL)>0

where:

  • AB = Account Balance

  • UP = Unrealised PnL

  • IM = Initial Margin

  • IPnL = instantaneous PnL from execution

If a user fails the margin check, the liquidation process will begin:

  • Step 1:

    • 3rd party liquidators can cancel all open orders on a person’s book. The user will not be able to send orders during this time until all orders are cancelled.

  • Step 2:

    • If the user is still below maintenance margin after the above cancels, they are able to be liquidated by sending a liquidation instruction. This instruction specifies a particular margin account, the market’s position and the size to be liquidated.

Upon a successful liquidation, the liquidator will trade with the liquidatee at the current mark price stored by Zeta, as well as gain a fixed % of the liquidatee’s collateral put up for maintenance margin as a reward. This reward is currently set at 65% of the maintenance margin, with 30% going to the liquidator and 35% going to the insurance fund.

Note: Liquidation is a risky endeavour and not guaranteed to be profitable.

PreviousCollateral FrameworkNextInsurance Fund

Last updated 1 year ago

Was this helpful?

Liquidation is a permissionless instruction, open to anyone. Check out our naive liquidator example that shows you how to check for positions at risk and liquidate their positions.

🏗️
here