Skip to content

XLS-0066 Lending Protocol#240

Merged
Tapanito merged 137 commits intoXRPLF:masterfrom
Tapanito:xls-66-lending-protocol
Feb 24, 2026
Merged

XLS-0066 Lending Protocol#240
Tapanito merged 137 commits intoXRPLF:masterfrom
Tapanito:xls-66-lending-protocol

Conversation

@Tapanito
Copy link
Collaborator

Discussion thread can be found here: #190
Development branch can be found here: TBD

@sappenin
Copy link
Collaborator

@Tapanito this PR seems ready to merge -- do you agree?

(Note that per the DRAFTS section of the CONTRIBUTING guidelines, merging does not mean endorsement or even a completed spec, but instead offers a way for spec editors to more easily edit using PRs).

@Tapanito
Copy link
Collaborator Author

Tapanito commented Dec 4, 2024

Before merging, I'd like to have at least one review by an engineer to ensure everything is in order. In addition, similarly to Single Asset Vault, it is simpler/more convenient to edit a PR with various small design changes (e.g. names), rather than open a new PR for each of them. As a result, keeping a PR open allows to have a spec. that is more readily in-alignment with implementation.

@sappenin
Copy link
Collaborator

sappenin commented Dec 4, 2024

Makes sense, especially if it's more convenient. Just didn't want you (or anyone reading along) to think that merging here implies "finished product" (that's why we have a d designator, to indicate draft status).

Tapanito and others added 7 commits January 27, 2025 16:40
- Adds VaultNode to LoanBroker object to track in which owner directory of the Vaults pseudo-account the LoanBroker object is referenced.
- Adds LoanBrokerNode to Loan object to track in which owner directory of the LoanBroker object the Loan is references.
- Replaces CurrentTime to LastClosedLedger.CloseTime.
- Changes the LoanBroker.Delete transaction to automatically return any outstanding Cover to the LoanBroker.Owner.
- Adds a balance check to the LoanBrokerCoverDeposit transaction when depositing XRP.
- Adds a check to LoanBrokerCoverWithdraw to ensure the CoverAvailable does not drop below Mimimum Cover Required.
Co-authored-by: Ed Hennis <ed@ripple.com>
@Tapanito
Copy link
Collaborator Author

Tapanito commented Jan 28, 2025 via email

@Tapanito
Copy link
Collaborator Author

Tapanito commented Jan 28, 2025 via email

Copy link
Collaborator

@ximinez ximinez left a comment

Choose a reason for hiding this comment

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

Updates look good.

Co-authored-by: Ed Hennis <ed@ripple.com>
@Tapanito
Copy link
Collaborator Author

Tapanito commented Mar 19, 2025 via email

@ximinez
Copy link
Collaborator

ximinez commented Mar 20, 2025

No, since we introduced a pseudo-account for the LoanBroker, the deposit will go there

Right, I wasn't thinking about that, but if there is a loan default, and funds have to be paid out of the Cover Amount, wouldn't that go to the SAV?

@Tapanito
Copy link
Collaborator Author

No, since we introduced a pseudo-account for the LoanBroker, the deposit will go there

Right, I wasn't thinking about that, but if there is a loan default, and funds have to be paid out of the Cover Amount, wouldn't that go to the SAV?

Yes, 100%, the cover amount liquidation, in essence, will become a transfer of asset from one pseduo-account to another, with some accounting state changes.

@ximinez
Copy link
Collaborator

ximinez commented Mar 21, 2025

No, since we introduced a pseudo-account for the LoanBroker, the deposit will go there

Right, I wasn't thinking about that, but if there is a loan default, and funds have to be paid out of the Cover Amount, wouldn't that go to the SAV?

Yes, 100%, the cover amount liquidation, in essence, will become a transfer of asset from one pseduo-account to another, with some accounting state changes.

Right, so they should be the same currency, no? I'm fine with it being an STAmount as long as we're on the same page that the transaction should fail if it's not the same currency as the SAV.

@Tapanito Tapanito merged commit 6280022 into XRPLF:master Feb 24, 2026
3 of 4 checks passed
@Tapanito Tapanito deleted the xls-66-lending-protocol branch February 25, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.