# Interest rate model

ElaraLend implements a dynamic interest rate model that scales with the utilization rate, affecting both deposit and borrowing rates. This model is designed to maintain protocol solvency and encourage optimal capital efficiency.

## Key components

1. **Utilization rate:** The utilization rate is the ratio of borrowed assets to total supplied assets in a specific pool. It's a crucial factor in determining interest rates.
2. **Base rate:** A minimum interest rate applied even at low utilization.
3. **Slope:** Determines how quickly the interest rate increases as utilization rises.
4. **Kink point:** A predefined utilization rate threshold where the interest rate curve becomes steeper.

## How it works

1. **Supply interest rate**

* Increases as the utilization rate rises
* Encourages users to deposit assets when liquidity is needed

2. **Borrow interest rate**

* Also increases with utilization rate
* Discourages excessive borrowing when liquidity is low

3. **Kink mechanism**

* Below the kink point: interest rates increase gradually
* Above the kink point: interest rates rise more rapidly

4. **Real-time accrual**

* Interest accrues every second based on the current block timestamp

## Formula

For utilization rate (U) below or at kink (K):&#x20;

$$
rate = base rate + (U / K) \* slope1
$$

For U above K:&#x20;

$$
rate = base rate + slope1 + ((U - K) / (1 - K)) \* slope2
$$

Where slope2 > slope1, causing a steeper increase above the kink.

This model ensures that Elara can maintain a balance between attractive yields for suppliers and sustainable rates for borrowers while adapting to varying market conditions.
