Skip to content
Unimod

Liquidator

Ensures liquidity producers remain healthy, protecting suppliers from defaults.

A liquidator repays part of an unhealthy borrower's debt and seizes a corresponding slice of their LP collateral, plus a bonus. In Unimod this requires zero upfront capital and zero token approvals:

liquidate(poolId, assetIndex, borrower, seizedLp, repaidShares, profitsTo, deadline)

The Router composes the whole operation atomically: seize the LP, burn it via a proportional (price-free) removeLiquidity, use the borrowed-asset slice to repay the debt — the bonus goes to profitsTo — and return every non-borrowed-asset slice in kind to the borrower. No swap happens during a liquidation: the oracle-free model never needs to price one asset in another.

The trigger

Health is per-asset and oracle-free, read from pool balances: a position is liquidatable when some borrowed asset ii has bi>lltvsBib_i > \mathrm{lltv} \cdot s \cdot B_i. Two thresholds derive from one parameter: borrowing and collateral withdrawal use the stricter borrowLtv = lltv − 0.05, while the liquidation trigger uses lltv itself — the buffer keeps fresh max-borrowers off the liquidation edge.

The incentive

The liquidation incentive factor follows the Morpho Blue formula with deliberately gentler parameters — cursor 0.10.1 and a 10%10\% cap (vs 0.30.3 and 15%15\%):

LIF=min ⁣(1.10, 110.1(1lltv))\mathrm{LIF} = \min\!\left(1.10,\ \frac{1}{1 - 0.1\,(1 - \mathrm{lltv})}\right)

At the default lltv=0.8\mathrm{lltv} = 0.8 the bonus is about 2%2\%. The parameters can be gentle because the liquidation itself is cheap: zero-capital, atomic, and in-kind.

Restore to health, not wipe-out

Liquidation is a clamp, not a close-out: the repaid amount is capped at what brings the position back to health, and a "liquidate max" call always succeeds at exactly that amount. Combined with in-kind distribution, this removes the profit in forcing a solvent borrower under — the tilt-to-liquidate analysis behind this choice is published as an interactive notebook.