Skip to content

Lending protocol Part 2 for re-review - XLS-66#6093

Closed
ximinez wants to merge 607 commits intodevelopfrom
ximinez/lending-XLS-66-2
Closed

Lending protocol Part 2 for re-review - XLS-66#6093
ximinez wants to merge 607 commits intodevelopfrom
ximinez/lending-XLS-66-2

Conversation

@ximinez
Copy link
Collaborator

@ximinez ximinez commented Dec 1, 2025

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

  • New feature (non-breaking change which adds functionality)
  • Refactor (non-breaking change that only restructures code)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

ximinez added 30 commits October 9, 2025 16:15
* 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
- Will add those back later as the appropriate helpers are updated.
- 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.
- 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.
…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)
@ximinez ximinez force-pushed the ximinez/lending-XLS-66-2 branch from 5a95a74 to db0b80e Compare January 8, 2026 21:04
Copy link
Collaborator

@shawnxie999 shawnxie999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving as all feedbacks have been addressed through other PRs

@ximinez ximinez changed the base branch from ximinez/develop-nolending to develop January 11, 2026 05:00
…-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)
@ximinez ximinez closed this Jan 13, 2026
@ximinez ximinez deleted the ximinez/lending-XLS-66-2 branch January 13, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants