Interest Rate Model

The interest rate model in Folks Finance is designed to dynamically balance supply and demand, ensuring competitive rates for both borrowers and depositors. This model is crucial for maintaining the stability and efficiency of the lending protocol.

Key Concepts

  1. Utilization Ratio (U):

    • The utilization ratio measures how much of the available pool of assets has been borrowed compared to the total deposited.

    • Formula: U=Total BorrowedTotal Deposited U = \frac{\text{Total Borrowed}}{\text{Total Deposited}}

  2. Variable and Stable Interest Rates:

    • Variable Interest Rate: This rate fluctuates according to the utilization ratio.

    • Stable Interest Rate: This rate is fixed at the time of borrowing but can be rebalanced to ensure the protocol’s stability.

Interest Rate Calculations

  1. Variable Borrow Interest Rate ivb i_{vb}:

    • The variable interest rate depends on the utilization ratio and is calculated using the following formulas:

      • If Ut<UOptU_t < U_{Opt} : ivb(t)=Rv0+UtUOpt×Rv1 i_{vb}(t) = R_{v0} + \frac{U_t}{U_{Opt}} \times R_{v1}

      • If UtUOptU_t \geq U_{Opt} : ivb(t)=Rv0+Rv1+UtUOpt1UOpt×Rv2i_{vb}(t) = R_{v0} + R_{v1} + \frac{U_t - U_{Opt}}{1 - U_{Opt}} \times R_{v2}

  2. Stable Borrow Interest Rate isbi_{sb} :

    • The stable interest rate is calculated similarly but includes additional parameters to handle the ratio of stable borrows:

      • If UtUOptU_t \leq U_{Opt} : isb(t)=Rv1+Rs0(UtUOpt)×Rs1i_{sb}(t) = R_{v1} + R_{s0} \left(\frac{U_t}{U_{Opt}}\right) \times R_{s1}

      • If Ut>UOptU_t > U_{Opt} : isb(t)=(Rv1+Rs0)+Rs1+UtUOpt1UOpt×Rs2 i_{sb}(t) = (R_{v1} + R_{s0}) + R_{s1} + \frac{U_t - U_{Opt}}{1 - U_{Opt}} \times R_{s2}

  3. Rebalancing Stable Rates:

    • To maintain protocol stability, stable rates may need rebalancing under specific conditions:

      • Rebalancing Down: When the current stable rate exceeds the pool’s current stable rate by a defined margin.

      • Rebalancing Up: When the utilization ratio and deposit interest rate meet certain thresholds.

Deposit Interest Rate

  1. Calculation:

    • The deposit interest rate, earned by depositors, is derived from the interest paid by borrowers.

    • Formula: id(t)=Ut×ib(t)×(1RR)i_d(t) = U_t \times i_b(t) \times (1 - RR)

    • ib(t)i_b(t) is the overall borrow interest rate, which is a weighted average of variable and stable borrow rates.

    • ( RR ) is the retention rate, representing the protocol's fee.

  2. Borrow Interest Amount OsbO_{sb}:

    • The stable borrow interest amount is the sum of the stable borrowed amounts multiplied by their respective interest rates.

    • Formula: Osb(t)=Bi×isb(i)O_{sb}(t) = \sum B_i \times i_{sb}(i)

Collateral and Borrow Limits

  1. Collateral Factor (CF):

    • The collateral factor determines how much a user can borrow against their collateral, expressed as a percentage.

    • Example: USDC might have a CF of 80%, meaning $10 of USDC allows borrowing up to $8 in value.

  2. Borrow Amount Calculation:

    • The borrowable amount (BA) is calculated based on the user's collateral balance, the price of the collateral, and the collateral factor.

    • Formula: BA(t)=(Ati×Pi×CFi)BA(t) = \sum (A_{t_i} \times P_i \times CF_i)

  3. Borrow Factor (BF):

    • The borrow factor adjusts the effective borrowed amount to account for asset volatility.

    • Example: ALGO might have a BF of 110%, meaning $10 borrowed is effectively $11 due to its volatility.

Last updated