Maple
  • Welcome to Maple
  • Maple for Lenders
    • Introduction
    • Lending
    • Defaults and Impairments
    • Margin Calls and Liquidations
    • Risk
    • Withdrawal Process
  • syrupUSDC for Lenders
    • Powered by Maple
    • Lending in syrupUSDC and syrupUSDT
    • Commitments
    • Drips Rewards
    • Withdrawals
    • Monthly Updates
    • Pendle Integration
  • SyrupUSDC Rewards Prize Draw Program Summary
  • FAQ
  • Maple for Borrowers
    • Introduction
    • Loan Management
  • Maple for Token Holders
    • Introduction to SYRUP
      • MPL to SYRUP Conversion
      • FAQs
    • SYRUP Tokenomics
      • Staking
      • Staking Smart Contract Details
    • Governance and Voting
    • Drips Rewards
    • Research and Media
      • Podcasts
      • News Articles
      • TV Segments
      • Research Reports
      • Data Dashboards
    • Additional Resources
  • Technical Resources
    • Protocol Overview
      • Background
      • Protocol Actors
      • Smart Contract Architecture
      • Glossary
      • Smart Contract Addresses
      • Fees
      • Composability
      • Proxies and Upgradeability
    • Security
      • Security
      • List of Assumptions
      • External Entry Points
      • Emergency Protocol Pause
      • Protocol Invariants
      • Test Report
    • Loans
      • Loans
      • Fixed Term Loans
      • Open Term Loans
      • Refinancing
      • Impairments
      • Defaults
    • Pools
      • Pools
      • Pool Creation
      • PoolManager
      • PoolDelegateCover
      • Accounting
        • Pool Accounting
        • Pool Exchange Rates
    • Strategies
      • Fixed Term Loan Manager
        • Overview
        • Claims
        • Advance Payment Accounting
        • Accounting Examples
      • Open Term Loan Manager
      • DeFi Strategies
    • Withdrawal Managers
      • WithdrawalManager (Cyclical)
      • WithdrawalManager (Queue)
    • Singletons
      • Globals
      • MapleTreasury
      • Oracles
      • Pool Permission Manager
    • Admin Functions
      • Governor Admin Actions
        • Operational Admin Actions
      • Pool Delegate Admin Actions
      • Timelocks
    • Operations
      • Protocol Deployment
      • Open Term Loan Deployment
      • December 2023 Deployment & Upgrade Procedure
      • Strategies Release Deployment Procedure
    • Interfaces
      • FixedTermLoan
      • FixedTermLoanFactory
      • FixedTermLoanFeeManager
      • FixedTermLoanInitializer
      • FixedTermLoanManager
      • FixedTermLoanManagerFactory
      • FixedTermLoanManagerInitializer
      • FixedTermLoanRefinancer
      • Globals
      • Liquidator
      • LiquidatorFactory
      • LiquidatorInitializer
      • OpenTermLoan
      • OpenTermLoanFactory
      • OpenTermLoanInitializer
      • OpenTermLoanManager
      • OpenTermLoanManagerFactory
      • OpenTermLoanManagerInitializer
      • OpenTermLoanRefinancer
      • Pool
      • PoolDelegateCover
      • PoolDeployer
      • PoolManager
      • PoolManagerFactory
      • PoolManagerInitializer
      • PoolPermissionManager
      • WithdrawalManager (Cyclical)
      • WithdrawalManagerFactory (Cyclical)
      • WithdrawalManagerInitializer (Cyclical)
      • WithdrawalManager (Queue)
      • WithdrawalManagerFactory (Queue)
      • WithdrawalManagerInitializer (Queue)
    • SYRUP Token
      • Architectural Overview
      • Base ERC20 Structure
      • Upgradability
      • Modules
      • Time Locks
      • Recapitalization Module
      • Emergency Module
      • Deployment and Migration Procedure
    • GraphQL API
    • SDK
      • Introduction
      • Installation
      • Protocol Actors
      • Usage Guide
  • Troubleshooting & Support
    • Intercom
  • Maple 1.0
    • Access to deprecated Maple 1.0
  • Legal
    • Borrower MLA
    • KYC
    • Interface Terms of Use
    • Privacy Policy
    • syrupUSDC and syrupUSDT - Risks
    • syrupUSDC and syrupUSDT - Defaults and Impairments
    • syrupUSDC and syrupUSDT - Available Jurisdictions
    • Interface Terms of Use [syrupUSDC and syrupUSDT]
    • Interface Terms of Use [Syrup.fi/convert/ and Syrup.fi/stake/]
    • syrupUSDC and syrupUSDT- Privacy Policy
    • SyrupUSDC Rewards Prize Draw Terms & Conditions
