# Calculations

Interest rates model might change to reflect the market. Stay in the loop in our Discord. InIn the near future this static model, will be updated to a dynamic interest rate model, to automatically reflect supply and demand.

### Calculating borrowing interest

The borrowing rate $R_{t}$** **is based on the current pool utilisation. It is a segmented (piecewise-linear) function defined by utilisation breakpoints, slopes and the offsets.

$\ R_{b} = \begin{cases} a_{1}*u +b_{1} & \quad \text{if } u <= u_{1},\\ a_{2}*u +b_{2} & \quad \text{if } u_{1}<u <= u_{2},\\ a_{3}*u +b_{3} & \quad \text{if } u_{2}<u <= u_{3},\\ a_{4}*u +b_{4} & \quad \text{if } u > u_{3} \end{cases} \ \\ \\ R_{b} - \text{borrowing rate}\\ u - \text{pool utilisation}\\ a_{1,2,3,4}-\text{slopes}\\ b_{1,2,3,4}-\text{offsets}\\ u_{1,2,3}-\text{utilisation breakpoints}\\$

**Utilisation **Breakpoints

**Utilisation**Breakpoints

The utilisation breakpoints define the points at which the slope should change. They are tuned to ensure ideal pool utilisation, and might change in the future. For both stables and non-stables, ideal utilisation ratio is set at 75%. For USDC that ratio is set at 85%.

By having multiple utilisation breakpoints instead of just one, DeltaPrime creates an optimal utilisation range. Instead of suddenly increasing the slope, there are ranges, to stabilize the interest rate around the ideal pool utilisation.

Non-stables (AVAX, ARB, etc) | Stables (USDC, DAI, etc) | |
---|---|---|

$u_1$ | 0.6 | 0.6 |

$u_2$ | 0.8 | 0.8 |

$u_3$ | 0.9 | 0.9 |

**Slope**

**Slope**

The slope defines the steepness with which the interest rates rise. In the beginning, it equals 0 (a constant function) to ensure low borrowing APR and encourage borrowing. In the second range rates moderately rise.The ideal pool utilisation percentage is in this range. In the third part, rates grow rapidly to encourage deposits and repayments and keep liquidity available for withdrawals. In the final range, liquidity must be freed up to bring the utilization back to a healthy ratio. In this last part rates grow with exceptional speed.

Non-stables (AVAX, ARB, etc) | Stables (USDC, DAI, etc) | |
---|---|---|

$a_{1}$ | 0.050 | 0.167 |

$a_{2}$ | 0.200 | 0.250 |

$a_{3}$ | 0.500 | 1.000 |

$a_{4}$ | 29.800 | 6.500 |

### Offset

If we combine the utilisation breakpoints with the desired interest rates, there needs to be an offset to make the graph connect. The following numbers are the result of the formula which brings the full graph together.

Non-stables (AVAX, ARB, etc) | Stables (USDC, DAI, etc) | |
---|---|---|

$b_1$ | 0 | 0 |

$b_2$ | -0.090 | -0.050 |

$b_3$ | -0.330 | -0.650 |

$b_4$ | -26.700 | -5.600 |

### Calculating deposit rate

Deposit rate is calculated based on current borrowing rate and pool utilisation and balances total interests of all borrowers and all depositors.

$R_d = R_b * u\\ R_d - \text{deposit rate}\\$

### Graphs

#### Non-stables

#### Stables

Last updated