Compare commits

..

1 Commits

Author SHA1 Message Date
Ed Hennis
669617af99 Cap the base fee for LoanPay based on loanMaximumPaymentsPerTransaction 2026-04-17 19:11:18 -04:00

View File

@@ -132,6 +132,9 @@ LoanPay::calculateBaseFee(ReadView const& view, STTx const& tx)
auto const regularPayment = roundPeriodicPayment(asset, loanSle->at(sfPeriodicPayment), scale) +
loanSle->at(sfLoanServiceFee);
if (view.rules().enabled(fixSecurity3_1_3) &&
amount >= regularPayment * loanMaximumPaymentsPerTransaction)
return loanMaximumPaymentsPerTransaction * normalCost;
// If making an overpayment, count it as a full payment because it will do
// about the same amount of work, if not more.