This is going to be a long one…
Bad debt
Last few months demonstrated that liquidity and credit risks are as relevant in crypto as they are in traditional markets. DeFi lending protocols withstood the test reasonably well but it doesn’t mean DeFi market participants can take safety for granted. One of the main risks for lending protocols is bad debt risk, when a protocol is left with accounts that are insolvent. In this article we’d like to share how we look at this risk at Re7 to help spread best practice in the industry.
The bad debt risk is very real and is even more relevant on L2 networks where liquidity is lower, meaning that it is harder to liquidate very large positions.
The DeFi space saw this drama play out in the past few months, notably with the Solana lending market Solend. A large whale account had provided millions of dollars of SOL token as collateral and used it to borrow stablecoins.
However, the amount of SOL was so large, that as the account approached a health factor of 1 and imminent liquidation, the protocol realised that it would not be economically viable to liquidate the account on chain.
In fact, the account was so large that liquidating it would have used more liquidity for SOL sales than was readily available on chain. Anyone trying to profit from the liquidation would have found that slippage from the sale was very high, making the liquidation unprofitable.
Other similar cases have led to realised bad debt on lending protocols like MIM, where there is still $12m of bad debt as a result of UST collapse.
The risks of segregated liquidity
As part of our risk assessment at Re7, we have taken a proactive approach to identifying and mitigating bad debt risk in the lending markets where we may be active.
This is of particular importance for L2s where liquidity is not as deep. A good example is the Aurora ecosystem of lending protocols. While Aurora has a budding ecosystem that is growing, the lack of deep on-chain liquidity means there is high risk for lending protocols to end up with bad debt during a downturn.
Liquidator bots need to be able to sell collateral without taking a loss. This means slippage on any liquidation sale cannot exceed the liquidation incentive and transaction costs of processing a liquidation. If a liquidation is not profitable with some spread, bots will not execute and the lending protocol can be left with bad debt. Looking at liquidity for the main collateral assets on Aurora, we can see that this is a difficult task.
Even the largest pools on Aurora have less than $10m of liquidity, making it quite risky for liquidations of large accounts.
For example, a sale of only 50 ETH into USDC would realise over 7% slippage on the Trisolaris market.
What this means is that in practice, accounts that use volatile assets as collateral and borrow stables, are quite risky for the protocols. Especially when these are very large accounts.
In order to understand the magnitude of bad debt risk to these protocols and evaluate our position sizing, we did some high level analysis of the largest accounts on Bastion, Aurora's largest lending market.
Onchain sleuthing
With a view of on-chain liquidity, we can see that any account large enough that a liquidation of its collateral would create high slippage is a risky account.
Looking at the various volatile token markets in the main Bastion realm, we can see that cETH is the largest with over 16,000 ETH deposited as collateral.
Next will be to understand how large individual accounts are. By reviewing the token holders of cETH, we can see that there are plenty of accounts with large amounts of cETH deposited as collateral.
To see if any of these accounts would be unprofitable to liquidate,, we can convert these cETH balances into ETH values using the current exchange rate and see how much collateral has been deposited. We then compare this to available liquidity in the ecosystem AMMs, in this case Trisolaris.
Many would be impossible to liquidate in an atomic manner. There just isn't enough ETH liquidity on Aurora to handle such large sales. The largest user account with over 3000 ETH deposited, could not even start to be liquidated. The largest ETH pool on Trisolaris (ETH/NEAR) has just over 700 ETH of liquidity. Further, the nature of the Trisolaris constant product automated market maker (forked from Uni v2) means that any sale over 35 ETH is going to incur more than 5% slippage. These will therefore be unattractive for liquidation bots to execute on.
Beyond just the account size, it is important to understand the borrowing health factor and type of borrow. For example, looking at the largest non-contract account 0x979, we can see that the wallet has deposited USDC and ETH, while borrowing mostly NEAR and has a current health factor over 3. This makes the account less risky since NEAR and ETH are more correlated, the USDC gives a buffer, and the account has a high health factor.
Other large accounts like 0xd0b are running a recursive strategy of depositing ETH and then borrowing ETH to redeposit. Therefore, even with a health factor close to 1, it is not a risky account since it is looping a single asset and not subject to price risk.
After reviewing the largest accounts we find that none are borrowing stables against ETH with a health factor lower than 2. For those that are, we can set up internal monitoring of their health factors to alert us if the situation changes and have an idea of the magnitude of price fluctuation that could lead to a liquidation (in these cases heavy drops in the price of ETH of more than 40%).
We run a similar analysis for the other markets on the protocol. For example, we have flagged account 0x1ad as a potential risk because it has the largest amount of NEAR deposited and is borrowing USDC against this with a health factor just above 2. While not currently close to liquidation, a large drop in the price of NEAR could lead to this being a bad debt risk. Accounts like these represent outsized risk to lending protocols, and are worth monitoring by both the protocol team and depositors.
Best practice
We have seen tools and consulting come from groups like Gauntlet as well as RiskDAO that are focused on providing teams with monitoring solutions and market parameter suggestions in order to reduce the risk of bad debt. Strategies like debt caps, account caps and other parameter adjustments can go a long way to mitigate these risks for LPs and protocols.
We suggest that protocol teams take a proactive approach to identifying and mitigating bad debt risk on the protocol level. While high TVL is important and a good marketing factor, bad debt can cripple a protocol and could represent an existential risk for smaller lending protocols or L2 ecosystems. As a sizeable liquidity provider, Re7 runs our own internal controls and review of lending market risk, and suggests teams to do the same. By carefully evaluating and monitoring risk factors, we can create a safer and more efficient DeFi market for all participants.
Re7 Capital - a DeFi firm focusing on stablecoins and ETH