# Interest Rate Model

### Purpose

The Interest Rate Model is a fundamental component in decentralized finance (DeFi) protocols, particularly for lending and borrowing platforms. It is designed to dynamically adjust the interest rates based on the utilization of the asset pool, thereby ensuring an efficient allocation of capital and maintaining the stability of the protocol.

### How It Works

The Interest Rate Model uses a set of parameters defined in the `IRMParams`

struct, which includes the base rate, kink rate, slope1, and slope2. These parameters allow the model to create a piecewise linear interest rate curve that adjusts based on the utilization ratio of the asset pool.

**Base Rate**: The minimum interest rate applied regardless of utilization.**Kink Rate**: The utilization ratio threshold at which the interest rate curve changes its slope.**Slope1**: The interest rate increases per unit of utilization before reaching the kink rate.**Slope2**: The interest rate increases per unit of utilization after exceeding the kink rate.

By combining these parameters, the model calculates the appropriate interest rate to apply at any given utilization level, ensuring a balanced and efficient lending and borrowing environment.

The interest rate *R* follows the model:

where *U* is the utilization ratio of the lending pool.

Last updated