DeFi

Bad Debt

Bad debt is debt a protocol cannot fully recover from collateral, liquidations, reserves, insurance, or backstop mechanisms.

Bad debt is money the protocol is owed but cannot realistically collect.

Bad Debt Explained in Detail

Bad debt appears when a borrower's debt is larger than what the protocol can recover. The gap may come from collateral price drops, failed liquidations, stale oracles, interest accrual, or bad accounting.

Reserves or insurance may cover the gap, but the debt is still a protocol loss.

Smart contract example

recoverable collateral + reserves < outstanding debt

That shortfall is the core bad debt condition.

Bad Debt in Auditing

Bad debt is a solvency failure. It can hurt lenders, drain reserves, break accounting, or force governance intervention.

Auditors test whether allowed protocol states can create unrecoverable debt.

Red flags in code

  • Liquidation paths revert under stress.

  • Loan-to-value or collateral parameters are too aggressive.

  • Stale or manipulated oracle prices are accepted.

  • Bad debt is not tracked per market or asset.

  • Interest accrues without rechecking solvency-sensitive flows.

How to test or review it

  • Simulate price crashes, full utilization, and reserve depletion.

  • Test liquidations at close-factor and dust boundaries.

  • Mock stale, wrong, and extreme oracle prices.

  • Include non-standard collateral behavior when supported.

  • Add invariants around assets, debt, reserves, and recoverable collateral.

Sources