How Liquidation Actually Works in DeFi
If you've deposited into a lending protocol, your capital is being lent to borrowers. But what happens if a borrower can't pay you back? What if the value of their collateral drops below what they owe?
This is where liquidation comes in. It's the mechanism that protects your deposits—and understanding how it works is essential for anyone providing liquidity in DeFi.
The Basic Problem
Lending protocols let users borrow assets by posting collateral. You want to borrow $1,000 USDC? Post $1,500 worth of ETH as collateral. This approach is called overcollateralization, and it's used to create a buffer: if ETH drops in price, there's still enough collateral to cover the loan.
But what if ETH keeps dropping? At some point, the collateral might be worth less than the debt. If that happens and nothing intervenes, the borrower could simply walk away—keep the borrowed USDC, abandon the now-worthless collateral, and leave lenders holding the loss.
Liquidation prevents this. It's the process of closing out a borrower's position before losses can reach lenders.
How Liquidation Works in Existing Protocols
Protocols like Aave and Morpho use a metric called the loan-to-value (LTV) ratio to track how safe a position is.
Loan-to-value (LTV) = Debt Value / Collateral Value
When you first borrow, your LTV should be lower—let’s say, 67% (i.e., your loan is worth 67% of the value of your collateral). As the value of your collateral drops or your debt grows from accrued interest, the LTV increases.
When the health factor reaches the protocol’s LTV threshold, the position becomes liquidatable.
A Simple Example
- You deposit $1,500 worth of ETH as collateral
- You borrow $1,000 USDC
- Your loan-to-value (LTV) ratio: $1,000 / $1,500 = 67%
Let’s assume the protocol's liquidation threshold is 80%—meaning if your LTV rises above 80%, your position becomes liquidatable.
Now ETH drops 20% in value:
- Your collateral is now worth $1,200
- Your debt is still $1,000
- LTV: $1,000 / $1,200 = 83%
Your LTV exceeds the 80% threshold. Your position is now liquidatable.
What the Liquidator Does
The liquidator repays your debt and receives your collateral in return—plus a bonus (let's say 5%) for their trouble.
- Liquidator repays your $1,000 debt
- Liquidator receives $1,000 worth of ETH + 5% bonus = $1,050 worth of ETH
- Liquidator's profit: $50
After liquidation:
- Your remaining collateral: $1,200 - $1,050 = $150
- Your remaining debt: $0
Your debt is cleared. You lost most of your collateral, but you still have $150—better than owing money you can't repay. The liquidator made $50. Lenders got their $1,000 back. The system worked.
Who Actually Performs Liquidations?
Here's something that surprises many newcomers: anyone can liquidate a position. There's no special role or permission required.
Liquidations are performed by liquidators—independent actors (often automated bots) who monitor the blockchain for positions that have become unhealthy. When they find one, they step in and close it.
Why would someone do this? Because they get paid. Liquidators receive a bonus—typically 5-10% of the collateral they help recover. This incentivizes a competitive ecosystem of liquidators constantly scanning for opportunities.
When a liquidator executes a liquidation:
- They repay some or all of the borrower's debt
- They receive an equivalent amount of the borrower's collateral, plus a bonus
- The borrower's position is closed (or reduced)
In practice, protocols set liquidation thresholds to ensure liquidation happens while there's still a buffer—so the collateral typically exceeds the debt when liquidation occurs.
"What If the Price Drops 100% Before Liquidation?"
This is a common question, and it reflects a reasonable concern: what if prices move so fast that liquidators can't act in time?
The short answer: this scenario is essentially impossible for established assets.
On Ethereum, a new block is produced roughly every 12 seconds. Liquidators are monitoring positions constantly and can execute liquidations within a single block of a position becoming unhealthy. For a liquidator to miss their window, the price would need to move from "healthy" to "worthless" in under 12 seconds.
For major assets like ETH, this doesn't happen. A 10% drop in minutes would be an extreme market event. A 100% drop—the asset going to zero—in seconds is not realistic for any asset with real liquidity and market depth.
Could a small, illiquid token drop 100% instantly? Theoretically, yes. This is why protocols are careful about which assets they accept as collateral. Assets with thin liquidity or high manipulation risk typically have lower loan-to-value ratios or aren't accepted at all.
The combination of conservative collateral requirements, fast block times, and competitive liquidators means that in practice, liquidations happen reliably.
How Flux Does It Differently
The liquidation mechanics in protocols like Aave protect lenders from borrower default. But in Flux, the relationship is different. Managers aren't just borrowing to hold a given token—they're actively deploying capital into strategies on behalf of LPs.
This changes the risk profile, and Flux's liquidation system reflects that. Flux’s innovation is that the vault is still the custodian of the funds that are deployed to strategies, no matter how complex the strategy. This is what enables liquidations in Flux: the vault controls the assets so they can be unwound and sent to the liquidator before the manager becomes insolvent.
The Manager's Bond
Every Flux manager must post a bond—their own capital that sits as first-loss protection. The required bond size is configured by the curators of each Flux vault, but for this explanation let’s assume the bond is typically 20% of the capital the manager wants to borrow.
Instead of an LTV ratio, Flux uses a Health Ratio to assess when positions should become liquidatable. While this is fundamentally similar to the LTV ratio used in most protocols, it also includes the manager’s bond when assessing the health of a position.
Health Ratio = Total Position Value / True Debt
Where Total Position Value = Bond + Working Capital + All Strategy Positions
A worked example:
- Manager posts a $20,000 bond (sits idle in the vault)
- Manager borrows $80,000 from the vault
- Manager deploys the $80,000 into a strategy
- Total Position Value: $20,000 (bond) + $80,000 (strategy) = $100,000
- True Debt: $80,000
- Health Ratio: $100,000 / $80,000 = 1.25
The manager is healthy. Time passes. The strategy loses value and interest accrues:
- Bond: $20,000 (unchanged—it's idle)
- Strategy positions drop from $80,000 to $70,000
- Total Position Value: $20,000 + $70,000 = $90,000
- True Debt: $80,000 (principal) + $2,000 (accrued interest) = $82,000
- Health Ratio: $90,000 / $82,000 = 1.10
If the liquidation threshold of this Flux vault is 1.10, this position is now liquidatable.
What Happens During Liquidation
Liquidating a Flux manager is slightly more involved than liquidating a borrower on Aave. On Aave, the collateral is just sitting there—tokens in a contract. The liquidator repays debt, seizes tokens, done.
In Flux, the manager has deployed capital into active positions—maybe they're providing liquidity somewhere, or holding a perp position on another protocol. These positions need to be unwound before the collateral can be recovered.
When a liquidator calls liquidate(), they receive temporary control of the manager's position. Inside the liquidation callback, they:
- Close out the manager's strategy positions (withdraw liquidity, close perps, etc.)
- Convert everything back to the base asset
- Repay the debt to the vault
- Keep the excess as profit
This adds complexity, but it also creates opportunity. Liquidators who can efficiently unwind positions and find the best routes to convert assets back to the base asset can capture more profit.
The math:
- Liquidator repays the $82,000 debt
- Liquidator receives $82,000 + 5% bonus = $86,100 worth of collateral
- Liquidator's profit: $4,100
- Manager's remaining collateral: $90,000 - $86,100 = $3,900
The manager started with a $20,000 bond. After liquidation, they're left with $3,900. They lost $16,100—but they didn't lose everything. The strategy underperformed, liquidation closed the position before it got worse, and the manager walked away with a portion of their capital.
Meanwhile, LPs received full repayment of the $82,000 debt. The manager's bond absorbed the loss.
The Key Differences
One technical difference worth noting: Flux allows capital-free liquidations. In protocols like Aave, a liquidator typically needs to supply the capital to repay the borrower's debt (or use a flash loan). In Flux, liquidators can borrow from the vault within the liquidation transaction itself, use the seized collateral to repay, and pocket the difference—no upfront capital required.
This lowers the barrier to becoming a liquidator and ensures more competition, which means faster liquidations and better protection for LPs.
Why This Matters for LPs
As an LP, you're trusting the system to protect your deposits. Liquidation is the last line of defense—the mechanism that steps in when a position goes bad.
In standard lending protocols, you're protected by overcollateralization and timely liquidation. In Flux, you have an additional layer: the manager's bond. Before any loss reaches you, the manager's own capital is consumed.
This doesn't eliminate risk—bad debt can still occur in extreme scenarios. But it changes the math. The manager has skin in the game, and that skin gets liquidated first.