Documentation
Protocol

Liquidations

Unhealthy positions are sold straight into HyperCore's book, and debt settles only from confirmed fills.

#The process

  1. The risk engine identifies an unhealthy position.
  2. The liquidation engine calculates the required liquidation amount.
  3. It evaluates available order book liquidity and estimated slippage.
  4. Collateral is locked on-chain with a fixed slippage bound (beginLiquidation).
  5. A sell order is submitted to HyperCore.
  6. HyperCore executes against available liquidity.
  7. Confirmed proceeds repay the debt (settleLiquidation).
  8. Remaining collateral and debt balances are updated.
  9. Any eligible deficit is covered by the insurance reserve.

Submitting an order is never treated as a fill. Aethr reconciles actual execution before updating debt.

#Guarantees

FeatureHow
Partial & full liquidationsClose factor, with a full-liquidation threshold
Slippage protectionBound fixed on-chain at lock time, enforced at settlement
Partial fills & retriesPer-leg retry with a fresh book; cancel and unlock when nothing fills
No duplicate executionOne open liquidation per account, single-use on-chain reference, deterministic order ids written before sending
Emergency proceduresGuardian emergency mode, pause flags, anyone can cancel after the deadline

#A persisted state machine

text
planned → locked → executing → settling → settled
                                        ↘ cancelled | failed

Each step is written before the next begins and every external action is idempotent, so a crashed keeper resumes exactly where it stopped.

The user is never charged more collateral than the bound allows. If proceeds fall short, fewer collateral units are settled and the rest goes back to the borrower.