📜
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
  • APY
  • utilization [0-1]
  • APY Params
  • Borrow APY & Deposit APY

Was this helpful?

  1. Products
  2. SRWA Lending
  3. Lending Protocol

APY Calculation

PreviousProtocol OperationNextInterest per Epoch

Last updated 7 months ago

Was this helpful?

The APY Function contains calculations that impact Pool behaviour. Please do your own research and interact at your sole responsibility.

APY

The Annual Percentage Yield (“APY”) is the current annual interest rate, and it is based on the pool utilization at any given moment. The more assets are borrowed, the higher the utilization and interest rate for all participants.

An example with config parameters is depicted below, and each Pool can have different parameters, configurable by Admin at this stage.

utilization [0-1]

Utilization represents the ratio between total assets borrowed and the total deposits in a given pool.

utilization = totalBorrow / total_deposit

total_deposit - total deposit balances in the Pool total_borrow - total borrow balances from the Pool

APY Params

base - the initial APY for borrowers base_multiplier - defines the steepness of the APY curve, while utilization is below the kink multiplier - defines the steepness of the APY curve, while utilization is above the kink kink - configurable utilization level when a different APY calc model is enforced

Typical values are: base [0-1], kink [0-1], base_multiplier [0-0.3], multiplier [0.3-10]

Borrow APY & Deposit APY

Implementation of the APY/utilization dependency function is described below. Based on the Pool APY Params described above, the functions are as follows.

Miscalculating rates could cause pool leakage.

// borrow_rate
IF (utilization < kink)
    THEN borrow_rate = base + base_multiplier * utilization
    ELSE borrow_rate = base + base_multiplier * kink + multiplier * (utilization - kink)
    
// deposit_rate
deposit_rate = borrow_rate * (1 - reserve_factor) * utilization

Where reserve_factor is a configurable %, going to the Pool reserve. More in Risk Mitigation.