Handling Bad Debt: Morpho Vault V2
Overview
This guide is designed for Morpho Vault V2 curators and explains how bad debt is handled through the vault's loss socialization mechanism.
Bad Debt Recap
As a reminder, the health of a borrower's position can be divided into three main categories, with LTV being Loan-To-Value, LLTV being the Liquidation Loan-To-Value (one of the market parameters) and LIF the Liquidation Incentive Factor:
- If LTV < LLTV, the position is healthy, and the borrower cannot be liquidated.
- If LLTV < LTV ≤ 1/LIF, a liquidator can repay part or all of the user's debt and seize part or all of its collateral.
- If 1/LIF < LTV, a liquidator can seize all the collateral by repaying only a share of the debt. There is no incentive for the liquidator or borrower to repay the remaining debt. The latter is commonly referred to as bad debt.
Under situation 3, bad debt can be categorized into two types:
- Unrealized when the liquidation has not occurred yet.
- Realized when the liquidation has occurred, and the entire collateral position is seized.
How Morpho Vault V2 Handles Bad Debt
Morpho Vault V2 implements an automatic loss socialization mechanism. When bad debt is realized in an underlying market or adapter, the loss is detected and reflected in the vault's share price.
Loss Detection
Each adapter reports the current value of its allocated assets via a realAssets() function. Unrealized bad debt is still counted at full value:
- In
MorphoMarketV1AdapterV2,realAssets()is the adapter's expected supply assets in each market, interest included. Unrealized bad debt keeps earning interest, and the value reported by the adapter only decreases when bad debt is realized, that is, when a liquidation seizes all of the borrower's remaining collateral and the market books the residual debt as a loss to its suppliers. MorphoVaultV1Adapteralso counts unrealized bad debt at full value, because the underlying Morpho Vault V1 values its market positions at expected supply assets. For Morpho Vault V1.1, realized losses don't reach the Morpho Vault V2 share price either; see the Morpho Vault V1.1 Adapter Caveat.
Loss Realization
During interest accrual, the vault compares the reported real asset value to its internally tracked total:
- If
realAssetshas dropped below the previously recordedtotalAssets, the vault updates its accounting downward. - Interest calculation uses
zeroFloorSub(), which floors at zero, meaning no negative interest is generated. - The vault's
totalAssetsis updated tomin(realAssets, maxTotalAssets).
Automatic Socialization
Losses are socialized proportionally because share value is determined via convertToAssets(), which computes shares × (totalAssets + 1) / (totalSupply + virtualShares). When totalAssets decreases, so does the value returned by this function. When totalAssets decreases:
- Each share is worth less.
- No shares are burned - all shareholders absorb the loss equally.
- Users who entered before the loss event bear the loss proportionally to their share of the vault.
Unrealized Bad Debt
Until someone liquidates a position, its bad debt is not realized. The position keeps accruing interest, which lifts the adapter's realAssets() and the vault's share price, even though that interest will never be repaid.
This has two effects on vault users:
- New vault users enter at an inflated share price and inherit part of the eventual loss when the bad debt is realized.
- Early withdrawers leave at the inflated price, taking interest that was never backed by recoverable assets.
To stop unrecoverable interest from lifting the share price, set the vault's maxRate to 0. This stops yield accrual for the whole vault, including healthy allocations, and it does not remove interest that has already accrued, so act early. See Phantom Interest Accrual: Freeze the Share Price in the emergency procedures.
The Morpho app flags this situation with the bad_debt_unrealized warning, at RED level when a market's unrealized bad debt reaches 5% of its total supply assets and at least USD 100. For Morpho Vault V2, the warning is also shown at vault level when the vault's exposure to flagged markets exceeds 10% of its total assets. See the warning thresholds.
Liquidation Coverage
Anyone can liquidate an unhealthy position, but no one has to. Positions can stay unliquidated, and their bad debt unrealized, when:
- The position is dust, too small to be worth liquidating.
- Gas costs more than the liquidation incentive.
- No swap route is deep enough to sell the seized collateral.
- The oracle prices the collateral above its market price by more than the liquidation incentive, so the collateral a liquidator receives is worth less than the debt they repay.
We recommend running your own liquidation bots and forcing the realization of all bad debt in the markets your vault allocates to, even on dust positions, so that none of them can grow indefinitely. Morpho maintains an open-source Blue liquidation bot you can start from, and the liquidation guide explains the mechanism. The Liquidation App can be used for manual liquidations as a backup.
Important Considerations for Curators
Management Fees During Loss Periods
Management fees continue to accrue even during periods where losses are realized. Curators should be aware that fees are computed before loss realization in the interest accrual flow.
Morpho Vault V1.1 Adapter Caveat
Morpho Vaults V1.1 do not realize bad debt internally. If a Morpho Vault V2 supplies to a Morpho Vault V1.1 via a MorphoVaultV1Adapter, the corresponding losses from that allocation will not be reflected in the Morpho Vault V2's share price. Curators should account for this when allocating to Morpho Vaults V1.1.
Flash Loan Protection
Morpho Vault V2 includes safeguards against share price manipulation around loss realization events. Losses are only accounted for once per transaction, preventing attackers from shorting shares around a known loss event.