We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c38bbd commit f8ee979Copy full SHA for f8ee979
src/xrpld/app/tx/detail/LoanManage.cpp
@@ -114,9 +114,20 @@ LoanManage::preclaim(PreclaimContext const& ctx)
114
return tesSUCCESS;
115
}
116
117
-Number
+static Number
118
owedToVault(SLE::ref loanSle)
119
{
120
+ // Spec section 3.2.3.2, defines the default amount as
121
+ //
122
+ // DefaultAmount = (Loan.PrincipalOutstanding + Loan.InterestOutstanding)
123
124
+ // Loan.InterestOutstanding is not stored directly on ledger.
125
+ // It is computed as
126
127
+ // Loan.TotalValueOutstanding - Loan.PrincipalOutstanding -
128
+ // Loan.ManagementFeeOutstanding
129
130
+ // Add that to the original formula, and you get this:
131
return loanSle->at(sfTotalValueOutstanding) -
132
loanSle->at(sfManagementFeeOutstanding);
133
0 commit comments