Hoyu blog

Improving Liquidity Awareness in Lending Markets

In this post, we explore blockchain lending market challenges, highlight the Curve loan incident, and introduce Hoyu's method for direct collateral liquidity evaluation and on-chain liquidation.

Current Lending Markets Allow Bad Debt

Lending markets on blockchains typically allow a user to lock some token as collateral and then borrow some other token that the user needs more at a given moment. These lending markets operate under the assumption that the collateral can be immediately sold (that is, liquidated) to cover the loan. If that fails, the lending market ends up with debt that is undercollateralized, also known as bad debt. There’s even a dashboard for this by RiskDAO. At best, bad debt shows that the architecture of the lending market is not entirely sound. At worst, it can lead to outright collapse of the lending market.

Collateral Liquidity Affects Price

Protecting against bad debt is a complex endeavor, which requires understanding the potential price fluctuations when converting collateral assets. It is not straightforward to determine in advance what can be received in return for collateral since it depends on the liquidity of the collateral asset.

For instance, selling 1 ETH for USDC might be executed at nearly the current market rate for ETH/USDC. However, a sale of a block of 1,000,000 ETH (almost 1% of the current total supply) would fetch a significantly lower rate. In fact, it would be executed at a drastically lower price if immediate execution is required since 1,000,000 ETH is aligned with the average daily trading volume of ETH across all platforms.

There are several ways to avoid the punitive price impact effects. For example, one might split the trade over many different trading markets such as centralized and decentralized exchanges on various blockchains. However, this approach is not tenable for lending market smart contracts since they are operating on a particular blockchain. Given the issues surrounding liquidity and pricing, it is evident that blockchain-based lending markets have inherent challenges.

Life is Tough For A Smart Contract

Any smart contract on a blockchain has

Lending Markets Grapple with Implicit Liquidity Assessment

Current lending markets employ indirect strategies to address the challenges of limited information, limited complexity, and lack of agency. Lending markets delegate liquidation decisions to external actors called liquidators to manage the absence of agency and limited complexity. Liquidators identify loans on the verge of becoming bad debt. They are incentivized to repay these loans in exchange for receiving the collateral at a discount to its current market value. Essentially, liquidators manage problematic loans, maintaining system stability while also profiting. However, setting the right incentive structure for liquidators isn't straightforward; for instance, certain discount structures might inadvertently result in bad debt themselves as shown in this paper.

To combat limited information, lending markets severely restrict the types of assets accepted as collateral. Only tens of tokens are currently accepted as collateral on chain even though there are thousands of actively traded tokens. However, even this is not enough for secure operations. Therefore, manually-set limits of how much of each type of collateral is accepted are required. For example, Aave calls those Supply & Borrow Caps. Since these limits often involve a judgment call and/or a political process (for example, by DAO governance), it is tough to get them right for every asset. It is even more challenging to keep them up-to-date in a fast-moving environment. And it is very important to get them right every time, as otherwise large amounts of assets are at risk.

Supply and borrow caps fix token volatility

Curve Loan Exposes Liquidity Limitations

Consider a high-profile example highlighting the limitations of implicit liquidity handling.

The founder of Curve had taken out some loans to buy a couple of mansions. Specifically, the loans were secured using the Curve token (CRV) as collateral, with borrowings made in various stablecoins. The CRV token was somewhat widely accepted as collateral for quite some time. For example, CRV was graded B- by Aave and added as acceptable collateral back in 2020.

The loan was distributed over several lending markets, and the collateral was massive, almost half of the whole circulating supply of CRV. These on-chain smart contracts had no coordination among themselves. Each only recognized the current CRV price, making everything seem in order from their isolated perspectives.

Eventually, many realized the gravity of the situation. In particular, liquidating this large amount of CRV in a short time would have likely generated bad debt in multiple lending markets due to the price impact of the liquidation. To avoid that, part of the debt was unwound by using over-the-counter (OTC) transactions . While the blockchain ethos champions self-sufficiency and on-chain robustness, this incident starkly reveals the reality: modern lending markets, in their current architecture, can and do outgrow purely on-chain solutions, unfortunately making external coordination essential for their stability.

Hoyu Tackles Liquidation by Merging Lending and Trading

Unlike traditional methods that depend on price oracles and liquidator incentives, Hoyu evaluates collateral liquidity directly. Hoyu, by integrating its lending and trading markets, can accurately determine the required collateral for loan coverage. This not only eliminates human biases in liquidation decisions but also fosters a unique communication between its smart contracts, ensuring the entire liquidation process remains on-chain (details here). The result? A system intrinsically designed to never have bad loans.

This is part 1 of the blogpost. Stay tuned for part 2 where we derive some formulae that are key to lending markets.