Folks Finance
xChain App (NEW)Algorand AppContact usV1 Docs
  • Welcome to Folks Finance
  • Folks Finance Algorand app documentation
  • Introduction
    • Get started
      • Create a wallet
      • Get ALGO or ASAs
      • Connect wallet to Folks Finance
    • V2, what's new?
    • Need help?
      • Contact
      • Glossary
      • FAQ
      • Fees
      • Allowing pop-up
    • V2 Testnet tips
  • Functionalities
    • 🏦Deposit
    • 💰Loan
      • Collateral
      • Borrow
    • 🔄Swap and...
    • 🏛️xALGO - Liquid Staking
      • How to Migrate from gALGO to xALGO
    • 🚜Lending Pools
    • 📈Ultraswap
    • 🛣️Folks Router
    • 🔗Algorand Consensus
      • No code
      • SDK
  • Architecture
    • Parameters
    • Pool dynamics
    • Interest rate model
    • Rebalancing
    • Loan collateral
    • Loan borrow
    • Liquidation
    • Loan types
    • Flash loan
  • TOKENOMICS
    • FOLKS
  • DEVELOPER
    • Security
      • Bug bounty
      • Audits
    • Contracts
    • Official SDKs
  • COMMUNITY
    • Contact
    • Work with us
    • Ambassador program
    • Brand & Logos
    • Community treasury
    • Aeneas liquidity program
    • Privacy and T&C
Powered by GitBook
On this page
  • Borrow interests rates
  • Deposit interests rates
  1. Architecture

Interest rate model

There are a number of interest rates used to determine the interest paid on borrowings and interest received on deposits. There are also interest indexes which are used to track the accrued interest.

Borrow interests rates

To differentiate the variable parameters from the stable ones, we are going to use the subscript sss​ for stable and vvv​ for variable. The variable borrow interest rate ivbti_{vb_t}ivbt​​ and stable borrow interest rates isbti_{sb_t}isbt​​ are calculated based on the optimal utilisation ratio UoptU_{opt}Uopt​ and optimal stable to total debt ratio 0ratio0_{ratio}0ratio​​ set by the protocol.

If Ut<UOptU_t < U_{Opt}Ut​<UOpt​

ivbt=Rv0+UtUOpt∗Rv1i_{vb_{t}}=R_{v0}+ \frac{U_t}{U_{Opt}}*R_{v1} ivbt​​=Rv0​+UOpt​Ut​​∗Rv1​

If Ut⩾UoptU_t \geqslant U_{opt}Ut​⩾Uopt​

ivbt=Rv0+Rv1+Ut−Uopt1−Uopt∗Rv2i_{vb_t}=R_{v0}+R_{v1}+\frac{U_t-U_{opt}}{1-U_{opt}}* R_{v2}ivbt​​=Rv0​+Rv1​+1−Uopt​Ut​−Uopt​​∗Rv2​

If Ut⩽UoptU_t \leqslant U_{opt}Ut​⩽Uopt​

isbt=(Rv1+Rs0)+UtUOpt∗Rs1i_{sb_t}=(R_{v1}+R_{s0})+\frac{U_t}{U_{Opt}}*R_{s1 }isbt​​=(Rv1​+Rs0​)+UOpt​Ut​​∗Rs1​

If Ut>UoptU_t > U_{opt}Ut​>Uopt​

isbt=(Rv1+Rs0)+Rs1+Ut−UOpt1−UOpt∗Rs2i_{sb_t}=(R_{v1}+R_{s0})+R_{s1}+ \frac{U_t- U_{Opt}}{1 -U_{Opt}}*R_{s2}isbt​​=(Rv1​+Rs0​)+Rs1​+1−UOpt​Ut​−UOpt​​∗Rs2​

If Ratio>0ratioRatio > 0_{ratio}Ratio>0ratio​, an excess is added to the stable borrow interest rate:

isbt+=Rs3∗ratio−0ratio1−0ratioi_{sb_t}+=R_{s3}*\frac{ratio-0_{ratio}}{1-0_{ratio}} isbt​​+=Rs3​∗1−0ratio​ratio−0ratio​​

The overall borrow interest rate ibti_{b_t}ibt​​ factors in all variable and stable rate borrows and is calculated by taking the weighted average of the total variable and stable borrowed amounts and their respective interest rates.

ibt=TotalVariableBorrowAmount∗ivbt+∑Bi∗isbiTotalDebti_{b_t}=\frac{TotalVariableBorrowAmount*i_{vb_t}+\sum{B_i*i_{sb_i}}}{TotalDebt}ibt​​=TotalDebtTotalVariableBorrowAmount∗ivbt​​+∑Bi​∗isbi​​​

Where:

  • ivbti_{vb_t}ivbt​​is the variable borrow amount,

  • BiB_iBi​ is the stable borrow amount,

  • isbii_{sb_i}isbi​​is the stable borrow rate,

  • the subscript iii represents each stable borrow taken on the protocol.

Deposit interests rates

The deposit interest rate idti_{d_t}idt​​ is directly dependent on the overall borrow interest rate ibti_{b_t}ibt​​. The borrow interest is divided between the depositors, excluding what is retained by the protocol.

idt=Ut∗ibt∗(1−RR)i_{d_t}= U_t*i_{b_t}*(1-RR) idt​​=Ut​∗ibt​​∗(1−RR)

Where:

  • RRRRRR is the retention rate i.e. the interest kept by the protocol as revenue.

Last updated 1 year ago