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
  • Accounting
  • Asset Definition
  • Payments
  • Interest
  • Late Interest
  • Delegate Service Fee
  • Platform Service Fee
  • Due Dates
  • _dueDates()
  • paymentDueDate()
  • _defaultDates()
  • defaultDate()
  • Loan Calls
  • Fees
  • Closing Loan
  • Initialization Parameters
  1. Technical Resources
  2. Loans

Open Term Loans

PreviousFixed Term LoansNextRefinancing

Last updated 6 months ago

Accounting

Asset Definition

Loans manage one asset: fundsAsset.

fundsAsset

This represents the ERC-20 token that is used to facilitate the funding, drawing down, and payments during a loan lifecycle. Typically this would be a stablecoin such as USDC, DAI, or USDT.

Payments

Borrowers have the flexibility to make payments, including partial principal repayments, against their loans at any given time. All fees, including service fees, along with interest, are pro-rated and calculated based on the exact time of payment or other significant actions such as loan funding or refinancing.

Payments due are comprised of principalCalled + interest + lateInterest + delegateServiceFee + platformServiceFee

Interest

Interest is prorated and calculated from the relevant startDate till the current block.timestamp

startDate=max⁡(datePaid,dateFunded)startDate = \max(datePaid, dateFunded)startDate=max(datePaid,dateFunded)

interval=block.timestamp−startDateinterval = block.timestamp - startDateinterval=block.timestamp−startDate

interest=principal∗interestRate∗interval365∗86400interest = principal * interestRate * \frac{interval}{365*86400}interest=principal∗interestRate∗365∗86400interval​

Late Interest

Late payments are also prorated and based on the lateInterestPremiumRate and lateFeeRate

Delegate Service Fee

Platform Service Fee

Due Dates

There are two virtual variables paymentDueDate() and defaultDate() that define the relevant due dates depending on if a payment is late, the loan is called, the loan is impaired, or any combination thereof. To compose these virtual variables, an internal helper function called _dueDates() is used.

_dueDates()

Returns the due dates for callDueDate, impairedDueDate and normalDueDate

callDueDate

\ \text{callDueDate} = \begin{cases} \text{dateCalled + noticePeriod} & \text{if } \text{dateCalled} > 0 \\ 0 & \text{if } \text{dateCalled} = 0 \end{cases} \

impairedDueDate

\ \text{impairedDueDate} = \begin{cases} \text{dateImpaired} & \text{if } \text{dateImpaired} > 0 \\ 0 & \text{if } \text{dateImpaired} = 0 \end{cases} \

normalDueDate

\ \text{normalDueDate} = \begin{cases} \text{paidOrFundedDate + paymentInterval} & \text{if } \text{paidOrFundedDate} > 0 \\ 0 & \text{if } \text{paidOrFundedDate} = 0 \end{cases} \

paymentDueDate()

_defaultDates()

Returns the due dates for callDefaultDate, impairedDefaultDate and normalDefaultDate

callDefaultDate

impairedDefaultDate

\ \text{impairedDefaultDate} = \begin{cases} \text{impairedDueDate + gracePeriod} & \text{if } \text{impairedDueDate} > 0 \\ 0 & \text{if } \text{impairedDueDate} = 0 \end{cases} \

normalDefaultDate

\ \text{normalDefaultDate} = \begin{cases} \text{normalDueDate + gracePeriod} & \text{if } \text{normalDueDate} > 0 \\ 0 & \text{if } \text{normalDueDate} = 0 \end{cases} \

defaultDate()

Loan Calls

The Pool Delegate (PD) exclusively possesses the ability to commence a Loan Call, specifying the principal amount that must not exceed the current principal balance. In the event of partial Loan Calls, the loan continues with a reduced balance but the same terms. Conversely, a complete Loan Call leads to the loan maturing once the borrower repays. Upon a Loan Call by the PD, the borrower is obligated to settle the demanded amount within the Notice Period or risk the loan defaulting.

