Verification Checklist: Lending Insolvency & Hidden Bad Debt

  • ✓ True Insolvency Buffer: Fetch on-chain LT and LB and compute Buffer = 1 - LT × (1 + LB). Long-tail collateral with a true buffer under 5% can gap straight past profitable liquidation during oracle lag.
  • ✓ DEX Liquidity Cliff Test: Sum liquidatable collateral Q_liq within a 5% drop band and simulate selling Q_liq on DEX quoters to verify PriceImpact(Q_liq) < LB - 0.5%.
  • ✓ Close Factor Jump Stress Test: Check whether HF < 0.95 or dust rules unlock a 100% close factor, doubling single-block sell pressure and triggering reflexive cascades.
  • ✓ Zero-Collateral Debt Scan: Aggregate total debt held by accounts with zero remaining collateral and compare against protocol reserves before trusting high headline utilization APY.

1. The True Insolvency Buffer: Why 90% LT Is Not a 10% Cushion

In over-collateralized lending markets such as Aave v3, Spark, and Compound v3, a position becomes liquidatable when its Health Factor HF = (Collateral × LT) / Debt < 1. For each unit of debt ΔD repaid, the liquidator seizes collateral worth ΔD × (1 + LB).

Crucially, a full liquidation clears debt with zero bad debt only while collateral value remains at or above Debt × (1 + LB)—not merely Debt. Between the liquidation trigger (Debt = Collateral × LT) and the onset of economic bad debt, the true price-drop cushion is:

// Effective Insolvency Buffer
Buffer = 1 - LT × (1 + LB)

// Case A (Blue-chip WETH): LT = 82.5%, LB = 5.0%
Buffer_A = 1 - 0.825 × 1.05 = 13.375%   // Headline 17.5%, true buffer 4.125% lower

// Case B (High-LTV LST / Long-tail): LT = 90.0%, LB = 7.5%
Buffer_B = 1 - 0.900 × 1.075 = 3.25%    // Headline 10.0%, true buffer only 3.25%

In Case B, a sharp 3.25% gap between oracle heartbeat updates pushes the vault straight past the zero-bad-debt boundary. Seizing the entire collateral stack leaves residual uncovered debt on the pool's balance sheet, and any further 4% slide erases liquidator profitability altogether.

2. Liquidation Bonus Inversion & DEX Liquidity Cliffs

Even when spot oracle prices suggest positive equity, atomic flash-loan liquidators execute only if their single-block profit equation stays positive:

// Atomic Flash-Loan Liquidator Profit Constraint
NetProfit = ΔD × LB - Slippage(ΔC) - FlashloanFee - PriorityGasFee - BuilderTip > 0
// Required condition: PriceImpact(ΔC) + ExecutionCost% < LB

Real-world DeFi bad-debt events almost always arise from two compounding microstructure mechanisms:

  • Concentrated Liquidity Cliffs: On Uniswap v3 and similar CLMMs, active LP liquidity clusters tightly within ±3% of spot. Once the first wave of liquidations exhausts that band, market depth below the cliff can drop by over 80%, spiking price impact from 0.8% to 9%+. Once slippage exceeds LB, bonus inversion occurs and bots stop bidding.
  • Aave v3's HF < 0.95 100% Close Factor Jump: Above HF = 0.95, Aave v3 caps single-transaction liquidation at a 50% Close Factor to stagger sell pressure. Below 0.95 (or under the $2,000 dust threshold), the protocol unlocks 100% liquidation. During rapid drawdowns, clustered whale accounts crossing 0.95 simultaneously double single-block sell volume, punching through DEX depth and cascading neighboring vaults into insolvency.

3. Fixed Spread (Aave) vs. Dynamic LIF (Morpho) & Bad Debt Socialization

How bad debt propagates to lenders depends strictly on protocol accounting design:

  1. Fixed-Spread Pools (Aave v3 / Compound v3): Governance sets static LB parameters. Execution is fast in deep markets, but incentives cannot self-adjust during liquidity droughts. If bad debt forms, lender balances are not immediately hair-cut; unbacked debt sits on-chain until backstopped by a Safety Module or protocol revenue, creating a classic first-mover exit race.
  2. LLTV-Scaled Incentives & Instant Socialization (Morpho Blue): Morpho Blue derives its Liquidation Incentive Factor directly from each isolated market's LLTV: LIF = min(1.15, 1 / (1 - 0.3 × (1 - LLTV))) (yielding ~4.38% bonus at 86% LLTV and ~1.68% at 94.5% LLTV). Crucially, when a borrower's last unit of collateral is seized with remaining debt, Morpho immediately writes down both totalBorrowAssets and totalSupplyAssets pro-rata—realizing the loss instantly across all suppliers in that isolated market and eliminating bank-run distortion.

4. The Hidden Trap: Unrealized Bad Debt Disguised as High Supplier APY

In pooled lending markets without instant bad-debt write-offs, unrealized bad debt creates a dangerous yield mirage. Suppose a stablecoin pool reports $10M in nominal deposits, of which $3M is uncollectible zero-collateral bad debt, $6M is healthy debt, and only $1M remains as withdrawable cash. The contract computes Utilization = ($6M + $3M) / $10M = 90%, crossing the interest-rate kink and advertising an 18%+ nominal supplier APY.

New depositors attracted by that yield inadvertently supply exit liquidity for informed lenders who withdraw the remaining $1M of real USDC—leaving latecomers holding claims backed by $3M of zombie debt. Any lending market pinned above 90% utilization with volatile or illiquid collateral requires direct on-chain bad-debt verification.

5. Executable On-Chain Verification: RPC & Quoter Commands

Before allocating capital or publishing a lending risk report, run these three direct on-chain checks using Foundry cast:

# 1. Fetch Aave v3 reserve parameters (3rd output = liquidationThreshold, 4th = liquidationBonus)
cast call 0x7B4EB56E7CD4b454BA8ff71E4518426369a138a3 \
  "getReserveConfigurationData(address)(uint256,uint256,uint256,uint256,uint256,bool,bool,bool,bool,bool)" \
  0xCollateralTokenAddress --rpc-url $ETH_RPC_URL
# Aave v3 stores liquidationBonus in bps + 10000 (e.g., 10500 = 5% bonus). Compute 1 - (LT/10000)*(LB/10000)

# 2. Simulate DEX price impact for liquidatable volume Q_liq via Uniswap v3 QuoterV2
cast call 0x61fFE014bA17989E743c5F6cB21bF9697530B21e \
  "quoteExactInputSingle((address,address,uint256,uint24,uint160))(uint256,uint160,uint32,uint256)" \
  "(0xCollateral,0xUSDC,10000000000000000000000,500,0)" --rpc-url $ETH_RPC_URL
# Compare quoted output against spot value; if PriceImpact >= LB - 0.5%, flag high bad-debt cascade risk

# 3. Check actual withdrawable ERC20 cash balance inside the pool contract
cast call 0xUSDCAddress "balanceOf(address)(uint256)" 0xaTokenPoolAddress --rpc-url $ETH_RPC_URL

Codify three quantitative risk gates from these probes:

  1. Buffer Gate: Flag uncorrelated collateral when 1 - LT × (1 + LB) < 8%, or correlated LST pairs when below 3%;
  2. Liquidity Cliff Gate: Require aggregated DEX price impact across the 10% liquidation wall to stay strictly below LB - 0.5%;
  3. Reserve Coverage Gate: If zero-collateral borrower debt exceeds 50% of accumulated protocol reserves, halt new deposits and assess withdrawal liquidity immediately.

References & Standards