Protocol
Liquidations
Unhealthy positions are sold straight into HyperCore's book, and debt settles only from confirmed fills.
#The process
- The risk engine identifies an unhealthy position.
- The liquidation engine calculates the required liquidation amount.
- It evaluates available order book liquidity and estimated slippage.
- Collateral is locked on-chain with a fixed slippage bound (
beginLiquidation). - A sell order is submitted to HyperCore.
- HyperCore executes against available liquidity.
- Confirmed proceeds repay the debt (
settleLiquidation). - Remaining collateral and debt balances are updated.
- 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
| Feature | How |
|---|---|
| Partial & full liquidations | Close factor, with a full-liquidation threshold |
| Slippage protection | Bound fixed on-chain at lock time, enforced at settlement |
| Partial fills & retries | Per-leg retry with a fresh book; cancel and unlock when nothing fills |
| No duplicate execution | One open liquidation per account, single-use on-chain reference, deterministic order ids written before sending |
| Emergency procedures | Guardian emergency mode, pause flags, anyone can cancel after the deadline |
#A persisted state machine
planned → locked → executing → settling → settled
↘ cancelled | failedEach 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.