Skip to content

Managing Bad Debt: How-to Guide

Overview

This guide is designed for Morpho Vaults curators and aims to provide a methodical approach to identifying, processing, and resolving bad debt within the Morpho ecosystem. It clarifies the concepts of unrealized and realized bad debt and outlines the technical and operational steps required for effective remediation.

Bad Debt Overview

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:

  1. If LTV < LLTV, the position is healthy, and the borrower cannot be liquidated.
  2. If LLTV < LTV ≤ 1/LIF, a liquidator can repay part or all of the user's debt and seize part of its collateral.
  3. 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:

  1. Unrealized when the liquidation has not occurred yet,
  2. Realized when the liquidation has occurred, and the entire collateral position is seized.

How Vaults are handling bad debt

In practice, the remaining debt of the liquidated user, at the market level, affects all existing suppliers of the market. Vault v1.0 and v1.1 are part of them, and handle bad debt in different ways.

Vault v1.0

Morpho Vault v1.0 automatically realizes the loss on all existing depositors at the moment of the bad-debt liquidation event. The share price of the vault will instantaneously decrease.

Vaults are from a Morpho Market point of view simple users. Their supply shares value post liquidation incurring bad debt in a market they allocated liquidity are worth a bit less than before the liquidation. The entire vault and depositors respectively are impacted proportionally to the proportion of the share the vault has in the market.

Vault v1.1

Morpho Vault v1.1 do not automatically realize the loss on all existing depositors at the moment of the bad-debt liquidation event. The share price will not decrease. The last depositors will face the bad debt unless action is taken.

How to cover the bad debt

Anyone (e.g., a curator or a lender) can decide to cover those bad debt events that have been realized, and this is feasible in different ways depending on the version of the vault.

One can call the action to put back some liquidity "Asset injection", which involves supplying methodically sufficient loan tokens to cover the loss in order to:

  1. for vault v1.0: restore the vault's share price
  2. for vault v1.1: allow any lenders to never get stuck if there was some liquidity shortage.

Vault v1.0

How to compute the loan token asset lost?

The amountLost is retrievable easily thanks to the liquidation event emitted.

After liquidation with bad debt realization, the entire Morpho Market suffered a reduction on totalSupplyAsset up to the badDebtAssets (in loan token units), retrievable at the liquidate event level.

emit EventsLib.Liquidate(
    id, msg.sender, borrower, repaidAssets, repaidShares, seizedAssets, badDebtAssets, badDebtShares
);

Then, one needs to compute in this Morpho Market what was the proportion % (called proportionPercentage) of the vault position as the vault is probably not the only supplier into the market.

amountLost=proportionPercentage×badDebtAssetsamountLost = proportionPercentage \times badDebtAssets

Which action to execute?

The following 3 solutions could be performed:

  1. For vault v1.0, one could think about depositing the loan token asset lost (called AMOUNT_LOST) by the vault straight into the market, by calling the supply() function, and deposit on behalf of the vault address:

    // On the Morpho contract
    function supply(
        MarketParams,
        assets=AMOUNT_LOST,
        shares=0,
        onBehalf=0x_VAULT_ADDRESS,
        0x,
    )

    However, if any new depositor comes between the time the vault suffered from bad debt, and the new loan token provider triggers the supply, this would indeed favor the new user(s) while they should not have been benefiting from this.

  2. Deposit on behalf of each user, coming with more gas consumption.

  3. Create an airdrop solution favoring the impacted users.

Vault v1.1

For vault v1.1, and as stated in the contract, as the bad debt is not realized at the vault level, anyone can compute the amount lost by using the value of lostAssets.

How to compute the loan token asset lost?

The added loss is lostAssets_after - lostAssets_before. These values are taken by retrieving the onchain lostAssets value before and after the liquidation event.

Which action to execute?

It is suggested to supply on behalf of address(1) on the vault. The loan token provider will thus lose the asset, but this will cover the bad debt event and no lenders will ultimately be stuck if they were to withdraw their funds.

// Call the deposit function on the Vault contract like this:
function deposit(assets,0x000..0001)

Alternative Approach: Third-Party Insurance Solutions

Another alternative for users is to subscribe to third-party insurance solutions (e.g., Nexus Mutual) that could provide coverage against bad debt events. This approach offers a proactive risk management strategy rather than reactive remediation after bad debt has occurred.

This insurance-based approach could potentially replace or complement the manual bad debt coverage methods described above, providing automated protection for vault participants.