Technical discussion for BendDAO risk management based on agent-based simulations

Summary

Cenit Finance proposes to develop a simulation engine and a dashboard to track BendDAO’s risk metrics and update its risk parameters.

This discussion aims to debate the methodology and tooling for this purpose. Once agreed upon, Cenit would introduce a new proposal for conditions and needs to build it.

Motivation

As is the case with any DeFi lending protocol, NFT-collateralized lending needs to constantly monitor risk exposure to constantly evolving market conditions. This need is compounded by the fact that the NFT collections market is harder to track, measure, and model.

In order to avoid crisis situations such as the one experienced recently, Cenit Finance proposes to create:

  • a simulation engine with which to estimate and continuously track BendDAO risk metrics, as well as help fine tune the protocol risk parameters in order to optimize its risk performance
  • a dashboard by which to show the simulation results and communicate them to the community

The simulation engine would be based on different market conditions, including

  • Collections floor price volatility and price movements
  • Sales volume
  • NFT listings

and particular conditions of BendDAO, including

  • Health factor of the current loans
  • Number of loans backed by NFTs from a specific collection

in order to answer the question of how to tune the various risk parameters

  • LTV
  • Liquidation threshold
  • Liquidation bonus
  • Grace period

and report through the dashboard the risk metrics for BendDAO with its current configuration, as well as proposed alterations to these parameters in order to better manage risks.

Methodology

To simulate all these scenarios, Cenit proposes an agent-based simulation engine which can be split in 2 parts: time series simulation and agent behavior.

  • Time series: Gaussian Brownian Motion/Jump Diffusion simulation: We will perform multiple (thousands) simulations with random realistic time-series for each parameter we want to study (e.g. floor price volatility, market liquidity…), starting from the present time. The simulations will span a period of 1 month, although we would extend this if needed.

  • Agent behavior: The following agents will be modeled:

    • Borrowers:
      • We will simulate a worst case scenario by which borrowers will only pay back loans during a grace period if economically incentivized to do so. That is, if the value of the NFT collateral at floor price is above the debt to be paid back. Additionally, we can set a percentage of loans that are “forgotten” by the borrowers and not paid back even in favorable conditions, if the BendDAO data suggests this is currently happening, as is sometimes the case with similar protocols.
      • Borrowers will always opt for the maximum LTV possible.
      • The frequency of new borrowers will be modeled from BendDAO current user behavior data. Based on the distribution, a multiplier parameter will be used to measure risks under greater/smaller utilization conditions.
      • Duration of the loan will be modeled from BendDAO current user behavior data.
      • The distribution of assets used as collateral will be modeled from BendDAO data.
  • Liquidators:

    • These agents act incentivized by the potential gain from buying a discounted NFT and selling at the current floor price. They will attempt to sell the discounted NFT as soon as they can.
    • Their incentive takes into account their capacity for reselling the NFT without significantly lowering the price, which is tied to the daily trading volume for a given collection. There will be a probability of sale every simulation step. If this is not achieved, they will be trying again on the next step.
    • They will be assumed to constantly update the price of the NFT being listed to match the collection floor price the whole time.
  • Lenders: The amount of lending will be assumed to be constant over time and based on current BendDao data in order to have a standardized environment.

Metrics to track, for each set of parameters:

  • Percentage of simulations with failing conditions. The failing condition is defined as a simulation where there is a situation in which the liquidators have no incentive to act.

  • Value at Risk: defined as 95th percentile of losses of the protocol at the end of the simulations. Profits and Losses (PnL) would be then defined as the summatory of (value generated in fees - debt on non liquidated loans). Non liquidated loans are the ones that give no incentive to the liquidators to act. Note this metric would not count the unrealized PnL (which would take into account the value of the reclaimed collateral NFTs BendDAO has at the end of the simulation).

  • Liquidations at Risk: defined as the VaR (95% percentile) for liquidators. If a liquidator is willing to repay a loan to sell it in the secondary market, what is their PnL and value at risk? PnL defined as summatory of (value of sales of NFT in secondary - debt paid)

Detailed data modeling

  • Slippage model. According to market data, we will fit a model that reflects the impact of a change in the number of NFTs listed for a collection with change in its floor price.
    This model will take as input the simulated price given by the Gaussian Brownian Motion/Jump Diffusion time series generators as well as the NFTs added to the market by BendDAO liquidators to take into account its impact on the market. The output will be used to determine the floor price for collections at that step and therefore to check for further potential liquidations and liquidation cascades.

  • Modeling of listed NFT in simulations. In our simulation, the number of listed NFTs in a collection is correlated to the floor price based on the same relationship from the slippage model. A change in floor price in a step will affect the number of NFTs listed for the collection.

  • Number of NFTs at floor price. Only a percentage of elements are listed close to floor price This percentage will be fit based on market data for each collection.

  • Probability of sales for liquidators. It is based on the hourly sales ratio, obtained from the previous 2 weeks, and the amount of NFT listed at floor price.

Deliverables

Dashboard with total LaR & VaR for BendDAO lending pool with a detailed analysis of each of the collections.

  1. Results of the metrics to track defined above for each of the risk parameters.
  2. Suggestions based on the simulations for BendDao’s risk parameters taking into account current market conditions.

The dashboard would be updated every 2 weeks. Cenit Finance would be responsible for maintaining the data ETLs, simulation engine and give suggestions of changes if necessary for the protocol.


As stated, with this thread we aim to discuss the methodology explained above and agree upon an approach that works best for BendDAO and contributes to its long term viability and success.

We welcome any feedback and suggestions you may have. Thank you for reading.

1 Like

Such a good post, I need to take a deep look into it, thanks for you post.

1 Like

Really great post, one small question: what does the NFT Listings actually mean here?

How to understand the “at the end of simulations”? is it a time period like next 7 days? for example: a 95th VaR in the next 7 days?

Hi @bulugu, thanks! By NFT listings we mean the number of NFTs listed in a secondary marketplace for a collection at a moment in time. For example, the time series of the number of BAYC listed in OpenSea.

Yes, like you said. Although we suggest a longer period, initially 28 days.

Hi Alex, thanks for your post. One of our dev team members did some research about the risk modeling and how about we arrange a call about deeper corporation of risk modeling of BendDAO bluechips?

1 Like

Awesome, let’s do it

The risk modeling is important forBenddao.I strongly support this proposal.

Model building is a very specialized work, so only the BendDAO Team can decide whether to collaboration, but the community will oversee and empower it.

Next steps

If the BendDAO Team approves of your ability to build the model, I suggest opening a trial period (subject to a vote).

The trial period would last 3-6 months and would only pay 80% of the funds. If the trial period is finally passed, the remaining 20% will be paid and make long-term cooperation.

1 Like

Trial period is a good idea IMO, thanks for your opinion.