RiskDAO - Research & Risk Analysis For DeFi Lending Protocols

RiskDAO is a risk assessment service DAO initiated by B.Protocol and other contributors, including 1kx research arm, La Tribu dev group, and others.

You can find this article also on Medium. The full report can be found here. The RiskDAO website can be found here.

Data Extrapolation Framework for Risk Assessment of DeFi Lending Platforms

B.Protocol launched a risk assessment sub-DAO and engaged with it to build a risk assessment framework for DeFi lending platforms. The sub-DAO issued a comprehensive 20 page report, and this blog post summarises their findings.

Tldr; We introduce a new methodology for lending platforms risk assessment: real world liquidation data of popular assets from centralized exchanges is taken, along with the price trajectory of the assets. We extrapolate the liquidation sizes and price trajectory to the asset we wish to analyze, and simulate the outcome based on the asset’s available DeFi liquidity. Our approach eliminates most of the assumptions that are usually made in risk assessments in the DeFi ecosystem regarding user behaviour during market crashes, and makes it more feasible to analyze the risk of a platform prior to its launch, and for multichain lending platforms, where the data for user behaviour is even more sparse.

Background

DeFi lending markets manage billions of user funds, with the top 2 platforms, namely, Compound and Aave holding over $20B of crypto-assets. At their core, they allow suppliers to deposit a set of assets, and borrowers to borrow them. The permissionless nature allows anyone to be a supplier and enjoy a supplier interest rate, however it also dictates that a borrower could only borrow against a collateral, and the platform becomes (partially) insolvent when a user debt exceeds his or her collateral. An insolvency event generates bad debt which comes at the expense of supplier deposits.

To prevent insolvency, the market admin set parameters that encourage successful liquidations, and reduce the insolvency risk when liquidation process prolongs. The 3 main risk parameters are:

  1. Liquidation incentive: liquidators execute a liquidation when they believe it is profitable. For this purpose a liquidation incentive is given, in the form of a discount over the seized collateral.

  2. Collateral factor: If liquidations were guaranteed to be executed immediately, then the needed over-collateralization would be the size of the liquidation incentive. In practice however, liquidity crisis and blockchain congestion might delay the execution of the liquidations. Higher over-collateralization ratio compensates for the risk of default in the presence of execution latency. The collateral factor specifies a borrower’s minimum collateral requirement w.r.t her outstanding debt.

  3. Close factor: The close factor determines the \% of debt that can be liquidated when the borrower does not meet the over-collateralization requirements. By definition, higher closing factors reduce the platform risk, as it enables liquidators to close bigger portions of the borrower position.

New Risk Assessment Model

Existing risk assessment models (e.g., Gauntlet and MakerDAO risk unit) try to simulate how borrowers will react to price movements and will close their debt on time prior to being liquidated. This model is hard to scale, as the data on DeFi user behaviour is relatively sparse.

We take a different approach, and instead, take liquidation data from centralised venues, which have more substantial liquidation history. We also take the price trajectory after liquidations, from the real world market price at the time of liquidations.

Finally, for assets that are not featured in the centralised futures market, we simply extrapolate the price movement according to their historical price volatility. In the figure below, we depict the simulated prices of 6 assets with different volatility levels (0.5–3). Where the real price is the price of the asset with volatility 1 (in green).

To simulate market liquidity, we take into account only DeFi liquidity, and assume that liquidity will flow from centralised venues to Ethereum, or from Ethereum to its L2 in a time period of 30 minutes.

During that period, liquidations can only be executed by arbitraging DEXes.

For L2s we take available liquidity from Sushiswap. Constant product market makers (such as Uniswap V2 and Sushiswap) are very appealing for risk analysis, as they provide full information about their price slippage, as depicted in the figure below.

Backstop

With B.Protocol’s backstop, users provide liquidity that is used for liquidations (e.g., repay USDC debt in return to ETH collateral), and after liquidation happens, an automatic re-balance process begins. The re-balance process converts the seized collateral back to the original asset (e.g., the ETH collateral is converted back to USDC). The rebalance is done by offering the collateral for sale according to the market price, which is determined according to a price oracle. An optional discount on market price is given according to the imbalance size (the size of collateral to sell), and the exact formula is depicted in B.Protocol’s Backstop Automated Market Maker (B.AMM) whitepaper. In the backstop latest architecture, as user deposits are expected to sit idle for the majority of the time (when liquidations do not occur), the system will deposit it, on behalf of the users, to the lending market where it is used for supply, and will withdraw it only to facilitate liquidations.

See an illustration in the figure below.

The developed risk framework can also simulate how the lending market will perform when it has a backstop.

In the next figure, the x axis is the ratio between the backstop size and total market supply (BCR). The y axis is the ratio between monthly liquidation volume, and total market supply (SCLR). The result is the maximum bad debt of a single account during the 12 month simulation (in %).

The simulation depicted below was performed for the SPELL/ETH Sushi LP token, vs ETH as a debt asset, over Arbitrum L2 network.

The simulations show that without a backstop, at least one position generated 32% of bad debt, and thus if the liquidation incentive is 10%, any collateral factor (LTV) higher than 58% would result in simulated bad debt. With a backstop as small as 10% of the collateral size, even a collateral factor of 90% would not have simulated a bad debt.

You can read the full report here - https://github.com/backstop-protocol/whitepaper/blob/master/Risk%20Analysis%20Framework.pdf

Last updated