Show / Hide Table of Contents

Class LoanPaymentOutcome

What a LoanPay did, read from its metadata - of a validated transaction, or of a simulate run (PreviewLoanPay(IXrplClient, LoanPay, CancellationToken)).

Inheritance
object
LoanPaymentOutcome
Namespace: Xrpl.Sugar
Assembly: Xrpl.dll
Syntax
public sealed class LoanPaymentOutcome
Remarks

Amounts are in the loan asset's own unit - drops for XRP - as the Loan fields are. The split comes from where the money went, not from the protocol's formulas: the vault receives principal and interest, the broker the rest (management, service, late and close fees).

Properties

| Edit this page View Source

Asset

The loan asset.

Declaration
public Common.IssuedCurrency Asset { get; init; }
Property Value
Type Description
Common.IssuedCurrency
| Edit this page View Source

InterestToVault

Interest the vault received: PaidToVault less PrincipalPaid.

Declaration
public decimal InterestToVault { get; }
Property Value
Type Description
decimal
| Edit this page View Source

IsPaidOff

Whether no payment remains.

Declaration
public bool IsPaidOff { get; }
Property Value
Type Description
bool
| Edit this page View Source

LoanAfter

The Loan as the transaction left it.

Declaration
public LOLoan LoanAfter { get; init; }
Property Value
Type Description
LOLoan
| Edit this page View Source

LoanId

The paid loan's ledger index.

Declaration
public string LoanId { get; init; }
Property Value
Type Description
string
| Edit this page View Source

PaidToBroker

What the broker received: TotalPaid less PaidToVault.

Declaration
public decimal PaidToBroker { get; }
Property Value
Type Description
decimal
| Edit this page View Source

PaidToVault

What the vault received: principal and interest.

Declaration
public decimal PaidToVault { get; init; }
Property Value
Type Description
decimal
| Edit this page View Source

PaymentsMade

Payments the transaction settled: the drop in PaymentRemaining.

Declaration
public uint PaymentsMade { get; init; }
Property Value
Type Description
uint
| Edit this page View Source

PrincipalPaid

The drop in PrincipalOutstanding.

Declaration
public decimal PrincipalPaid { get; init; }
Property Value
Type Description
decimal
| Edit this page View Source

TotalPaid

What left the payer's balance, the transaction fee excluded.

Declaration
public decimal TotalPaid { get; init; }
Property Value
Type Description
decimal

Methods

| Edit this page View Source

FromMetadata(ILoanPay, ITransactionMetadata)

Reads the outcome of transaction from its metadata.

Declaration
public static LoanPaymentOutcome FromMetadata(ILoanPay transaction, ITransactionMetadata metadata)
Parameters
Type Name Description
ILoanPay transaction
ITransactionMetadata metadata
Returns
Type Description
LoanPaymentOutcome
Exceptions
Type Condition
ArgumentException

The metadata does not modify the transaction's Loan or its Vault: the payment did not apply, or the metadata belongs to another transaction.

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