📜
SRWA Documentation
SRWA.ioDemoGitHub
  • Getting Started
    • Overview
      • Components
        • Lending Protocol
        • Lending Pool
        • SRWA Badge
      • Other
        • Oracle
        • Admin
    • How It Works
      • Risk Management
      • Deposit
      • Borrow
      • Withdraw
      • Repay
      • Liquidate
  • Core Calculations
    • Utilization
    • APR
    • SB and SD Tokens
    • Interests
    • Available Liquidity
    • Collateral
    • Protocol Reserve
  • SRWA Interface
    • About
    • Requirements
    • How to Use
      • Lending
        • Lending Account
        • Savings and Loans
        • Deposit
        • Withdraw
        • Borrow
        • Repay
      • Market
      • Tools
        • Transactions
        • Wallet
Powered by GitBook
On this page
  1. Core Calculations

Interests

Interest is the reward paid for providing liquidity in a SRWA Lending Protocol, or the amount that is paid when taking out the loan. much like traditional interest earned on a bank deposit or loan. With every protocol interaction, interests are calculated so the user and the platform states can be updated accordingly.

There are three types of interests that are being calculated:

Borrow interest:

borrow_interest = total_pool_borrow * borrow_apr

Deposit interest:

deposit_interest = borrow_interest - reserve_interest

Reserve interest

reserve_interest = borrow_interest * reserve_factor

User states will be updated on every interaction with the protocol, for the deposit and withdraw actions, SD Token balance will be updated with the accrued interest, for the borrow and repay actions, SB Token balance will be updated with the accrued interest.

PreviousSB and SD TokensNextAvailable Liquidity