IRS — The Interest Rate Simulator
We are excited to announce the launch of the interest rate simulator tool that simulates the expected outcome for a given interest rate curve, and supply and borrow demand curve.
It is a tool to help lending protocols to simulate, analyze and determine appropriate interest rate functions. The level of interest rates and its path are essential for lending markets as they factor into competitiveness and revenue base.
How to use it
- Go to https://irs.riskdao.org/
- Enter the expected initial supply of the market. This input is needed to start simulating the dynamic of the market, as if no users are supplying liquidity even with the interest rate is 0, then nothing would happen.
- Enter the borrow demand function. This can be an arbitrary javascript function that depends on the interestRate variable. The units of the interest rate variable are %. Namely, a value of 5 stands for 5%.
- Enter the supply demand function.
- Enter the platform interest rate function. It can be any javascript function of borrow and supply sizes. A special case is a function that depends on the utilization (borrow/supply). As any javascript function can be entered, a kink can be implemented as well.
Once all inputs are set, click the “run step simulation” button.
Interest rate examples
The following are select interest rate functions that users can apply to run the simulation:
- (100 / (2*5)) * Math.sqrt(6/5) * borrow / supply
- borrow/5
- (100 / (2*5))
How to read the results
The result is a chart showing the market dynamic, and a window showing the final results, and also compares the final results to the theoretical optimum.
In the chart, green dots denote supply to the platform, red dots are the borrow demand.
The graphic charts the interaction between demand and supply at a given interest rate: Every $ supplied attracts borrow demand which increases APYs which in return attracts new supply. This interaction is repeated for a total of 41 steps for the sake of the simulation.
As per the example, $1m is deposited and available for borrowing.
Step 1: The borrow demand matches the supplied funds and all liquidity is absorbed.
Step 2: The new borrow demand induces additional supply to the protocol ($7.5m in total). Supply APY is at 5.5%.
Step 3: The borrow side goes up to $2.1m pushing the APY to 19.6%.
Step 4: The high APY and increased borrow demand attracts further deposits so that supply increases to $12.3m and APY declines to 5.3%.
Step 16+: The supply & demand side stabilize at levels that only change marginally for every additional step.
The demand and supply continue to influence each other to a level where both sides and the APYs stabilize at a given level. For every new step thereafter, borrow and supply numbers remain at roughly the same levels, including the APYs.
The final values for the simulation at which the supply & demand equation stabilizes:
About Risk DAO
Risk DAO is a service DAO focused on providing a new, open-source risk assessment framework, associated audits, and dashboards to stress test, monitor, and manage risk in DeFi lending and borrowing protocols as well as L1 and L2 networks.
You can follow us on Twitter here. You can join our Discord here.