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.
Simulations | Goals |
---|---|
Underwriting | Test the right set of underwriting parameters, LTV and APR, for each key maturity in order to satisfy users, namely:
|
Appraisal Model |
|
Stability Controls |
|
Protocol Policies and Controls |
|
Liquidation |
|
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
Block | Type | Description |
---|---|---|
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