Reya
  • Start Here
    • Why Reya?
  • REYA PRODUCTS
    • Reya DEX
      • Navigating Reya DEX
        • Dashboard: getting started
          • Creating your margin account
          • Moving funds
          • Checking your account
        • The Trading Screen
          • Trade form
          • Market Data Panel
        • LP Pool
      • Trading on Reya DEX
        • Perpetual Futures
        • Margin
        • Auto-exchange and Liquidations
        • Specifications
        • Conditional Orders
        • FlashSwap
        • Collateral liquidations
        • Settlement and cross-collateralization
      • Docs: Reya DEX REST API
      • Docs: Reya DEX WebSocket
    • Reya Network
      • The structure of Reya Network
      • The Liquidity Layer
        • Reya’s pool for perpetual futures
        • Offering liquidity in the passive pool
        • Deepdive into passive perps
        • Network Owned Liquidity
      • Derivatives Clearing
        • Automatic leveraging of PnL across instruments
        • Cross-collateralization
          • Haircuts
          • Auto-exchange conditions
          • Auto-exchange mechanism
        • Cross-margining
          • The margin system
        • The liquidation engine
          • Ranked liquidations
          • Dutch auction
          • Backstop LPs
          • Insurance Funds
          • Page 1
        • Spot markets
        • Reya Governance
      • What's the roadmap
      • Who's Behind Reya Network
    • rUSD / srUSD
      • rUSD
      • srUSD
      • srUSD How to and FAQs
  • COMMUNITY
    • Join the Reya Community
    • Incentives Overview
      • Experience (XP)
        • Technical details
      • Boosts
      • Ranks and Seasons
    • x.com
  • Technical Docs
    • Reya Python SDK
    • Contract Functions
      • Core
      • Passive Perp Instrument
      • Passive Pool
      • Oracle Adapter
    • Contract Addresses
    • Smart Contract Withdrawals
    • Audits
  • REYA RESOURCES
    • Blog
    • Beginner's Guide to Better Trading with Reya
    • Block Explorer
    • Glossary (coming soon)
    • FAQ (coming soon)
Powered by GitBook
On this page
  1. REYA PRODUCTS
  2. Reya Network
  3. Derivatives Clearing
  4. The liquidation engine

Ranked liquidations

PreviousThe liquidation engineNextDutch auction

The first level is the open bidding process, during which bidder will submit a series of volumes {Qi}\{Q_i\}{Qi​} that they are willing to take on from the liquidated account, as well as a percentage of the resulting change in LMR that they request as reward. The open competitive process should ensure that the reward parameter is optimized.

The other cornerstone for this procedure is a scoring function used for liquidation bids, which summarizes the reward parameter and the market impact. For a bid requesting volumes {Qi}\{Q_i\}{Qi​} of nnn assets for a reward parameter ddd, the score is

score({Qi},d)=1n(w(1−d)+(1−w)∑iQi×pSlippagei((Qi(Qi,max−Qi))1/2)∑iQi)\mathrm{score}(\{Q_i\},d) = \frac{1}{n}\left(w(1-d) + (1-w)\frac{\sum_i Q_i \times\mathrm{pSlippage}i\left((Q_i(Q{i,max}-Q_i))^{1/2}\right)}{\sum_i Q_i}\right)score({Qi​},d)=n1​(w(1−d)+(1−w)∑i​Qi​∑i​Qi​×pSlippagei((Qi​(Qi,max−Qi​))1/2)​)

where pSlippagei(Q)=ϕQβ/pricei\mathrm{pSlippage}_i(Q)=\phi Q^\beta/\mathrm{price}_ipSlippagei​(Q)=ϕQβ/pricei​ is the estimated percentual price slippage (using governance set parameters).

An important feature is of this scoring function is that it disincentives over-liquidations by multiplying by 1/n1/n1/n (which in practice stratifies bids according to the number of requested assets), as well as maxing out the slippage benefit at half the available volume.