> For the complete documentation index, see [llms.txt](https://docs.primefi.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.primefi.xyz/product/borrow/insterest-rate-model.md).

# Interest Rate Model

## Interest Rates (APY) & Utilization

PrimeFi's interest rate algorithm is finely tuned to address liquidity risk and enhance utilization. Borrow interest rates are determined based on the utilization rate, denoted as U.

U serves as an indicator of the capital availability within the pool. The interest rate model effectively handles liquidity risk in the protocol by aligning user incentives to bolster liquidity:

* During periods of ample capital availability, the model promotes low-interest rates to incentivize borrowing.
* In times of capital scarcity, higher interest rates are encouraged to stimulate debt repayments and foster additional capital supply.

## Interest Rate Model

Liquidity risk becomes pronounced as utilization reaches higher levels, particularly when U approaches 100%. To cater to this constraint, the interest rate curve is bifurcated around an optimal utilization rate, denoted as U\_optimal. Prior to U\_optimal, the slope is gradual, while beyond it, the slope increases steeply.

The interest rate Rₜ follows the model:

$$
\text{if } U \leq U\_{\text{optimal}} : \quad R\_t = R\_0 + \frac{U\_t}{U\_{\text{optimal}}} R\_{\text{slope1}}
$$

$$
\text{if } U > U\_{\text{optimal}} : \quad R\_t = R\_0 + R\_{\text{slope1}} + \frac{U\_t - U\_{\text{optimal}}}{1 - U\_{\text{optimal}}} R\_{\text{slope2}}
$$

Given that these elements of the PrimeFi smart contracts draw inspiration from Aave, kindly consult their documentation for the computation of Annual Percentage Yield (APY):

[Link to Aave documentation on APY calculations](https://aave.com/docs/concepts/reserves#interest-rates)
