Protocol Simulator

Why did we build a Protocol Simulator?

Building a protocol simulator became a necessity for Zharta to allows us to understand what the ideal underwriting conditions for our loans would be, in a scientific manner. This simulator makes use of a large set of historical data (see Data) to model and simulate different probabilistic scenarios, which we then use to test out different underwriting policies, measuring their impact on the performance of the pools.

SimulationsGoals

Underwriting

Test the right set of underwriting parameters, LTV and APR, for each key maturity in order to satisfy users, namely:

  • Borrowers: offer the highest possible LTV (principal) with competitive interest rates for each maturity (see example)

  • Lenders: offer competitive overall returns considering the LP's (Lending Pool's) inherent risks such as default, recovery, or prepayment

Appraisal Model

  • The Appraisal Model is developed and evaluated outside of the context of the Protocol Simulator. However, the Simulator is important to evaluate how different appraisal models impact the stability, risk, and profitability of the LP.

Stability Controls

  • Test, measure, and calibrate Stability Controls, so that we can manage the LP liquidity and minimize risk exposure to certain NFT collections in the most efficient manner.

Protocol Policies and Controls

  • Test and analyze key policies like the distribution model of loan excess returns between the main stakeholders (Borrowers, Lenders, and Zharta).

  • Define and test risk control indicators

  • Estimate and project Protocol generated revenue & costs

Liquidation

  • Explore collateral liquidation options based on the market's historical data in order to maximize loan recovery values in cases of default.

Example of protocol simulator test output

Underwriting

Setting APR for each supported collection using interest rate market analysis, considering different maturities and LTV levels.

Setting LTV cap for each supported collection by calculating return-on-investment (ROI) for each LTV range, identifying loss-making levels and setting maximum caps.

We are constantly testing our models against market conditions in order to establish healthy parameters for our protocol. Our focus is to keep refining our models and analysis so they can be used as benchmarks in the space.

Architecture

The architecture of our simulator is described in the figure below.

Components and Implementations

BlockTypeDescription

Loan Generator

Input

This block is responsible for modulating the loan demand. The loan demand is characterized by loan volume, distribution per collection, and maturity.

We have several implementations of this block, from dummy loan books to historical loan demand from key players.

Lender Simulator

Input

This block represents the lender's behavior. Each lender can take the actions of joining the pool (with a certain amount of funds), leaving the pool, and buying collateral from defaulted loans.

Borrower Simulator

Input

This block represents the borrower's behavior. It mainly focuses on the repayment behavior of the borrower.

Environment

Fixed Input

This block is the simulator's connection with the real world. It has the metadata of the supported collections' NFTs, their rarities, registries of historical floor prices, sales, and instant liquidation pool balances.

Simulation

System State

The core that connects all the blocks, runs the simulation and produces the outputs. The simulation cycle is set daily, originating new loans and evaluating the state of every ongoing loan.

Underwriting

Protocol

This block is responsible for limiting the loan conditions -LTV and APR - based on the collateral, the desired maturity, and the pool state.

Appraisal Model

Protocol

This block integrates Zharta's appraisal model with the protocol simulator.

Pool

Protocol

The Pool object is the representation of the LP in the simulator. It allows us to test different pool management policies and several types of Stability Controls.

Interest Distribution

Protocol

This block is responsible for dividing the loan flows between the LP, Zharta, and the Borrower, enforcing the distribution policies set by the Protocol.

Collateral Recovery

Protocol

Block responsible for liquidations in cases of default. There are different possible paths for liquidation, from instant execution to auctions.

Last updated