Pre-auditThree days of senior audit time for $1,500, credited in full toward your Zealynx audit.3 audit days, credited toward your auditSee how →

Liquidation Discount

The share of a position's collateral value a liquidator keeps as a reward for repaying its debt; some protocols raise it as the position gets riskier.

A liquidation discount, sometimes called a liquidation bonus or liquidation incentive, is the reward a lending protocol pays to whoever liquidates an unhealthy position. The liquidator repays part of the borrower's debt and receives the borrower's collateral at a price below its market value. The gap between the two is the discount, and it is what makes liquidators show up.

Without a discount, nobody would spend gas and take price risk to close a risky position, and the protocol would be left holding bad debt whenever prices fell. With one, a competitive market of liquidation bots closes positions as soon as their health factor drops below 1.

Fixed and dynamic discounts

Many protocols use a fixed discount per collateral asset, set by governance alongside its collateral factor. Others use a dynamic discount that grows as the position gets sicker, so the riskiest positions pay the biggest reward and are closed first. Some designs also auction the collateral, letting the discount be set by competition.

Euler v1 used a dynamic discount. In its Liquidation.sol, the base discount was the 2% reserves fee plus one minus the account's health score, capped at a maximum of 20%. A position just below a health of 1 paid a small discount; a deeply underwater one paid the full 20%.

When the discount becomes the exploit

A dynamic discount is sound design as long as the borrower cannot choose their own health. If a user can push their own account deep underwater on purpose, they can then liquidate it from a second account and collect the maximum discount themselves. That is a self-liquidation, and it is how the Euler Finance hack turned a missing health check into profit: the attacker donated their own collateral until the account was underwater, then bought it from themselves at the 20% cap.

When you review a liquidation design, check two things together: how the discount grows as health falls, and whether any function lets a user lower their own health without a check.

Need expert guidance on Liquidation Discount?

Our team at Zealynx has deep expertise in blockchain security and DeFi protocols. Whether you need an audit or consultation, we're here to help.

Get a Quote