Skip to content

Borrowing Interest Rate Model

The Likwid Protocol uses a tiered borrowing rate curve configured through marginState in MarginBase. The borrow rate increases with utilization so that lightly used pools stay efficient while highly utilized pools become progressively more expensive to borrow from.

Utilization Rate

At the contract level, utilization is computed from the pool's mirror reserve relative to the total borrow-side reserve:

u=mirrorReserverealReserve+mirrorReserve

This is equivalent to measuring how much of the borrow-side reserve is already mirrored into active debt.

Interest Rate Calculation

The implementation in InterestMath.getBorrowRateByReserves() applies three cumulative segments:

1. Low Utilization Phase

When utilization is below Umedium, the rate increases linearly from the base rate:

r=rbase+u×mlow
  • rateBase (r_base): Base borrow rate.
  • u: Utilization rate.
  • mLow (m_low): Slope applied before the medium threshold.

2. Medium Utilization Phase

Once utilization reaches Umedium, the medium slope is added on top of the low-utilization segment:

r=rbase+Umedium×mlow+(uUmedium)×mmedium
  • useMiddleLevel (U_medium): Medium utilization threshold.
  • mMiddle (m_medium): Slope applied between the medium and high thresholds.

3. High Utilization Phase

Above Uhigh, the high-utilization slope is layered on top of both prior segments:

r=rbase+Umedium×mlow+(UhighUmedium)×mmedium+(uUhigh)×mhigh
  • useHighLevel (U_high): High utilization threshold.
  • mHigh (m_high): Slope applied once utilization exceeds the high threshold.

Default Parameters

The deployed defaults are initialized in MarginBase as raw marginState values, where 1,000,000 = 100%.

ParameterContract fieldDescriptionDefault Value
r_baserateBaseBase interest rate20000 (2%)
m_lowmLowSlope for low utilization phase10
U_mediumuseMiddleLevelMedium utilization threshold300000 (30%)
m_mediummMiddleSlope for medium utilization phase100
U_highuseHighLevelHigh utilization threshold700000 (70%)
m_highmHighSlope for high utilization phase10000

Built from Markdown and deployed through Cloudflare Pages.