Powered by GitBook
On this page
  • Total Pool Value (totalAssets)
  • Unrealized Losses
  1. Technical Resources
  2. Pools
  3. Accounting

Pool Accounting

Total Pool Value (totalAssets)

Total pool value is represented using totalAssets.

This value is calculated using the following equation:

totalAssets=cash+∑assetsUnderManagementstrategies\begin{align} \nonumber totalAssets = cash + \sum{assetsUnderManagement_{strategies}} \end{align}totalAssets=cash+∑assetsUnderManagementstrategies​​

where:

assetsUnderManagement=∑(outstandingPrincipalloan+outstandingInterestloan)\begin{align} \nonumber assetsUnderManagement = \sum\Big({outstandingPrincipal_{loan}} + {outstandingInterest_{loan}}\Big) \end{align}assetsUnderManagement=∑(outstandingPrincipalloan​+outstandingInterestloan​)​

where:

outstandingInterest(t)=accountedInterest+issuanceRate×(t−domainStart)\begin{align} \nonumber outstandingInterest(t) = accountedInterest + issuanceRate \times (t - domainStart) \end{align}outstandingInterest(t)=accountedInterest+issuanceRate×(t−domainStart)​

The relationship between the Pool, PoolManager, and LoanManagers regarding value representation is shown in the diagram below.

Unrealized Losses

unrealizedLosses is an accounting variable that represents a "paper loss". The Pool Delegate and Governor both have the ability to "impair" a strategy and represent a paper loss in the pool. unrealizedLosses is also incremented during an active collateral liquidation in a Loan. unrealizedLosses is used to prevent large liquidity events in situations where it is public knowledge that a Pool will incur a loss in the future.

In the case the unrealizedLosses > 0, there are two exchange rates that are maintained, one for deposits and one for withdrawals. This is to prevent malicious depositors from taking advantage of a situation where they know that paper loss will be removed. Consider a situation where there is a single loan outstanding for $900k with $10k of outstanding interest, and there is 100k of cash in the pool. The totalSupply of LP tokens is 1m. In this situation, the effective exchange rate is:

exchangeRate=totalAssetstotalSupplyexchangeRate=900000+100000+100001000000exchangeRate=1.01\large \begin{align} \nonumber exchangeRate &= \frac{totalAssets}{totalSupply} \\ \nonumber exchangeRate &= \frac{900000 + 100000 + 10000}{1000000} \\ \nonumber exchangeRate &= 1.01 \end{align}exchangeRateexchangeRateexchangeRate​=totalSupplytotalAssets​=1000000900000+100000+10000​=1.01​

After impairing the loan, unrealizedLosses gets set to 910k. Now, with unrealizedLosses considered, the exchange rate becomes:

exchangeRate=totalAssetstotalSupplyexchangeRate=900000+100000+10000−9100001000000exchangeRate=0.1\large \begin{align} \nonumber exchangeRate &= \frac{totalAssets}{totalSupply} \\ \nonumber exchangeRate &= \frac{900000 + 100000 + 10000 - 910000}{1000000} \\ \nonumber exchangeRate &= 0.1 \end{align}exchangeRateexchangeRateexchangeRate​=totalSupplytotalAssets​=1000000900000+100000+10000−910000​=0.1​

Without the two exchange rate model, a depositor could deposit $1m at a 0.1 exchange rate and get 10m shares. Once unrealizedLosses was removed, their shares would be worth $10.1m.

For this reason, two exchange rates are maintained during an unrealizedLosses scenario. This accomplishes two things:

  1. Discourages withdrawals - LPs are incentivized to wait until the strategy either:

  2. Defaults - Cover and collateral will increase exchange rate

  3. Pays back - The original exchange rate is restored.

  4. Discourages deposits - During a scenario where a default is imminent, it is in future LPs' best interest to wait until the borrower either defaults or pays back their loan before entering the pool.

PreviousAccountingNextPool Exchange Rates

Last updated 2 months ago