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 →

Bad Debt

Debt left in a lending market after the collateral behind it has been seized and sold and still did not cover it. The lenders, or the protocol's reserves, carry the loss.

A lending market stays solvent as long as every loan is worth less than the collateral behind it, and liquidators can sell that collateral in time. Bad debt is what is left when they can't: the collateral is seized and sold, and the debt is still larger than what it raised.

Someone has to absorb the difference. Depending on the design, it comes out of a reserve or insurance fund, or it is socialised across the lenders, who can no longer withdraw everything they deposited.

How markets end up with it

  • A price that doesn't move. If the oracle keeps valuing collateral at a fixed or stale price, positions that should be liquidated aren't, and the gap grows unseen.
  • Collateral bigger than its market. If a market accepts more of a token than could ever be sold in a crash, liquidations can't clear at the price the market believed. A supply cap limits this.
  • A sudden depeg. If collateral drops faster than liquidations can run, the remaining debt is bad.
  • Inflated collateral. If an attacker can raise the value the market assigns to their collateral, through a manipulable price or a donation to an exchange rate, they can borrow against value that does not exist.

Limiting it

Price collateral from a source that moves with the market and check it against a second one, cap each collateral at its real exit liquidity, stop new borrows when collateral depegs with a circuit breaker, and track exchange rates from internal accounting rather than raw token balances.

Need expert guidance on Bad Debt?

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