Interest Rate Details
Interest rates for lending and borrowing on DDEX are set algorithmically based on supply and demand. As demand increases, the interest rates go up. As supply increases, the interest rates go down.
The equations that we use on DDEX for interest rate are:
BI = 0.02 + 0.48R⁴ + 0.5R⁸
All Other Borrowing:
BI = 0.10 + 0.4R⁴ + 0.5R⁸
BI = Borrowing Interest Rate
R = Utilization Rate
Lending interest rate is calculated based on the borrowing interest rate, split among the pool. The equation is as follows:
Lending: LI = BI * R * 0.95
5% of the lending rate is sent to an insurance fund, to help maintain healthy liquidations.
For ETH, the interest rates graphically look like:
The green line is the borrowing interest rate, the purple line is the lending interest rate.
For all other assets, the interest rates graphically look like:
Again, borrowing is in green, lending is in purple.
Interest Rate Philosophy
Interest rates in margin trading are used to incentivize both the lenders and the borrowers. Using non-linear functions for this helps to reduce the chance that a lending pool could be tapped out.
For margin trading, the most important thing is to not reach 100% utilization: at that point, users couldn't create additional positions with that asset! This structure helps really boost interest gains for lenders when the utilization is high, thus driving more supply to prevent 100% utilization.
For a more detailed discussion on interest rates, check out this article.