CometDocs
Open app
Contents

Protocol

Liquidations

Liquidation is open to anyone. An account is liquidated by repaying its debt for its collateral; a range or perp is closed through its pool once its margin ratio reaches maintenance.

When liquidation opens

WhatMeasured byLiquidation opens
Margin accountHealthBelow 1
SOL/USDC leveraged rangeMargin ratioBelow 10.0%
JitoSOL/SOL leveraged rangeMargin ratioBelow 6.0%
SOL-PERPMargin ratioBelow 5.0%
JITOSOL-SOL-PERPMargin ratioBelow 2.5%

Liquidating an account

A liquidator repays part of one of the account’s borrows and receives the account’s collateral in return, worth the amount repaid plus the collateral reserve’s liquidation bonus.

  • One call repays up to 50% of a borrow. A borrow worth less than 100 USDC can be repaid in full.
  • The liquidator chooses which borrow to repay and which deposit to receive.
  • Each call raises the account’s health; liquidation stops once it is back to 1.

For example, repaying 500 USDC against SOL collateral, whose bonus is 5%, returns 525 USDC of SOL.

Liquidating a position

A range or perp at maintenance is closed whole, with its own tokens. The liquidator brings no capital.

  1. 1

    Anyone calls the liquidation

    The program checks the margin ratio against the oracle price.

  2. 2

    The pool unwinds the position

    A range’s liquidity is removed. Held tokens are swapped into the tokens owed.

  3. 3

    The reserve is repaid

    Debt and accrued interest return to Lend.

  4. 4

    The liquidator is paid

    A fee on the position’s value, taken from the remaining margin.

  5. 5

    The owner keeps the rest

    What is left returns to the owner’s account as a deposit.

MarketLiquidator’s fee
SOL/USDC ranges and SOL-PERP1.0%
JitoSOL/SOL ranges and JITOSOL-SOL-PERP0.5%

The backstop

Each reserve keeps a backstop balance, built from 20% of its reserve factor income. When a liquidated position’s tokens repay less than it owes, the backstop pays the reserve the difference, and the value of suppliers’ shares is unchanged.

Running a liquidator

Liquidation needs no permission and no registration. A liquidator reads accounts and positions, computes health and margin ratios from the same oracle prices the program uses, and sends liquidate_account or liquidate_position.

Account liquidations need the token being repaid. Position liquidations need only the transaction fee. Both instructions are on the Program reference.