# 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 Prime Finance 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://docs.aave.com/risk/liquidity-risk/borrow-interest-rate)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primefi.xyz/borrow/insterest-rate-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
