xrpld
Loading...
Searching...
No Matches
xrpl::Lending Namespace Reference

Functions

constexpr TenthBips16 kMaxManagementFeeRate (unsafeCast< std::uint16_t >(percentageToTenthBips(10).value()))
 The maximum management fee rate allowed by a loan broker in 1/10 bips.

Variables

constexpr TenthBips32 kMaxCoverRate = percentageToTenthBips(100)
 The maximum coverage rate required of a loan broker in 1/10 bips.
constexpr TenthBips32 kMaxOverpaymentFee = percentageToTenthBips(100)
 The maximum overpayment fee on a loan in 1/10 bips.
constexpr TenthBips32 kMaxInterestRate = percentageToTenthBips(100)
 Annualized interest rate of the Loan in 1/10 bips.
constexpr TenthBips32 kMaxLateInterestRate = percentageToTenthBips(100)
 The maximum premium added to the interest rate for late payments on a loan in 1/10 bips.
constexpr TenthBips32 kMaxCloseInterestRate = percentageToTenthBips(100)
 The maximum close interest rate charged for repaying a loan early in 1/10 bips.
constexpr TenthBips32 kMaxOverpaymentInterestRate = percentageToTenthBips(100)
 The maximum overpayment interest rate charged on loan overpayments in 1/10 bips.
static constexpr int kLoanPaymentsPerFeeIncrement = 5
 LoanPay transaction cost will be one base fee per X combined payments.
static constexpr int kLoanMaximumPaymentsPerTransaction = 100
 Maximum number of combined payments that a LoanPay transaction will process.

Function Documentation

◆ kMaxManagementFeeRate()

TenthBips16 xrpl::Lending::kMaxManagementFeeRate ( unsafeCast< std::uint16_t > percentageToTenthBips(10).value())
constexpr

The maximum management fee rate allowed by a loan broker in 1/10 bips.

Valid values are between 0 and 10% inclusive.

Variable Documentation

◆ kMaxCoverRate

TenthBips32 xrpl::Lending::kMaxCoverRate = percentageToTenthBips(100)
constexpr

The maximum coverage rate required of a loan broker in 1/10 bips.

Valid values are between 0 and 100% inclusive.

Definition at line 129 of file Protocol.h.

◆ kMaxOverpaymentFee

TenthBips32 xrpl::Lending::kMaxOverpaymentFee = percentageToTenthBips(100)
constexpr

The maximum overpayment fee on a loan in 1/10 bips.

Valid values are between 0 and 100% inclusive.

Definition at line 136 of file Protocol.h.

◆ kMaxInterestRate

TenthBips32 xrpl::Lending::kMaxInterestRate = percentageToTenthBips(100)
constexpr

Annualized interest rate of the Loan in 1/10 bips.

Valid values are between 0 and 100% inclusive.

Definition at line 143 of file Protocol.h.

◆ kMaxLateInterestRate

TenthBips32 xrpl::Lending::kMaxLateInterestRate = percentageToTenthBips(100)
constexpr

The maximum premium added to the interest rate for late payments on a loan in 1/10 bips.

Valid values are between 0 and 100% inclusive.

Definition at line 151 of file Protocol.h.

◆ kMaxCloseInterestRate

TenthBips32 xrpl::Lending::kMaxCloseInterestRate = percentageToTenthBips(100)
constexpr

The maximum close interest rate charged for repaying a loan early in 1/10 bips.

Valid values are between 0 and 100% inclusive.

Definition at line 159 of file Protocol.h.

◆ kMaxOverpaymentInterestRate

TenthBips32 xrpl::Lending::kMaxOverpaymentInterestRate = percentageToTenthBips(100)
constexpr

The maximum overpayment interest rate charged on loan overpayments in 1/10 bips.

Valid values are between 0 and 100% inclusive.

Definition at line 167 of file Protocol.h.

◆ kLoanPaymentsPerFeeIncrement

int xrpl::Lending::kLoanPaymentsPerFeeIncrement = 5
staticconstexpr

LoanPay transaction cost will be one base fee per X combined payments.

The number of payments is estimated based on the Amount paid and the Loan's Fixed Payment size. Overpayments (indicated with the tfLoanOverpayment flag) count as one more payment.

This number was chosen arbitrarily, but should not be changed once released without an amendment

Definition at line 179 of file Protocol.h.

◆ kLoanMaximumPaymentsPerTransaction

int xrpl::Lending::kLoanMaximumPaymentsPerTransaction = 100
staticconstexpr

Maximum number of combined payments that a LoanPay transaction will process.

This limit is enforced during the loan payment process, and thus is not estimated. If the limit is hit, no further payments or overpayments will be processed, no matter how much of the transaction Amount is left, but the transaction will succeed with the payments that have been processed up to that point.

This limit is independent of loanPaymentsPerFeeIncrement, so a transaction could potentially be charged for many more payments than actually get processed. Users should take care not to submit a transaction paying more than loanMaximumPaymentsPerTransaction * Loan.PeriodicPayment. Because overpayments are charged as a payment, if submitting loanMaximumPaymentsPerTransaction * Loan.PeriodicPayment, users should not set the tfLoanOverpayment flag.

Even though they're independent, loanMaximumPaymentsPerTransaction should be a multiple of loanPaymentsPerFeeIncrement.

This number was chosen arbitrarily, but should not be changed once released without an amendment

Definition at line 203 of file Protocol.h.