Lending protocol Part 2 for re-review - XLS-66#6093
Closed
Lending protocol Part 2 for re-review - XLS-66#6093
Conversation
* XRPLF/develop: refactor: Update Conan dependencies: OpenSSL (5873) Add vault invariants (5518) test: Add more tests for Simulate RPC metadata (5827) chore: Fix release build error (5864) refactor: Update CI strategy matrix to use new RHEL 9 and RHEL 10 images (5856) chore: exclude all `UNREACHABLE` blocks from codecov (5846) Set version to 3.0.0-b1 (5859)
- Making a payment on an impaired loan will unimpair the loan, which changes Vault.LossUnrealized. - Add a step in unit tests to impair a loan before making a payment, to verify, and prevent future similar regressions. - Resolves regression RIPD-3650
- Convert STTx::getSignature to be static. - Make the STTx::checkSign that takes a signature object private, and change it and all the other relevant functions to take the signature object as a `const&`. - Change `getBatchTransactionIDs` to return a `const&` to reduce the number of vector copies. Rename `batchTxnIds_` to CamelCase. Update the text of the internal comment.
…into ximinez/lending-XLS-66 * mywork/ximinez/lending-sttx-checksign: Review feedback from @a1q123456 Add jtx, STObject, and RPC support for sig object fields Add support for extra transaction signature validation
- Not expected to build
- Will add those back later as the appropriate helpers are updated. - Tests are not expected to pass.
- Tests are not expected to pass
- Tests are not expected to pass
- Loan tests are not expected to pass. - Refactor Number to put rounding logic into reusable functions. - Add Number tests to explicitly test rounding - may be redundant, but easy to reason about. Verifies that the default rounding matches banker's rounding. - Enable LoanManage. Apparently any remaining issues were fixed by the previous commit's cleanups. - Partially enabled LoanPay.
- Enable the rest of LoanPay. - Start updating the helper functions. - Tests are not expected to pass.
- May not build
- Builds, but tests are not expected to pass
- Check "simple" loanMakePayment failure conditions early
- Ensure principal part is not bigger than whole payment. - Add some documentation.
- Primarily updating tests, and fixing stuff that didn't work. - Tests still not expected to pass. - Add Json::Value::isMember(StaticString) so SFields can be used. - Validate more fields in ValidLoan Invariant
- Tests not expected to pass. - Check in LoanSet if a loan with interest actually has interest. tecPRECISION_LOSS if not. - Add checks in LoanPay for deep froze broker owner and pseudoaccount. - Fix management fee calculations in LoanPay and associated LoanBroker and Vault data updates. - Make state tracking next payment due date optional. - Add a test case showing multiple payments combined. - Update more tests to work with the new fields.
- Implement AccountSendMulti - Document the derivations of loan components. - Add "loanPrincipalFromPeriodicPayment" helper. - Removed sfReferencePrincipal - LoanSet and LoanPay can create MPTokens as a side effect - LoanPay will send the fee to cover if the broker owner is deep frozen, and fail if both of them are deep frozen. - LoanPay will check auth for the receivers, or create holdings for the submitting account if needed. - LoanSet will fail if principal requested is not positive - Handle overpayment in a separate function - Add a test helper to check that balance changes went as expected - Fix more tests
- Lender and borrower both signed the transaction. Duh.
gregtatcam
reviewed
Jan 2, 2026
gregtatcam
reviewed
Jan 2, 2026
…ending * XRPLF/develop: test: add more tests for `ledger_entry` RPC (5858) refactor: Rename `rippled.cfg` to `xrpld.cfg` (6098) Revert "chore: Pin ruamel.yaml<0.19 in pre-commit-hooks (6166)" (6167) chore: Pin ruamel.yaml<0.19 in pre-commit-hooks (6166) fix: Remove cryptographic libs from libxrpl Conan package (6163)
…ending * XRPLF/develop: refactor: Fix typos, enable cspell pre-commit (5719) fix: Reorder Batch Preflight Errors (6176) refactor: Remove unused credentials signature hash prefix (6186) refactor: Fix spelling issues in all variables/functions (6184) refactor: Fix spelling issues in private/local variables and functions (6182) refactor: Fix typos in comments, configure cspell (6164) ci: Move variable into right place (6179) ci: Use ccache to cache build objects for speeding up building (6104)
5a95a74 to
db0b80e
Compare
shawnxie999
approved these changes
Jan 9, 2026
Collaborator
shawnxie999
left a comment
There was a problem hiding this comment.
approving as all feedbacks have been addressed through other PRs
gregtatcam
approved these changes
Jan 9, 2026
gregtatcam
approved these changes
Jan 12, 2026
shawnxie999
approved these changes
Jan 12, 2026
…-66-2 * XRPLF/develop: Change LendingProtocol feature and dependencies to supported (6146) Expand Number to support the full integer range (6025) Improve and fix bugs in Lending Protocol (6102)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
This PR is effectively a clone of #5270 to allow for reviewers to have a "pristine" view of the change set that was merged in commit 6c67f1f.
The content of commits 6c67f1f (in develop) and c953073 (the current state of this branch as of this update) are identical. (Note that I have rewritten the end of the branch since this PR was opened to bring it back into sync. Also note that the branch name kinda sucks.)
The only changes that should be made to this branch are fixes and other changes that are identified as part of a review of this PR.
There is a second PR, #6102, that is intended for any new code changes, bug fixes, and PRs that aren't identified as part of this PR.
Context of Change
Type of Change
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)