From 5656f83290d8539ec27806bdcc8cc78e5aa77f2f Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Thu, 15 May 2025 19:27:58 +0100 Subject: [PATCH] Remove limits on Loan Origination Fee - Checking and enforcement are to be handled at the App layer --- src/xrpld/app/tx/detail/LoanSet.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/xrpld/app/tx/detail/LoanSet.cpp b/src/xrpld/app/tx/detail/LoanSet.cpp index 66a19928ca..3ce1c2cd73 100644 --- a/src/xrpld/app/tx/detail/LoanSet.cpp +++ b/src/xrpld/app/tx/detail/LoanSet.cpp @@ -243,26 +243,6 @@ LoanSet::preclaim(PreclaimContext const& ctx) return tecINSUFFICIENT_FUNDS; } - if (auto const originationFee = tx[~sfLoanOriginationFee]) - { - // Check that the lender will not make an unfair profit on the lending - // fee if the loan defaults. (Not yet in spec. May need to be removed.) - TenthBips32 const coverRateLiquidation{ - brokerSle->at(sfCoverRateLiquidation)}; - - auto const maximumOriginationFee = tenthBipsOfValue( - tenthBipsOfValue(newDebtTotal, coverRateMinimum), - coverRateLiquidation); - - if (*originationFee > maximumOriginationFee) - { - JLOG(ctx.j.warn()) - << "Loan origination fee is too high. The lender will make a " - "profit on the lending fee if the loan defaults."; - return tecINSUFFICIENT_FUNDS; - } - } - return tesSUCCESS; }