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 borrow

After a user has locked up their collateral, they can borrow against it. The amount the user has borrowed of a given asset is defined as BtB_tBt​​ whereas the borrow balance of a given asset BBtBB_tBBt​​ is defined as the amount borrowed plus accrued interest.

The borrow factor BFBFBF​ represents the effective borrowed amount given a borrow, in percent terms. For example, a more volatile asset may have BF=110BF=110BF=110​% (for $10 borrowed, it is as if $11 has been effectively borrowed) whereas a less volatile asset may have BF=100BF=100BF=100​%.

Consider a user who borrows multiple assets. The total borrowed amount TBtTB_tTBt​ at time t for a given loan’s borrows is:

TBt=βˆ‘i=ASSET,V/SborrowedBBtiβˆ—Piβˆ—BFiTB_t=\sum_{i=ASSET,V/S}^{borrowed}BB_{t_i}*P_i*BF_iTBt​=i=ASSET,V/Sβˆ‘borrowed​BBtiβ€‹β€‹βˆ—Piβ€‹βˆ—BFi​

Where:

  • BBtBB_tBBt​ denotes the current user borrow balance of a borrow,

  • PiP_iPi​ is the price of the borrowed asset,

  • BFiBF_iBFi​ is the borrow factor,

  • the subscript iii represents each borrow of the loan where a borrow is a unique pairing of asset and variable/stable rate.

The total borrowed TBtTB_tTBt​ must not exceed the borrowable amount BAtBA_tBAt​, otherwise the loan can be liquidated by a third party:

TBtβ©½BAtTB_t \leqslant BA_tTBt​⩽BAt​

If a borrow or reduce collateral operation would lead to the above condition being violated then it will be rejected by the protocol.

Last updated 1 year ago