~/defi/lending $ cat likvidacii-v-lendinge-kak-ne-stat.md
Collateral liquidation: how the machine works and how to stay out of it
A lending liquidation is not a punishment but the protocol's immune system: if collateral is not sold in time, the pool is left with bad debt, and the depositors pay. Understanding the mechanics is the borrower's insurance.
How it works
Every position has a health factor - the ratio of collateral value (with haircuts) to the debt. The collateral's price falls or the debt grows (interest accrues) - HF declines. Below the threshold, the position is open to liquidation: anyone can repay part of your debt and receive the equivalent from your collateral with a bonus (usually 5-15%). Bots competing on speed do this - in volatility the clock runs in seconds.
Why people get caught
- They size for a calm market: minus 30% overnight on volatile collateral is standard crypto weather.
- They forget the debt grows: interest quietly eats the HF margin for months.
- They do not know about parameter changes: governance can tighten collateral factors - your HF falls without prices moving.
- Oracle anomalies: a brief price wick on a thin market has liquidated billions in positions across DeFi's history.
The rules
Keep HF with a margin for "minus 40% in a day"; set alerts on HF, not price; have a ready plan for topping up collateral; remember stablecoin collateral depegs too. A liquidation always costs more than timely action - the liquidator's bonus is paid by you.