Class LoanSchedule
Projects the regular payments of a loan from its current Loan entry.
Inheritance
Namespace: Xrpl.Sugar
Assembly: Xrpl.dll
Syntax
public static class LoanSchedule
Remarks
The projection repeats rippled's computePaymentComponents: each payment is the step from
the loan's current rounded state to the rounded theoretical state after it, capped at the
rounded PeriodicPayment, and the last one clears what is left. It starts from the
entry's own values - TotalValueOutstanding, PrincipalOutstanding,
ManagementFeeOutstanding - which the node computed, so for a loan still to be created
take them from PreviewLoanSet(IXrplClient, LoanSet, CancellationToken).
The arithmetic is rippled's own: XrplNumber in the NumberContext
the amendments select, with roundToAsset as STAmount computes it, so each row is
the split the node takes. Late, full and overpayments are not projected.
Methods
| Edit this page View SourceProject(LOLoan, IssuedCurrency, ushort, LedgerRules)
Projects the payments the loan still has to make.
Declaration
public static IReadOnlyList<LoanScheduleRow> Project(LOLoan loan, Common.IssuedCurrency asset, ushort managementFeeRate, LedgerRules options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| LOLoan | loan | The |
| Common.IssuedCurrency | asset | The loan asset: the asset of the broker's vault. |
| ushort | managementFeeRate | The broker's |
| LedgerRules | options | The amendments in force; the current rules when null. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<LoanScheduleRow> |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | The entry lacks a field the projection needs. |
| OverflowException | An amount of a row is beyond decimal. |