📜
SRWA Docs
SRWA.ioDemo Application
  • Intro
    • 🥳Welcome!
    • 🔥What's new?
    • 💰Lending
    • 📑RWA Vaulting
    • ✅SRWA Validator
    • 🏅Recognition
    • 🪙SRWA Token - $RWA
  • Products
    • SRWA Lending
      • Core Principles
      • Solution Architecture
      • User Badge
      • Web Application
        • Lending
        • Deposit & Withdraw
        • Borrow & Repay
        • Market
        • Wallet
        • Transactions
      • Lending Protocol
        • Protocol Operation
        • APY Calculation
          • Interest per Epoch
          • Account Position Calculations
        • Liquidations
          • Liquidation Function
          • Regular Liquidation
          • Insolvency Liquidation
          • Micro Liquidation
      • Vaults
        • Pool Params
      • Radix API / Gateway
      • Oracle
      • Risk management
      • Additional Considerations
      • Protocol Incentives
      • Security Audits
      • Release Candidate Config
        • Pool XRD
        • Pool xUSDC
    • SRWA Vaulting
  • Projects
    • 🏗️Ploughshare
  • General Information
    • ☎️Contact
Powered by GitBook
On this page
  • Epoch time
  • Borrow interest per epoch
  • Deposit interest per epoch

Was this helpful?

  1. Products
  2. SRWA Lending
  3. Lending Protocol
  4. APY Calculation

Interest per Epoch

As the APY represents the interest per annum, it is readable for humans. However, the distributed ledger has an internal clock counted in epochs and it is needed to translate APY into interest rate per epoch:

Epoch time

et - epoch time, set at 5 minutes on the Radix network

Borrow interest per epoch

r_borrow = (borrow_rate + 1) ^ (et / (365 * 24 * 60) - 1

Deposit interest per epoch

r_deposit = r_borrow * (1 - reserve_factor)

It is worth noting that the APY calculation is enabled by using the pow() function from the Scrypto Math package.

PreviousAPY CalculationNextAccount Position Calculations

Last updated 7 months ago

Was this helpful?