On Insolvency — Tackling Bad Debt in DeFi

Diving into the ins-and-outs of bad debt metrics in DeFi and how protocols deal with mitigating insolvency

Denis | MYSO
Risk DAO
7 min readSep 19, 2022

--

What is bad debt?

Traditional lending protocols are vulnerable to accumulating bad debt due to the way that liquidation mechanisms are structured. On Aave and similar platforms, there is a certain Loan-to-Value (LTV) threshold that needs to be upheld, which is a ratio between the collateral a user puts up and the amount borrowed. Usually, when an account breaches a certain LTV ratio, they are liquidated by a third party (e.g. a bot) for an incentive and the debt is made whole again so that the protocol and LPs do not bear the losses. However, situations arise when a position is not liquidated on time (due to sharp fall in prices, absence of DEX liquidity, blockchain congestion/downtime, etc.) — if this occurs and the liquidated collateral is ultimately not able to cover a position’s debt, the protocol is left with bad debt.

How do protocols deal with bad debt?

Bad debt poses risks to both protocols and users alike. Since repayment is not financially rational and there is no way to force users with bad debt to return their loans, users will eventually not be able to withdraw some of their deposits.

Some traditional lending protocols have measures in place to mitigate the risks associated with insolvent accounts that have accumulated bad debt. Aave has a mechanism known as the Safety Module (SM) in place which incentivizes AAVE token holders to lock their tokens to be used in case of a Shortfall Event that would cause a state of deficit for liquidity providers.

In the case of a Shortfall Event, some locked AAVE tokens are sold off to mitigate liquidity deficits and possible bad debt. AAVE token holders are incentivized to lock their tokens to earn rewards called Safety Incentives. Aave Governance is responsible for outlining situations that are defined as Shortfall Events and can vote to use the Safety Module to spare the protocol and liquidity providers from the risks associated with bad debt accrual.

Aave Safety Module architecture

Though there have been periods of extreme market stress since Aave’s inception, the Safety Module has still not been used a single time — we will have to see if a situation arises where it needs to be put to use and how Aave Governance reacts to such an event.

Compound charges a fee on the accumulated user interest and keeps it in a reserve. The reserve provides additional liquidity for the lending market, and thus, even if bad debt is never repaid, users can withdraw their deposits as long as there are enough funds in the protocol reserve.

MakerDAO has an automatic bad debt recovery mechanism that auctions MKR tokens for sale whenever bad debt occurs. The MKR is sold for DAI which is used to repay the bad debt. This mechanism formally favors the lending market creditors at the expense of the protocol token holders. This is different to the bad debt protection mechanisms on both Aave and Compound, which are structured to potentially only mitigate a proportion of accrued bad debt (further compensation would require a governance vote).

Liquity Protocol socializes potential bad debt risks by distributing underwater positions among all other borrowers on the platform. This is in sharp contrast to protocols like Compound and Aave, where the the users who withdraw first get their entire deposit back, while the last users to deposit could lose their entire deposit.

Bad Debt Dashboard

The Bad Debt Dashboard tracks bad debts on lending markets by periodically querying the status of their active users. If the user collateral is greater than the user debt, then the user bad debt is 0, and otherwise it is the amount of debt minus the amount of collateral. Bad debt can accumulate over time, but in some cases it can also get smaller if the price of the debt asset depreciates. This is a conservative approach that ignores factors like liquidation penalty with reference to the price of the collateral asset.

Looking at the dashboard, we see that almost all platforms have some amount of bad debt, however, it is often negligible, without a real likelihood to trigger a run to the bank in the form of massive deposit withdrawals (who will leave the ones who withdraw last with 100% losses). A few exceptions include the Iron Bank, Moonwell, Venus, and Inverse Finance, who have significant bad debt.

Bad Debt Dashboard

