Ripple’s XRP Ledger Lending to Receive Repayment Fix

Written by

in

Technical Details

The first commit moves the scheduled-value calculation out of computeLoanProperties into a separate scheduledValue function, with no behavior change.

That way, LoanSet and LoanPay round it the same way. Zero-interest loans also need a floor on the principal part, because their value is rounded to nearest while the principal is rounded up. Tests run on Legacy, CashBasis and FixedPrecision vaults, with and without the amendment.

Today, each payment’s value part is calculated on its own, so rounding can build up across payments. The last payment can then need one unit more than the rounded PeriodicPayment, and the value parts can alternate between payments.

With the change, a method called telescoping makes the value part of every on-time payment either the floor or the ceiling of PeriodicPayment, and at least one unit. The last payment becomes exactly the rounded PeriodicPayment.

What It Means for Users

There’s little to no effect for users and investors today. The extra unit on the final payment changes little. Older loans that already carried one unit above their schedule simply keep it, so the last payment still needs the PeriodicPayment and a single unit, unless the borrower overpays first.

Small overpayments are mostly ignored; the transaction goes through successfully and charges no extra $XRP whatsoever.

Activation date is yet to be determined: 80% of validators agreement is needed for two weeks in a row for the amendment to go through. No public vote for LendingProtocolV1_2 has been announced yet, so the timeline remains uncertain.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *