Liquidations in DeFi: How They Happen and How to Avoid Them
A DeFi liquidation sells your collateral when a loan gets too risky. Learn how health factors, thresholds and penalties work, and how to avoid it.
A DeFi liquidation happens when a lending protocol sells part of your collateral to repay your loan because the loan has become too risky — typically when your collateral's value falls below a set threshold. Liquidations are automatic, run by smart contracts and third-party bots, and usually include a penalty that makes them costly for the borrower.
If you borrow on platforms such as Aave or similar lending protocols, liquidation is the main way you can lose money beyond normal price moves. The good news is that it is predictable: once you understand the numbers, you can manage the risk.
Why DeFi Loans Can Be Liquidated
DeFi lending has no credit checks or courts. Instead, protocols protect lenders by requiring borrowers to deposit more collateral than they borrow — a design explained in our guide to over-collateralization. See also: DeFi Insurance and Cover Protocols.
If you deposit $1,000 of ETH and borrow $500 of stablecoins, the loan is safe as long as ETH holds its value. If ETH falls far enough, the collateral may no longer cover the debt with a comfortable margin. Before that happens, the protocol allows others to repay your debt and claim your collateral, so lenders are not left with bad debt. Our article Flash Loans Explained expands on this point.
The Numbers That Matter
| Term | What it means | Why it matters |
|---|---|---|
| Loan-to-value (LTV) | Debt divided by collateral value | Shows how much you have borrowed relative to collateral |
| Maximum LTV | The most you can borrow against an asset | Borrowing at the max leaves no buffer |
| Liquidation threshold | The LTV at which liquidation can start | Set per asset by the protocol |
| Health factor | A ratio comparing your collateral, adjusted by thresholds, to your debt | Below 1 means you can be liquidated |
| Liquidation penalty (bonus) | Extra collateral liquidators receive | The direct cost to you |
Our guide to collateral factors and health factors explains the formulas in more depth.
A simple example
Suppose a protocol sets ETH's liquidation threshold at 80%. You deposit $1,000 of ETH and borrow $600 of stablecoins, an LTV of 60%. If ETH falls 25%, your collateral is worth $750 and your LTV becomes 80% — you have reached the threshold. A liquidator can now repay part of your $600 debt and receive the equivalent value in ETH plus a bonus taken from your collateral.
These figures are illustrative. Real thresholds and penalties differ by protocol, asset and network, and they can be changed by governance.
How a Liquidation Happens
- 1Prices move. The protocol reads collateral prices from an oracle.
- 2Your health factor drops below 1. The position becomes eligible for liquidation.
- 3Bots compete to liquidate. Liquidators monitor positions constantly and send transactions as soon as one becomes eligible.
- 4Debt is repaid, collateral is seized. The liquidator repays some of your debt and receives your collateral plus the penalty.
- 5Your position is reduced. You keep the borrowed funds and any remaining collateral; the debt is smaller.
Because bots react within seconds, you rarely get a warning from the protocol itself.
What Pushes Positions Into Liquidation
- Sharp price drops. The most common cause, especially with volatile collateral.
- Oracle updates. Prices update in steps; a jump after a quiet period can move many positions at once.
- Stablecoin depegs. If your collateral or debt is a stablecoin that loses its peg, your ratios change suddenly.
- Interest accrual. Your debt grows over time. Ignored positions slowly drift toward the threshold.
- Network congestion. During crashes, high fees and congestion can make it hard to add collateral in time.
Large waves of liquidations can push prices down further, triggering more liquidations — a dynamic explained in liquidation cascades.
Common Misconceptions About Liquidation
- "I'll get a margin call first." Unlike some brokers, most DeFi protocols do not warn you. If your position crosses the threshold, it can be liquidated within seconds.
- "I can just add collateral when it gets close." In a fast crash, prices may move faster than you can react, and network congestion can delay your transaction.
- "Liquidation only happens in crashes." Slow interest accrual on an ignored loan can be enough.
- "The displayed price is the price the protocol uses." Protocols rely on their own oracle feeds, which may differ slightly from the price on an exchange you are watching.
- "Stablecoin loans are risk-free." Depegs and rate spikes can still affect them.
What to Do If You Are Liquidated
Check your position on the protocol dashboard and a block explorer to see how much debt was repaid and how much collateral was taken. Decide whether to repay the remaining debt, add collateral or close the position entirely — do not rush back into the same leverage. Keep records of the liquidation, as some tax systems treat it as a disposal of the collateral. Rules differ by country, so check official guidance.
How to Avoid Being Liquidated
- 1Borrow well below the maximum. A larger buffer is the single most effective protection.
- 2Prefer less volatile collateral when your goal is a stable loan.
- 3Avoid looping. Repeatedly borrowing and redepositing to increase exposure magnifies liquidation risk.
- 4Set alerts. Use price alerts on your collateral, such as through your account alerts, or the protocol's own notification tools.
- 5Keep funds ready. Hold some stablecoins or collateral outside the protocol so you can repay or top up quickly.
- 6Repay gradually if prices are trending against you, rather than waiting.
- 7Understand the specific market. Thresholds, penalties and oracles differ between assets and protocols.
Bottom line
A liquidation is the protocol protecting lenders by selling your collateral when your loan becomes too risky, and it always costs you a penalty. Treat the liquidation threshold as a cliff edge, not a target: borrow conservatively, watch your health factor and keep funds ready to act. For related reading, see our guide to lending and borrowing in DeFi.
Frequently asked questions
What triggers a liquidation in DeFi?
A liquidation is triggered when the value of your collateral falls, or your debt rises, enough that your position crosses the protocol's liquidation threshold. Many lending protocols express this as a health factor dropping below 1. At that point, third-party liquidators can repay part of your debt and take some of your collateral at a discount.
Do I lose everything when I am liquidated?
Usually not. In many protocols, only part of your debt is repaid in a single liquidation, and you lose the matching collateral plus a liquidation penalty. You keep the borrowed funds and any remaining collateral. In fast crashes, though, several liquidations can happen in a row and leave very little behind.
Can borrowing stablecoins against stablecoins be liquidated?
Yes, although it is less likely because the prices usually move together. If one stablecoin loses its peg, or if interest accrues until your debt exceeds the threshold, the position can still be liquidated. Low-volatility pairs reduce risk but do not remove it.
What is a safe health factor?
There is no universal safe number. It depends on how volatile your collateral is and how closely you can monitor the position. Many cautious borrowers keep a buffer well above 1, so that a sharp price drop does not push them into liquidation before they can react. Volatile collateral needs a larger buffer.
