Collateral and liquidation: the pawn machine sells your gold at 1, and pays a stranger to do it
In DeFi lending, your collateral is valued every moment against your debt. When the health factor drops below 1, anyone can repay part of your loan and take some of your collateral at a discount, and that discount is your loss.
The pawn machine at the edge of the boomtown has a scale inside. Every time the price of gold changes, it weighs your nugget again and compares it with what you owe.
As long as the nugget is heavy enough, nothing happens. The moment it isn't, the machine doesn't call you. It opens a side door and lets any passer-by pay off part of your debt and walk away with some of your gold, at a discount.
That's liquidation in DeFi. Collateral is watched by code, the trigger is a number called the health factor, and the person who pulls the trigger gets paid from your side of the table.
What it is
Collateral is what you lock up to borrow. In a DeFi lending protocol it stays in the contract while the loan is open, and you can't move it until you repay.
The health factor is the machine's scale. Aave's documentation says it "compares the liquidation-weighted collateral to the debt" and that "A health factor below 1 makes the position eligible for liquidation" (Aave). In its developer guide, the weighting is each asset's liquidation threshold: your collateral's value times that percentage, divided by your total debt (Aave).
The liquidation threshold is the share of the collateral's value the machine counts. A threshold of 83% means each 100 dollars of collateral supports at most 83 dollars of debt before the health factor reaches 1.
How it works
A worked example. The ether price of 2,000 dollars is an assumption, and so are the settings: a liquidation threshold of 83% and a liquidation bonus of 5%, round numbers in the range lending markets use. Each real asset has its own values, set by the protocol's governance.
The loan. You lock 10 ether, worth 20,000 dollars, and borrow 10,000 dollar stablecoins.
The health factor. 20,000 times 83%, divided by 10,000, is 1.66. Comfortable.
The danger price. The health factor hits 1 when 10 ether times the price times 83% equals 10,000. Solve it: 10,000 divided by 8.3 is about 1,204.82 dollars. Below that, the side door opens.
The fall. Ether drops to 1,200 dollars. Your collateral is worth 12,000. 12,000 times 83%, divided by 10,000, is 0.996. Below 1.
The liquidation. In Aave V3, if the health factor is only a little below 1, "only a maximum of 50%" of the debt can be repaid in one call; below a lower cut-off, 100% (Aave). A liquidator repays 5,000 of your stablecoins. In return, Aave's guide says liquidators "receive discounted collateral in return (also known as the liquidation bonus)". With a 5% bonus, they take 5,000 times 1.05, which is 5,250 dollars of ether: 4.375 ether at 1,200 dollars.
What's left. You have 5.625 ether, worth 6,750 dollars, and 5,000 of debt. Your health factor is back up to about 1.12. You've kept your loan, but you paid 250 dollars, about 0.21 ether, to a stranger for the privilege.
The machine never asked you. You could have avoided it by repaying some debt or adding collateral before the price got there.
Why it matters
Liquidation is what makes lending without names possible. The protocol doesn't need courts or debt collectors, because a crowd of liquidators competes to close bad loans first. The bonus is their wage. Aave's overview puts the deal plainly: a liquidator "can repay a portion of the debt and receive collateral with a liquidation bonus" (Aave).
The price comes from an oracle, a feed that tells the contract what ether is worth. If that feed is wrong, or slow in a crash, liquidations can be too late for the protocol or unfair to you. The article on oracles covers what can go wrong there.
And liquidations feed on each other. When many loans hit 1 together, liquidators sell the collateral they collect, pushing the price lower and tipping the next loans over. The scale weighs everyone at once.
Rules differ between protocols and versions. Aave V4's documentation, for example, says "liquidation bonuses follow a Dutch auction where lower health factors result in higher liquidation bonuses" (Aave V4). Read the rules of the machine you actually use.
Where people get it wrong
- "I'll get a warning first." The contract sends nothing. Some apps send alerts; the protocol doesn't wait for you to read them.
- "Liquidation means losing everything." Usually only part of the collateral is sold, but you lose the bonus on every sale, and repeated liquidations add up.
- "A health factor of 1.1 is safe." With ether as the only collateral, 1.1 means a fall of about 9% in its price triggers liquidation.
- "Stablecoin debt is stable." The debt is stable. The collateral isn't, and the gap between them is your health factor.
Know your danger price
Before you borrow, work out the price at which your health factor hits 1: debt divided by the amount of collateral times its threshold. Write it down. Then decide which price you'll act at, well above it, by repaying or adding collateral.
If you can't name that price, the liquidators can, and they're watching closer than you are.
Frequently asked questions
What is the health factor in DeFi lending?
The health factor compares your collateral, weighted by each asset's liquidation threshold, with your debt. Above 1 your loan is safe from liquidation; below 1 anyone can liquidate part of it.
What is a liquidation threshold?
It's the percentage of a collateral asset's value that counts towards the health factor. With a threshold of 83%, 10,000 dollars of collateral supports up to 8,300 dollars of debt before liquidation can start. Each asset has its own threshold, set by the protocol's governance.
What happens when a DeFi loan is liquidated?
A liquidator repays part of your debt and receives some of your collateral, plus a bonus, usually a few percent. Your debt falls, but you lose more collateral than the debt that was repaid. In Aave V3, up to 50% of the debt can be repaid in one go when the health factor is just below 1.
How can I avoid liquidation?
Borrow well below the limit, watch your health factor, and repay part of the loan or add collateral when the price moves against you. Work out in advance the price at which your health factor reaches 1. Price feeds and network congestion can make last-minute rescues fail.
Who are liquidators?
Anyone who calls the protocol's liquidation function, usually automated programs run by traders. They compete to close unhealthy loans first because they earn the liquidation bonus.