The PD also has the power to withdraw a Loan Call, which reverts the payment schedule back to its original state prior to the Loan Call. If a Loan Call is actioned on a late loan, the PD has the discretion to default the loan at the termination of either the Notice Period or the Grace Period, depending on which comes first.

It's worth noting that refinancing is considered a valid resolution to Loan Calls, with such calls being settled once the parties agree to new terms.

Fees

Open-Term Loans have delegateServiceFees and platformServiceFees which are prorated and calculated on each payment.

Closing Loan

If a Borrower wants to close a Loan, they can do so by calling makePayment with a principalToReturn matching the outstand principal.

Initialization Parameters

  • borrower - The address of the borrower.

  • lender - The address of the lender.

  • fundsAsset - The address of asset that the loan is denominated in.

  • gracePeriod - The amount of time that the lender needs to wait before triggering a default on a late loan.

  • noticePeriod - The maximum amount of required for the Borrower fulfill a loan call.

  • paymentInterval - The amount of seconds between each loan payment.

  • interestRate - The annualized interest rate.

  • lateFeeRate - A fee rate applied on principal amount on late payments.

  • lateInterestPremiumRate - A premium added on top of the interest rate for late payments.

  • delegateServiceFeeRate - A rate of funds assets that is added on every payment destined to the pool delegate.

lateInterval=block.timestamp−paymentDueDatelateInterval = block.timestamp - paymentDueDatelateInterval=block.timestamp−paymentDueDate

lateInterest=principal∗lateInterestPremiumRate∗lateInterval365∗86400+(principal∗lateFeeRate)lateInterest = principal * lateInterestPremiumRate * \frac{lateInterval}{365*86400} + (principal * lateFeeRate)lateInterest=principal∗lateInterestPremiumRate∗365∗86400lateInterval​+(principal∗lateFeeRate)

Delegate Service Fee is prorated and calculated from the relevant startDate till the current block.timestamp startDate=max⁡(datePaid,dateFunded)startDate = \max(datePaid, dateFunded)startDate=max(datePaid,dateFunded)

interval=block.timestamp−startDateinterval = block.timestamp - startDateinterval=block.timestamp−startDate

delegateServiceFee=principal∗delegateServiceFeeRate∗interval365∗86400delegateServiceFee = principal * delegateServiceFeeRate * \frac{interval}{365*86400}delegateServiceFee=principal∗delegateServiceFeeRate∗365∗86400interval​

Platform Service Fee is prorated and calculated from the relevant startDate till the current block.timestamp startDate=max⁡(datePaid,dateFunded)startDate = \max(datePaid, dateFunded)startDate=max(datePaid,dateFunded)

interval=block.timestamp−startDateinterval = block.timestamp - startDateinterval=block.timestamp−startDate

platformServiceFee=principal∗platformServiceFeeRate∗interval365∗86400platformServiceFee = principal * platformServiceFeeRate * \frac{interval}{365*86400}platformServiceFee=principal∗platformServiceFeeRate∗365∗86400interval​

paidOrFundedDate=max⁡(datePaid,dateFunded)paidOrFundedDate = \max(datePaid, dateFunded)paidOrFundedDate=max(datePaid,dateFunded)

paymentDueDate=min⁡(callDueDate,impairedDueDate,normalDueDate)paymentDueDate = \min(callDueDate, impairedDueDate, normalDueDate)paymentDueDate=min(callDueDate,impairedDueDate,normalDueDate)

callDefaultDate=callDueDatecallDefaultDate = callDueDatecallDefaultDate=callDueDate

defaultDate=min⁡(callDefaultDate,impairedDefaultDate,normalDefaultDate)defaultDate = \min(callDefaultDate, impairedDefaultDate, normalDefaultDate)defaultDate=min(callDefaultDate,impairedDefaultDate,normalDefaultDate)