Skip to content

[W.I.P] feat: Implement LendingProtocolV1_1 cash-basis accounting#7817

Draft
Tapanito wants to merge 1 commit into
developfrom
tapanito/lending-cash-basis
Draft

[W.I.P] feat: Implement LendingProtocolV1_1 cash-basis accounting#7817
Tapanito wants to merge 1 commit into
developfrom
tapanito/lending-cash-basis

Conversation

@Tapanito

Copy link
Copy Markdown
Contributor

Gate Vault AssetsTotal and LoanBroker DebtTotal to principal-only tracking under featureLendingProtocolV1_1, replacing whole-life (accrual) interest recognition. Adds Accrual/CashBasis namespaces and three public dispatchers in LendingHelpers, consumed by LoanSet, LoanPay, and LoanManage without any amendment-awareness in the transactors themselves. Pre-amendment behavior is unchanged.

High Level Overview of Change

Context of Change

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)

Gate Vault AssetsTotal and LoanBroker DebtTotal to principal-only
tracking under featureLendingProtocolV1_1, replacing whole-life
(accrual) interest recognition. Adds Accrual/CashBasis namespaces and
three public dispatchers in LendingHelpers, consumed by LoanSet,
LoanPay, and LoanManage without any amendment-awareness in the
transactors themselves. Pre-amendment behavior is unchanged.
@Tapanito Tapanito added the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.8%. Comparing base (cd38c0e) to head (c1a0f94).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #7817   +/-   ##
=======================================
  Coverage     82.8%   82.8%           
=======================================
  Files         1036    1036           
  Lines        80111   80120    +9     
  Branches      8932    8929    -3     
=======================================
+ Hits         66308   66328   +20     
+ Misses       13794   13783   -11     
  Partials         9       9           
Files with missing lines Coverage Δ
include/xrpl/ledger/helpers/LendingHelpers.h 96.6% <ø> (ø)
src/libxrpl/ledger/helpers/LendingHelpers.cpp 90.9% <100.0%> (+0.4%) ⬆️
src/libxrpl/tx/transactors/lending/LoanManage.cpp 88.0% <100.0%> (-0.1%) ⬇️
src/libxrpl/tx/transactors/lending/LoanPay.cpp 93.4% <100.0%> (+<0.1%) ⬆️
src/libxrpl/tx/transactors/lending/LoanSet.cpp 89.8% <100.0%> (+<0.1%) ⬆️

... and 17 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DraftRunCI Normally CI does not run on draft PRs. This opts in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant