Liquidation
A liquidation occurs when a trader’s position moves against them enough that their account equity falls below the maintenance margin (maintenance margin is set to half of the initial margin at max leverage, ranging from ~1.25% at 40x to ~16.7% at 3x depending on the asset).
When this threshold is breached, the liquidation engine attempts to close the position(s) via market orders sent to the order book. These orders are for the full position size and may be fully or partially filled. If liquidation succeeds (fully or partially) such that maintenance margin requirements are met again, any remaining collateral stays with the trader.
Liquidations are based on the mark price, a blend of CEX spot prices and HyENA's internal book data, which offers a fairer, more stable reference during volatility.
As HyENA is a HIP-3 DEX, there is currently no backstop liquidation. Liquidations go directly to the order book, allowing open participation, avoiding clearance fees, and letting traders retain remaining margin. Large positions are partially liquidated (20%) first, with a 30-second cooldown before full liquidation attempts. HyENA's liquidity vault, HLPe, will endeavor to facilitate liquidations through the orderbook and distribute the PnL to HLPe depositors.
If the order book cannot absorb liquidation and losses push an isolated position value negative, Hyperliquid’s Auto-Deleveraging (ADL) is the final solvency safeguard. Users on the opposite side are ranked by unrealized PnL and leverage used - with a specific sorting index defined by Hyperliquid - and those traders’ positions are closed at the previous mark price against the underwater position.
Liquidation prices are shown when a position is opened, though they may vary slightly with funding changes or PnL fluctuations.
The formula for calculating the liquidation price is:
liq_price = price − side × margin_available / position_size / (1 − l × side)
where
l = 1 / maintenance leverage
side = 1 for long, −1 for short
margin_available depends on whether the position is cross or isolated.
Last updated