DegenPrime
  • Introduction
    • DegenPrime
  • Protocol
    • Overview
    • Double D's
      • Diamond Hands πŸ’ŽπŸ™ŒπŸ½
      • Degenerates πŸ“ˆπŸš€
  • Structure
  • Security
    • Liquidations
    • Solvency Checks
    • Degen Account separation
    • Asset whitelisting
    • Token exposure protection
    • Protocol gatekeeping
    • Withdrawal Guard
    • 24-hour Time-Locked Withdrawal
    • Oracle price data
    • Internal Security
    • Third-party security partners
    • Audits
  • TLDR
  • Degen Account
    • Degen Portfolio
    • The Degen Account
      • Zaps
      • Assets
      • Liquidity Pools
      • Stats
  • Leverage and health
    • Numbers for nerds
    • Health and intuition
  • Take Profits
  • Tutorials
  • Diamond Hands
    • HODL
    • Interest
      • Calculations
    • Tutorials
  • Tokenomics
    • Tokenomics
  • Community
    • Socials
  • Brand Assets
Powered by GitBook
On this page
  • Calculating borrowing interest
  • Utilisation Breakpoints
  • Slope
  • Offset
  • Calculating deposit rate
  • Graphs
  1. Diamond Hands
  2. Interest

Calculations

PreviousInterestNextTutorials

Last updated 2 months ago

Interest rates model might change to reflect the market. Stay in the loop in our . In 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 RbR_{b}Rb​ is based on the current pool utilisation. It is a segmented (piecewise-linear) function defined by , , and the .

Β Rb={a1βˆ—u+b1ifΒ u<=u1,a2βˆ—u+b2ifΒ u1<u<=u2,a3βˆ—u+b3ifΒ u2<u<=u3,a4βˆ—u+b4ifΒ u>u3Β Rbβˆ’borrowingΒ rateuβˆ’poolΒ utilisationa1,2,3,4βˆ’slopesb1,2,3,4βˆ’offsetsu1,2,3βˆ’utilisationΒ breakpoints \ 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}\\ Β Rb​=βŽ©βŽ¨βŽ§β€‹a1β€‹βˆ—u+b1​a2β€‹βˆ—u+b2​a3β€‹βˆ—u+b3​a4β€‹βˆ—u+b4​​ifΒ u<=u1​,ifΒ u1​<u<=u2​,ifΒ u2​<u<=u3​,ifΒ u>u3​​ Rbβ€‹βˆ’borrowingΒ rateuβˆ’poolΒ utilisationa1,2,3,4β€‹βˆ’slopesb1,2,3,4β€‹βˆ’offsetsu1,2,3β€‹βˆ’utilisationΒ breakpoints

Utilisation Breakpoints

The utilisation breakpoints define the points at which the 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, DegenPrime 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)

0.6

0.6

0.8

0.8

0.9

0.9

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 to keep liquidity available for withdrawals. In the final range, liquidity must be freed up to bring the utilisation back to a healthy ratio. In this last part rates grow with exceptional speed.

Non-stables (BTC, ETH, etc)
Stables (USDC)

0.050

0.167

0.200

0.250

0.500

1.000

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 (BTC, ETH, etc)
Stables (USDC)

0

0

-0.090

-0.050

-0.330

-0.650

-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.

Rd=Rbβˆ—uRdβˆ’depositΒ rateR_d = R_b * u\\ R_d - \text{deposit rate}\\ Rd​=Rbβ€‹βˆ—uRdβ€‹βˆ’depositΒ rate

Graphs

Non-stables

Stables

​

​

​

​

u1u_1u1​
u2u_2u2​
u3u_3u3​
a1a_{1}a1​
a2a_{2}a2​
a3a_{3}a3​
a4a_{4}a4​
b1b_1b1​
b2b_2b2​
b3b_3b3​
b4b_4b4​
Telegram
utilisation breakpoints
slopes
offsets
slope
Interest graph non-stable assets Utilisation -> Borrow APY -> Deposit APY: 60% -> 3% -> 1.8% 80% -> 7% -> 5.6% 90% -> 12% -> 10.8% 100% -> 310% -> 310%
Interest graph stable assets Utilisation -> Borrow APY -> Deposit APY: 60% -> 10% -> 6% 80% -> 15% -> 12% 90% -> 25% -> 22.5% 100% -> 90% -> 90%