 # Protocol Parameters

## Protocol Parameters

The protocol parameters are to be determined. More details will be provided closer to the launch of Mainnet.

## Interest Rate Model

xBank utilizes a double-slope floating interest rate model which is determined by the demand and supply for the assets at any given time. The interest rate is a function of asset's utilization.
As utilization approaches a 100%, lenders are greatly exposed to the risk of timing of asset return where there could be a delay in getting their deposited asset back due to the lending vault not having enough liquidity (Remember that loans in DeFi are perpetual, meaning that there is no fixed term on when the loan needs to be repaid).
We put a kink rate of the double slope at 80% utilization to protect the lenders from such risks. Once the utilization of the borrowed asset is above 80%, the borrowing interest rises sharply to encourage lenders to deposit more asset into the vault and borrowers to return the borrowed asset, thereby bringing the asset utilization rate back to the desired level.
Below, we discuss the Interest Rate Model for different asset utilization levels.
Borrowing interest is calculated on a per second basis

#### Interest Rate Calculation Formula:

When the utilization rate of the borrowed asset is below 80%, then the interest rate can be calculated using the following formula:
$Interest Rate(APY) = B+Utilization*100*Slope 1$
If the utilization rate of the borrowed asset is above 80%, then the interest rate can be calculated using the following formula:
$Interest Rate (APY)= B+80*Slope 1 + (Utilization-0.8)*100*Slope2$
Below is a table summarizing data for interest calculation for each collateral asset.
Asset
B
Slope 1
Slope 2
ETH
2.310%
0.1236%
0.1236%
USDC
0.000%
0.0584%
1.4765%
DAI
0.000%
0.0584%
1.4765%
Note that the current interest model for testnet is for demonstration purposes. The interest model is subject to change after xBank's mainnet launch.

## Collateral Factor

The Collateral Factor determines the borrow limit based to the value of your collateralized asset. For example, if the Collateral Factor for ETH is 0.825, then the maximum loan size (Borrow Limit) that you can take out is 82.5% of the value of your collateralized ETH. Below is a table summarizing the Collateral Factor (Loan-to-Value or LTV) of each collateral asset at xBank:
Collateral Asset
Collateral Factor (LTV)
ETH
0.825
USDC
0.800
DAI
0.800