# Chiss Interest Rate Model ## Overview A lending protocol uses smart contracts to aggregate liquidity from lenders, and allow for loans to be taken against this combined liquidity by borrowers. We sometimes refer to the liquidity as "funds" or "capital." - **Lenders (Suppliers)** earn interest based on the liquidity they provide - **Borrowers** are obligated to pay interest on their loans Lending protocols often set aside a "reserve factor" — a percentage of capital supplied by lenders that they do not receive interest on. The interest from this capital instead goes to the protocol, and is sometimes called the "spread." ## Utilization and Interest Rates The degree of borrowing influences interest rates — we call this "borrow demand." The greater the percentage of deposits loaned out, the more the interest rates rise. We refer to the degree of borrowing relative to the supply of borrowable funds as **"utilization."** ### Utilization Calculation Utilization is typically calculated as: ``` Utilization Rate = Total Borrowed / Total Liquidity ``` - If there are no borrowers: utilization = 0% - If deposits are fully loaned out: utilization = 100% - The value of utilization is used as the sole driver of interest rates **Note:** Borrow demand is relative to total deposits. If total deposits increase but borrow demand stays the same, utilization goes down. ### How Utilization Drives Interest Rates In a properly designed protocol, changes in utilization lead to rising/falling interest rates: #### When utilization rises (high demand for borrowing): - Borrow and supply interest rates **increase** - Lending is **incentivized**, borrowing is **disincentivized** - Consequence: idle liquidity increases, borrow demand falls → lower utilization #### When utilization falls (excess idle liquidity): - Borrow and supply rates **decrease** - Borrowing is **incentivized**, lending is **disincentivized** - Consequence: idle liquidity decreases, borrow demand rises → higher utilization ## Linear Interest Rate Model It is undesirable for all available funds to be lent out (100% utilization). Under this circumstance, lenders cannot withdraw. Therefore, when all capital is used up, we want strong incentives in place for lenders to supply more funds to the protocol — or for borrowers to return borrowed assets. ### Implementation ```solidity /** * @dev Calculate current interest rate based on global utilization * Formula: Interest Rate = Base Rate + (Utilization × Slope Rate) */ function calculateCurrentInterestRate() public view returns (uint256 interestRate) { uint256 totalLiquidity = ILendingPoolPrototype(lendingPool).totalLiquidity(); uint256 totalBorrowed = ILendingPoolPrototype(lendingPool).totalBorrowed(); if (totalLiquidity == 0) { return rateConfig.baseRate; } uint256 utilization = totalBorrowed / totalLiquidity; // Rate = Base + (Utilization × Slope) interestRate = rateConfig.baseRate + utilization * rateConfig.slopeRate; return interestRate; } ``` ## Linear Rate Model Compute ### Base Rate and Slope Settings Chiss uses a base rate and slope parameters to calculate variable interest rates: - **Base Rate**: The minimum interest rate when utilization is 0% - **Slope 1**: Computes how steep the interest curve is as a function of the utilization ratio These settings are determined by governance and can be adjusted to respond to market conditions. ### Interest Rate Calculation Formula ``` Interest Rate = Base Rate + (Utilization Rate × Slope 1) ``` ## Practical Example If $8 million is borrowed from a $10 million liquidity pool: - Utilization rate = 80% - This high rate triggers an increase in interest rates to attract more lenders and discourage further borrowing ## Factors Affecting Interest Rates ### Supply and Demand The main driver of interest rates is the balance between supply and demand for each asset, measured by the utilization rate: | Utilization Level | Interest Rate Behavior | Effect | |------------------|----------------------|---------| | **Low utilization** | Rates decrease | Encourages more borrowing | | **High utilization** | Rates increase | Attracts more lenders, discourages excessive borrowing | ### Market Dynamics - When few people are borrowing → interest rates decrease to encourage borrowing - When many people are borrowing → interest rates increase to attract lenders and control demand