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
  1. Architecture

Loan collateral

For safety reasons, the total amount that can be borrowed has to be less than the value of the collateral, in case of negative fluctuations in the collateral value and to guarantee the interest payment.

The collateral factor CFCFCF represents how much a user can borrow against the collateral supplied to the protocol, in percent terms. For example, a more stable asset such as USDC may have CF=80CF=80%CF=80% (for $10 supplied, up to $8 of value can be borrowed against it) whereas ALGO may have CF=60CF=60%CF=60%.

Consider a user who deposits multiple assets and uses them as collateral for a loan. The borrowable amount BAtBA_tBAt​ at time ttt for a given loan’s collateral balance is:

BAt=βˆ‘i=ASSETcollateralAtiβˆ—Piβˆ—CFiBA_t=\sum_{i=ASSET}^{collateral}A_{t_i}*P_i*CF_iBAt​=i=ASSETβˆ‘collateral​Atiβ€‹β€‹βˆ—Piβ€‹βˆ—CFi​

Where:

  • AtiA_{t_i}Ati​​ denotes the current user collateral balance if they were to withdraw the Asset.

  • PiP_iPi​ is the price of the collateral asset​.

  • CFiCF_iCFi​ is the collateral factor.

  • the subscript iii represents each collateral of the loan.

Since the collateral is composed of different assets, the maximum borrowable amount of each collateralized token must be computed and summed together.

Last updated 1 year ago