The platforms’ bad debt stems from a number of sources:

  • Small (dust) accounts: In mainnet lending markets, the typical liquidation process involves just paying a gas fee, which typically costs ~ tens of dollars. Typically, the liquidation incentive is a certain % of the account debt (usually 5–10%). When the account is small, the incentive is smaller than the gas cost, and thus accounts are not being liquidated. A notable example for that is Aave, which has thousands of insolvent dust accounts — however, their bad debt accumulates to only 0.01% of the platform TVL. One way to mitigate bad debt that stems from dust accounts is to define a minimal debt size.
  • Failed liquidations: MIM Protocol accumulated $12m of bad debt because of failed UST liquidations. This type of bad debt can be mitigated by setting more conservative collateral factors.
  • Hacks and asset depegging: Platforms like Inverse Finance suffered from smart contract logic bugs that led to massive loss of funds. Platforms like Moonwell suffered from asset price de-pegging following the Nomad bridge hack.
  • Special arrangements: Iron Bank allows DAO-to-DAO lending via a special off-chain agreement while having the counterparty DAO governance tokens as a collateral. However, these tokens were never liquidated despite a large depreciation in price. MakerDAO offered a special USDC vault type without any liquidation mechanism which resulted in $1.3m of bad debt.

Bad debt incidents

In May 2021, a market price manipulation, coupled with aggressive risk parameter configurations, resulted in the accrual of over $100 million worth of bad debt in the BSC-based shared-pool lending platform Venus Protocol.

The timeline of the events is as follows:

  • May 8th, 2021 — Collateral factor was increased from 60% to 80% for borrowing using $XVS as collateral.
  • May 18th, 2021 — $XVS price shoots up from $80 to $145 in 3 hours. Millions of $ are borrowed from the protocol using $XVS as collateral
  • The price of $XVS declines sharply back to $80 over the course of 3 hours. With this price decrease, the $XVS collateral was liquidated to cover the loan amount. However, the $XVS price had declined so sharply that the amount sold was not able to cover the original loan.

It is thought that this sharp squeeze was due to internal price manipulation — either way, the Venus Protocol was left with massive amounts of bad debt which is still not repaid today (around $62.3 million according to the Bad Debt Dashboard)

XVS/BUSD price action on May 18th, 2021 on Binance

In May 2022, Fantom-based lending protocol Scream sustained a hit of $35 million worth of bad debt after neglecting to update the prices of two stablecoins that had de-pegged: DEI and fUSD. Scream had hardcoded the prices of both stablecoins on the platform to $1.00 — however, with ongoing tumultuous market conditions, the true market price of DEI dropped as low as $0.53 and fUSD to $0.69.

Since these market prices were not reflected on Scream, users were able to deposit large amounts of fUSD and DEI at this reduced market price and essentially drain Scream pools of all other stablecoins by borrowing against the bad debt. USDC, MIM, FRAX, and other stablecoins were procured at these artificial exchange rates and users with deposited funds denominated in these stables were not able to withdraw their funds.

Recap

In this writeup, we explored the concept of bad debt, surveyed how some platforms could recover from bad debt events, and described how these events have already occurred on a number of platforms. Bad debt is a considerable risk factor in DeFi, typically affecting lending protocols. It is of the utmost importance for platforms that deal with collateralized lending to have sound mechanisms for maintaining account solvency.

This piece was a collaborative effort between MYSO Finance and Risk DAO

Risk DAO is a DAO that focuses on providing a new risk assessment framework and associated audits to DeFi lending and borrowing protocols as well as L1 networks. The Risk DAO monitors DeFi’s bad debt through the Bad Debt Risk Board, and actively tries to mitigate bad debt with the help of risk assessment dashboards and stress test simulations.

MYSO is building a zero-liquidation lending market that is secure against bad debt and insolvency. Using MYSO, borrowers can borrow at fixed rates without worrying about health factors, liquidations, and other operational overhead. Lenders, on the other hand, are exposed to a passive option-writing strategy, unlocking option selling as a sustainable yield source.

--

--