šŸ”¶Interest rate

Borrow Interest Rate

Flary's interest rate algorithm is finely tuned to address liquidity risk and optimize asset utilization. The borrow interest rates are determined by the Utilization Rate UU, which indicates the availability of capital within the platform. This model effectively manages liquidity risk by incentivizing users to maintain liquidity:

During periods of ample capital availability, lower interest rates are set to encourage borrowing.

During periods of limited capital availability, higher interest rates are applied to incentivize timely debt repayments and additional asset supplying.

Our approach ensures a balanced liquidity environment, promoting efficient capital deployment across the platform.

Flary's Interest Rate Model

Flary's interest rate model addresses liquidity risk, which materializes when utilization is high, particularly as UU approaches 100%. To manage this, the interest rate curve is bifurcated around an optimal utilization rate UoptimalU_{\text{optimal}}. Below this optimal rate, the slope of the curve is shallow, but it rises sharply once UU exceeds UoptimalU_{\text{optimal}}.

Interest Rate Calculation

The interest rate RtR_t​ follows the model:

  • ​IfU≤Uoptimal:Rt=R0+(UtUoptimal)Rslope1​If U≤ U_{\text{optimal}}: R_t = R_0 + \left(\frac{U_t}{U_{\text{optimal}}}\right) R_{\text{slope1}}​

    IfU>Uoptimal:Rt=R0+Rslope1+(Utāˆ’Uoptimal1āˆ’Uoptimal)Rslope2​If U > U_{\text{optimal}}: Rt=R0+ R_{\text{slope1}} + \left(\frac{U_t - U_{\text{optimal}}}{1 - U_{\text{optimal}}}\right) R_{\text{slope2}}​

Compounded Interest Calculation

In the borrow rate technical implementation, the calculateCompoundedInterest method approximates the interest, primarily affecting high rates. The resulting actual borrow rate is given by:

ActualAPY=(1+TheoreticalAPY/secsperyear​)secsperyearāˆ’1Actual APY=(1+{Theoretical APY}/{secs per year}​)^{secs per year}āˆ’1

Rate Dynamics

  • Below UoptimalU_{\text{optimal}}: Borrow interest rates increase slowly with utilization.

  • Above UoptimalU_{\text{optimal}}​: Borrow interest rates rise sharply, potentially exceeding 50% APY if liquidity is fully utilized.

Variable vs. Stable Interest Rates

Both variable and stable interest models are derived from the formula above, with different parameters for each asset.

  • Variable Debt: Rates evolve constantly with utilization.

  • Stable Debt: Rates remain fixed at issuance until specific rebalancing conditions are met. In V3, interest models are optimized with the new rate strategy parameter Optimal Stable/Total Debt Ratio to algorithmically manage stable rates.

IfĀ ratio<ratioo:Rt=r0+(ratioāˆ’ratioo1āˆ’ratioo)Rbase\text{If } \text{ratio} < \text{ratio}_o: R_t = r_0 + \left( \frac{\text{ratio} - \text{ratio}_o}{1 - \text{ratio}_o} \right) R_{\text{base}}

Flary Finance Model Parameters

Firstly, it’s crucial to differentiate assets primarily used as collateral, typically volatile, necessitating continuous liquidity to facilitate prompt liquidations. Secondly, the liquidity of assets on Flary is pivotal; higher liquidity fosters more stable utilization. Consequently, assets with lower liquidity levels should observe more conservative interest rates.

Considering market conditions is equally important; Flary’s borrowing costs must align with prevailing yield opportunities to prevent potential rate arbitrage. With the rise of liquidity mining, Flary has adjusted borrowing costs by reducing the optimal utilization of affected assets. This adjustment has increased borrowing costs, partially offset by liquidity rewards.

Variable Interest Rate Model Parameters

Variable rate parameters:

  • UoptimalU_{\text{optimal}}

  • Base Variable Borrow Rate

  • Variable Rate Slope 1

  • Variable Rate Slope 2

Stable Interest Rate Model Parameters

Stable rate parameters:

  • UoptimalU_{\text{optimal}}

  • Base Variable Borrow Rate

  • Variable Rate Slope 1

  • Variable Rate Slope 2

  • Stable to Total Debt Ratio

The stable rate provides predictability for the borrower; however, it comes at a cost, as the interest rates are higher than the variable rate.

The assets that are most exposed to liquidity risk do not offer stable rate borrowing.

The base rate of the stable rate model corresponds to the average market rate of the asset.

Stable Interest Rate Rebalance

In certain conditions, the protocol enables stable rates to be rebalanced to avoid a large percentage of liquidity being borrowed at a stable rate below the market variable rate. In V3, the condition for rebalance is if the current supply rate ≤\leq≤ supply rate if all borrows are variable Ɨ0.9\times 0.9Ɨ0.9, smart contract reference.

V3 Interest Rate Parameters

The interest rate parameters for V3 markets have been deployed with 3 interest rate strategies calibrated per cluster of assets that share similar risk profiles.

Rate Strategy Volatile One

Volatile assets need liquidity at all times and are thus calibrated at a low Optimal Utilisation Ratio.

Assets: LINK, WMATIC, WETH, WBTC, WAVAX, WFTM, SUSHI

Parameters:

Parameter
Value

Optimal Usage

45%

Base Variable Borrow Rate

0%

Variable Rate Slope 1

4%

Variable Rate Slope 2

300%

Base Stable Borrow Rate

2%

Stable Rate Slope 1

7%

Stable Rate Slope 2

300%

Optimal Stable to Total Debt Ratio

20%

Rate Strategy Stable One

Low liquidity stablecoins have a lower Optimal Utilisation Ratio than those with higher liquidity.

Assets: DAI

Parameters:

Parameter
Value

Optimal Usage

90%

Base Variable Borrow Rate

0%

Variable Rate Slope 1

4%

Variable Rate Slope 2

60%

Base Stable Borrow Rate

2%

Stable Rate Slope 1

0.5%

Stable Rate Slope 2

60%

Optimal Stable to Total Debt Ratio

20%

Rate Strategy Stable Two

High liquidity stablecoins which are calibrated to lower rates to encourage borrowing.

Assets: USDC, USDT, AGEUR

Parameters:

Parameter
Value

Optimal Usage

80%

Base Variable Borrow Rate

0%

Variable Rate Slope 1

4%

Variable Rate Slope 2

75%

Base Stable Borrow Rate

1%

Stable Rate Slope 1

0.5%

Stable Rate Slope 2

75%

Optimal Stable to Total Debt Ratio

20%

When market conditions change, the interest rate parameters must be adapted to utilization on Flary’s market as well as to incentives across DeFi.

Supply Rate

The borrow interest rates paid are distributed as yield for aToken holders who have supplied to the protocol, excluding a share of yields sent to the ecosystem reserve defined by the reserve factor. This interest rate is generated on the asset that is borrowed out then shared among all the liquidity providers. The supply APY, DtD_t​, is:

St=Ut(SBtSt+VBtVt)(1āˆ’Rt)S_t = U_t \left( \frac{S_{B_t}}{S_t} + \frac{V_{B_t}}{V_t} \right) (1 - R_t)

Where:

  • UtU_t​ is the utilization ratio

  • SBtSB_t​​ is the share of stable borrows

  • StS_t​ is the average stable rate

  • VBtVB_t is the share of variable borrows

  • VtV_t is the variable rate

  • RtR_t​ is the reserve factor

You can view the protocol's deposit APY on the Flary App for each asset.

Last updated