Coin Brief ENDE

XRPL lending spec now treats overpayment fees as prepayment penalties

The XLS-66 lending protocol specification for the XRP Ledger was revised on 23 November in pull request 687 of the XRPL Standards repository. The change does not add features; it clarifies what borrowers are charged when they repay early.

An overpayment is now defined as an early repayment of principal. The two settings that apply to it, OverpaymentInterestRate and OverpaymentFee, are described as prepayment penalties that compensate the lender for interest it will no longer earn: the interest portion goes to the vault, the fee to the loan broker, and both are deducted from the amount overpaid before the rest reduces principal. If the principal portion comes to zero, which always happens when the two rates add up to 100% or more, the overpayment is skipped and the borrower is not charged for it. The reference code now also returns an error when the rounded principal would not change, so penalties are never taken without a principal reduction; the pull request says this matches the check in rippled.

The Amount field of a LoanPay transaction is now defined as the maximum the borrower can be charged on any payment, not only on overpayments; funds that are not applied to the loan are not taken. The revision also removes a pseudo-code line that counted overpayment interest twice when computing the change in a loan's value, and restores a validation rule for LoanSet that an earlier edit had dropped.

XRPL lending spec now treats overpayment fees as prepayment penalties
XRPL lending spec now treats overpayment fees as prepayment penalties — Coin Brief

Why it matters

Lending terms on a ledger are executed exactly as written. Saying plainly that a payment field is a ceiling and that penalties need a principal reduction to apply protects borrowers from being charged for nothing by an implementation that read the old wording differently.