Self-liquidation: the strategy that saves your collateral
When a lending position approaches its liquidation threshold, the default
outcome is expensive: liquidators seize collateral, sell it, and take a
penalty - value that belongs to the borrower evaporates into the liquidation
mechanism. Self-liquidation is the alternative: repay the debt yourself, sell
the collateral on the open market, and keep the spread the liquidators would
have taken. Done with flash loans, it is one transaction. Done well, it is the
difference between exiting a position and being exited from one.
The problem self-liquidation solves
The liquidation pipeline is designed for the protocol, not the borrower:
- Your position's collateral value falls toward the debt
- The protocol allows liquidators to repay part of your debt and seize
collateral plus a penalty - the liquidation bonus
- Liquidators, racing each other, sell the seized collateral into the market
- The penalty - often 5 to 15 percent of the seized value - is compensation
for their risk and speed
The borrower's collateral leaves at a discount determined by someone else's
timing. Self-liquidation reclaims that discount: if you can sell the collateral
yourself at market prices, the difference between market value and the
liquidation outcome is yours to keep.
How self-liquidation works
The classic flow, in one transaction with a flash loan:
- Detect: monitor your position's health as collateral approaches the
threshold - before liquidators arrive, not after
- Borrow: take a flash loan covering the debt you need to repay
- Sell: sell enough collateral on the open market to raise the repayment
amount - at market prices, without the liquidation penalty
- Repay: return the flash loan with its fee
- Keep: the difference between what the collateral sold for and what the
liquidation would have taken is retained
The entire sequence happens inside one transaction, so there is no window for
price movement or liquidator intervention - atomicity is the safety.
When self-liquidation makes sense
- Positions you intended to close anyway: if the exit is coming, self-
liquidation converts an unwanted liquidation into a controlled sale
- Positions near the threshold with liquidation imminent: the penalty is
certain; acting first is strictly better than being acted on
- Large or illiquid collateral: where liquidator sales would move the market
against you, your own staged sale can do better
- Positions with tax or accounting reasons to control the exit: your sale,
your timing, your records
When it does not
- Small positions where gas costs exceed the saved penalty: compute before
acting
- Collateral in thin markets: your "market price" sale may itself move the
price - the discount you save may be the slippage you create
- Positions you want to keep: self-liquidation exits the position; it is a
rescue, not a repair. If you want to keep the collateral, repaying with
fresh capital - or adding collateral - is the alternative
The execution checklist
- Monitor health factors continuously near thresholds; alerts beat refresh
- Pre-compute the flash-loan route: which market, which pair, expected
slippage
- Test the transaction on small sizes first - the flow is atomic, and a failed
route still costs gas
- Compare outcomes before acting: self-liquidation proceeds versus
liquidation outcome, including gas and slippage
The takeaway
Self-liquidation is taking back the liquidation spread: flash-borrow the
repayment, sell collateral at market, repay, keep the difference. It converts
being liquidated into liquidating - same exit, better economics, one
transaction. Monitor health, pre-compute routes, and act before the liquidators
do. The penalty you save is the clearest example in lending of mechanics
deciding outcomes - and of borrowers who read the mechanics keeping the value.