Setting Up Risk Levels in MetaMorpho Markets with SmartLTV

Eitan Katchka
B.Protocol
Published in
8 min readDec 21, 2023

Introduction

B.Protocol introduced the SmartLTV formula — a smart contract that calculates loan-to-value (LTV) ratios based on objective measurable quantitative risk-related data feeds and a subjective risk appetite.

The risk appetite is determined by the Risk Level Factor (p.k.a. Confidence Level Factor), a single value that aims to represent a desirable safety margin by accounting for potential deviations from previously observed stats to anticipated values in black swan events. For instance, it considers scenarios where volatility could be three times higher than what was previously recorded.

In this post, we will dive deeper into the Risk Factor configuration and its different components. We will then demonstrate how B.Protocol and Block Analitica are using this process to set LTV ratios in our upcoming MetaMorpho Flagship ETH vault and the future vaults that will follow.

In short, According to the SmartLTV formula, the risk level depends on the estimated time interval for DEX liquidity to recover (T), the portion of the total debt that is expected to be liquidated (p), and a z-score (z), an amplification factor over observed volatility.

We derive a recommended Risk Level range, and consequently, apply this range to the LTV ratios that are enabled by Morpho DAO, to determine the LTVs of the markets we supply to.

The SmartLTV formula recap

Loan-To-Value (LTV) is a pivotal concept in maintaining the equilibrium between risk and accessibility. It’s a measure that ensures that lending platforms can provide loans securely without taking undue risk that might result in the accumulation of bad debt.

SmartLTV is a smart contract formula that offers a simplified yet robust method for LTV ratio calculations based on quantitative data, minimizing the human factor in the process.

The formula takes into account the following market parameters:

  • σ is the price volatility between the collateral and debt asset (normalized to the base asset price).
  • β is the liquidation bonus.
  • is the available dex liquidity with a slippage of β.
  • d is the debt cap of the borrowable asset.
  • r is a risk level factor. The higher the r is, the odds for insolvency increase.

You can find the full whitepaper for the formula here.

The Impact of T, p, and z Values on the Risk Level Factor

The Risk Level Factor (r) in the formula is a constant parameter that is impacted by 3 components — The time interval that DEX liquidity takes to recover (T), the portion of the debt that is estimated to be liquidated (p), and a z-score (z), a statistical measure defining the amplification over observed volatility.

Risk Level Factor

Understanding the nuanced relationship between the parameters T, p, z, and the resulting Risk Level Factor (r) is essential for comprehending the risk assumptions embedded in the SmartLTV formula. Each parameter plays a distinctive role in shaping the risk exposure and should be considered when determining the desirable risk level that will be used to set LTVs. Let’s delve into the implications of varying T, p, and z values on the calculated Risk Level Factor and the impact they have on the LTV ratio.

Time Interval (T)

The parameter T, represents the time interval for DEX liquidity to recover after it was fully utilized for a liquidation. It’s a critical factor influencing the speed at which liquidations can be executed.

A decreased value of T suggests a riskier (e.g. more optimistic) assumption regarding the DEX liquidity recovery time, leading to a higher risk factor. Conversely, opting for a higher T reflects a more conservative assumption, anticipating a prolonged duration for liquidity recovery, thereby reducing the risk factor and dictating a lower LTV ratio.

The measured volatility and the time interval T should be represented in the same time units. I.e., if the volatility stands for daily volatility, then the units of T should be in days. Conversely, if the units of T are in minutes, then the daily volatility should be normalized to minutes.

Liquidation Portion (p)

The Liquidation Portion p estimates the portion of the total standing debt of the platform that will be liquidated. Bigger liquidations may take longer to fully execute (due to limited DEX liquidity) and can result in bad debt accrual.

Lower p indicates an assumption of smaller liquidations, encapsulating a higher risk exposure that will lead to higher LTV values.

Z-Score (z)

The Z-Score, denoted as z, is a statistical measure representing the number of standard deviations a data point is from the mean of a normal distribution.

In the context of the SmartLTV formula, a higher value of z amplifies the measured volatility. In the context of Morpho, we measure the volatility as the biggest daily price change (log scale), discounted over time, with a half-life period of 2 years.

Hence, a z value of 3 means that most of the stress tests would be successful even on a day with x3 higher volatility than the previously observed worst day.

In addition, the z-score shows the percentage of stress test simulations that would succeed for a given volatility value. For example, looking at a z-table, z=3 suggests that 0.9987 of the simulations will end with a price that does not result in bad debt. However, since we are interested in the price during the entire simulation (and not only at the end of it), the failure rate is doubled, which means that 0.9974 of the simulations will pass.

Higher z values are more conservative and hence result in lower risk factors and in turn lower LTV ratios.

Setting Risk Level ranges based on T, p, and z values

We classify the safety of the Risk Levels according to the different combinations of T, p, and z.

  • As T is the time for liquidity to recover we set T=30 (minutes). This is a reasonable time estimation for the time it takes to withdraw funds from Binance (or any other major CEX), or for investors to buy a deppeged LST at a discount On a good day, withdrawal times are much faster, but can also be slower on a bad day, and hence we also consider T values of 10, 20, 30, and 45 minutes.
  • p is defined as a percentage of the total standing debt. We set a conservative portion of 20% that could be liquidated in one event. For reference, Aave’s largest liquidation during 2023 was on August 17th, with $8.4m out of a total standing debt of $770m, a p-value of ~1%.
  • As mentioned above, in the context of the SmartLTV formula, assigning a z value of 2 indicates that the assumption is x2 more conservative than the worst-day scenario. Increments of 0.5 were used to test z-scores between 1 and 3. We note that if volatility is measured differently (e.g., average of daily volatility), then different z (more conservative) values should be considered.

We calculated the r values according to the above-mentioned ranges of T and z, while keeping p constant at 20%.

Calculated risk levels (r) for different T and z values

Looking at the results, the conservative setup of T = 30 minutes, p = 0.2, and z = 3 results in r = 5, and hence we set it as the threshold for a conservative risk level.

Based on the table above we defined a general risk level ranking that will assist us in the next step — deciding on the optimal LTV ratio based on risk levels.

Risk Level ranking

Using SmartLTV to set LTV ratios for MetaMorpho ETH Vault

As Morpho Blue has a list of available LTVs that the Morpho DAO whitelisted, we were looking for an LTV ratio of a market that will strike the balance between risk exposure and market dynamics where our ETH Vault’s funds will be deposited.

For that, we used SmartLTV to calculate the Risk Level Factor for each of the listed LTVs for the stETH/WETH market, with their respective liquidation bonuses, for 4 different supply caps — $100m, $250m, $500m, and $1b (denominated in ETH at its current value of ~$2300).

SmartLTV risk level outputs for different LTV ratios for a specific Supply Cap

Results

We came up with the following table of r values for each of the listed LTVs under different supply caps. The risk levels marked by colors of their risk ranking -

stETH/WETH market risk levels (r) for different LTVs under different Supply Caps

Conclusions

Among the LTV options that were whitelisted, the selection of 94.5% emerges as the most prudent choice.

This decision is rooted in the fact that, even as supply caps increase up to $1 billion, the corresponding risk exposure levels remain consistently below an r value of 5. By opting for a 94.5% LTV, we strike a careful balance between risk mitigation and market dynamics, aligning with our commitment to a cautious yet balanced risk level in our MetaMorpho flagship ETH Vault.

The results also indicate the viability of a higher LTV, e.g. 96.5%, with a potentially lower supply cap. However, since it is not trivial to move the funds between markets, it is imperative to select an LTV that will remain conservative also over time.

In contrast, the results indicate that opting for an LTV as high as 98% subjects users to significantly heightened risks, even with low supply caps. At the same time, selecting an LTV below 94.5% fails to provide users with any advantage in the delicate risk-reward balance.

This process demonstrates how B.Protocol’s SmartLTV formula serves as an effective tool for setting and maintaining LTV and Supply Caps for specific lending markets. Together with Block Analiticia we plan to employ the same approach for any future market listings on MetaMorpho, with a vision to eventually automate this process entirely.

About B.Protocol

B.Protocol has been building open-source protocols and infrastructure for risk mitigation and assessment for the DeFi ecosystem since 2020. Through our research arm, RiskDAO, and its novel risk framework, we have supported over a dozen DeFi protocols with risk analysis, research, audits, and monitoring. Our Risk Oracle and SmartLTV formula automate the process of setting risk parameters for lending platforms in a transparent way, building the next generation of DeFi risk management infrastructure.

Website, Twitter, Discord, Medium, GitHub

--

--