Show / Hide Table of Contents

Class LoanSchedule

Projects the regular payments of a loan from its current Loan entry.

Inheritance
object
LoanSchedule
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 Source

Project(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 Loan entry, as the ledger or a LoanSet preview holds it.

Common.IssuedCurrency asset

The loan asset: the asset of the broker's vault.

ushort managementFeeRate

The broker's ManagementFeeRate, in 1/10th of a basis point.

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.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX