๐Ÿ“–
Yupana Document Portal
  • Introduction
    • What is Yupana.Finance?
    • Participants
    • FAQ
  • Lending
    • Supplying assets
      • General
    • Borrowing assets
      • General
  • Liquidation
  • Liquidity Risk
    • Yupana Interest Rate
  • โš™๏ธDeveloper space
    • yToken contract methods
      • ๐Ÿ“„Storage overview
      • accrueInterest
      • priceCallback
      • updateInterest
      • ๐Ÿ”ตLending methods
        • borrow
        • enterMarket
        • exitMarket
        • liquidate
        • mint
        • redeem
        • repay
      • ๐Ÿ”ตFA2 Token entrypoints
        • balance_of
        • get_total_supply
        • transfer
        • update_operators
      • ๐Ÿ›‘Admin methods
        • ๐Ÿ“ฅSetup entrypionts
          • setTokenAction
          • setUseAction
        • ๐ŸคนManage entrypoints
          • addMarket
          • setAdmin
          • setBorrowPause
          • setGlobalFactors
          • setTokenFactors
          • updateMetadata
          • withdrawReserve
    • InterestRate contract
      • ๐Ÿ”ตOn-chain views
        • getBorrowRate
        • getSupplyRate
        • getUtilizationRate
      • ๐Ÿ›‘Admin methods
        • setCoefficients
        • updateAdmin
    • PriceFeed contract
      • getPrice
      • receivePrice
      • ๐Ÿ›‘Admin methods
        • setProxyAdmin
        • updateOracle
        • updatePair
        • updateYToken
  • Agreements
    • Terms of Service
    • Privacy Policy
    • Cookie Policy
Powered by GitBook
On this page
  1. Developer space
  2. InterestRate contract

On-chain views

PreviousInterestRate contractNextgetBorrowRate

Last updated 3 years ago

This section describes on-chain (old-style) views to provide math of utilization, borrow and supply rate.

Let is

U=borrowscash+borrowsโˆ’reservesU = \dfrac{borrows}{cash+borrows-reserves}U=cash+borrowsโˆ’reservesborrowsโ€‹

and

kink=Uโˆ—kink = U^*kink=Uโˆ—

then is

B={baseRate+Uโˆ—multiplierifย UโฉฝUโˆ—baseRate+Uโˆ—โˆ—multiplier+(Uโˆ’Uโˆ—)โˆ—jumpMultiplierifย U>Uโˆ—B = \begin{cases} baseRate + U * multiplier & \text{if } U \leqslant U^*\\ baseRate + U^* * multiplier + (U - U^*) * jumpMultiplier & \text{if } U > U^*\\ \end{cases}B={baseRate+Uโˆ—multiplierbaseRate+Uโˆ—โˆ—multiplier+(Uโˆ’Uโˆ—)โˆ—jumpMultiplierโ€‹ifย UโฉฝUโˆ—ifย U>Uโˆ—โ€‹

finally, is

S=Bโˆ—Uโˆ—(1โˆ’reserveFactor)S=B*U*(1-reserveFactor)S=Bโˆ—Uโˆ—(1โˆ’reserveFactor)
โš™๏ธ
๐Ÿ”ต
utilisationRate
getUtilizationRate
borrowRate
getBorrowRate
supplyRate
getSupplyRate