Advance Payment Accounting
Last updated
Last updated
Whenever any interaction is made with a Fixed Term Loan
from the FixedTermLoanManager
, _advanceGlobalPaymentAccounting
is called. The purpose of this function is to account all Loans' outstanding interest and to represent the current state at the current timestamp.
For all of the below examples, the following abbreviations are used:
: accountedInterest
: issuanceRate
: domainStart
: domainEnd
For all of the below examples, $accountedInterest$ starts as the following:
domainEnd
In this example, the payment is made before the domainEnd
, so no payments are removed from the sorted list.
domainEnd
, before Loan 2 Payment Due DateIn this example, the payment is made after the domainEnd
, so Loan 1 is removed from the sorted list and domainEnd
is updated.
domainEnd
, before Loan 3 Payment Due DateIn this example, the payment is made after the domainEnd
and Loan 2's payment due date, so Loans 1 and 2 are removed from the sorted list and domainEnd
is updated.
domainEnd
, after Loan 3 Payment Due DateIn this example, the payment is made after the domainEnd
, Loan 2, and Loan 3's payment due dates, so Loans 1, 2 and 3 are removed from the sorted list and domainEnd
is updated.