Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
ba3a750
adds lending protocol spec
Tapanito Oct 18, 2024
d3e6115
improves the description of the management fee
Tapanito Nov 19, 2024
b297e6e
renames field names from plural to singular
Tapanito Jan 7, 2025
aac7f3e
This commit introduces the following changes:
Tapanito Jan 27, 2025
f18e8f1
removes CoverAvailable check from LoanBrokerDelete transaction
Tapanito Jan 27, 2025
44e1b57
Apply suggestions from code review
Tapanito Jan 27, 2025
1a437ee
cleans up latex code
Tapanito Jan 27, 2025
9f47ea2
updates LoanDelete transaction to delete the LoanBroker DirectoryNode…
Tapanito Jan 28, 2025
60a311e
in case insufficient first loss capital add loan broker fees to cover…
Tapanito Jan 28, 2025
9090bd3
fixes loan object ownership
Tapanito Jan 28, 2025
8851620
adds pseudo-account to the LoanBroker
Tapanito Jan 29, 2025
0f6644c
adds counterparty to LoanSet transaction
Tapanito Jan 31, 2025
14a634f
updates failure conditions of LoanSet transaction
Tapanito Jan 31, 2025
b77401b
Update XLS-0066d-lending-protocol/README.md
Tapanito Mar 13, 2025
aa50126
addresses PR comments
Tapanito Mar 19, 2025
9acddc1
fixes signature field name
Tapanito Mar 19, 2025
294f582
changes internal type of cover rate variables
Tapanito Apr 4, 2025
8740e2f
renames singular vault attributes to plural
Tapanito Apr 4, 2025
b175402
Apply suggestions from code review
Tapanito Apr 24, 2025
36ec7cb
changes Amount type to AMOUNT
Tapanito Apr 24, 2025
6c9a815
adds owner reserve chages to LoanSet
Tapanito Apr 28, 2025
ea0f369
changes InterestRate type to uint32
Tapanito Apr 28, 2025
0b13609
adds missing overpayment fields to LoanSet transaction
Tapanito Apr 28, 2025
b631e67
adds pseudo-account locked/frozen checks to LoanBrokerCoverWithdraw
Tapanito Apr 29, 2025
ff058bf
Update XLS-0066d-lending-protocol/README.md
Tapanito Apr 29, 2025
1398766
Improves how Loan ID is calculated by introducing a new LoanSequence …
Tapanito May 1, 2025
01d8981
removes sequence from the Loan object
Tapanito May 1, 2025
7e923c2
Apply suggestions from code review
Tapanito May 5, 2025
5609061
addresses PR comments
Tapanito May 6, 2025
b16dad1
Apply suggestions from code review
Tapanito May 7, 2025
65cc318
Apply suggestions from code review
Tapanito May 12, 2025
4ff2165
Update XLS-0066d-lending-protocol/README.md
Tapanito May 12, 2025
33908af
Update XLS-0066d-lending-protocol/README.md
Tapanito May 12, 2025
b8f8b6f
adds checks for frozen LoanBroker pseudo-account
Tapanito May 12, 2025
fe723a2
clarifies LoanPay totalDue and totalPaid
Tapanito May 12, 2025
389dd2e
corrects LoanSet debtMaximum and coverAvailable checks
Tapanito May 12, 2025
fd20def
improves LoanManage readability with ReturnToVault variable
Tapanito May 12, 2025
321319e
adds checks to LoanPay to ensure both Vault pseudo-account and LoanbR…
Tapanito May 12, 2025
d45aeb5
adds calculations for secondsSinceLastPayment
Tapanito May 20, 2025
81e2ff8
adds destination field to the LoanBrokerCoverWithdraw transaction
Tapanito May 20, 2025
3eee2bd
Update XLS-0066d-lending-protocol/README.md
Tapanito May 30, 2025
ed5a62d
adds LoanBrokerCoverClawback transaction
Tapanito Jun 13, 2025
f992b00
Apply suggestions from code review
Tapanito Jul 16, 2025
e4930c6
adds deepfreeze flag checks where appropriate
Tapanito Jul 16, 2025
71b9e36
Apply suggestions from code review
Tapanito Aug 8, 2025
47ece0f
improves freeze documentation
Tapanito Aug 14, 2025
43eeab3
removes LoanDraw transaction, as a result removes Loan.AssetsAvailabl…
Tapanito Sep 5, 2025
ca55bb1
adds LedgerEntryType and TransactionType values
Tapanito Sep 5, 2025
1ca3389
fixes basis point inconcisitencies in LoanSet transaction
Tapanito Sep 5, 2025
cdc45a6
lints the markdown using pretier
Tapanito Sep 5, 2025
c1411aa
updates preamble to follow the new format
Tapanito Sep 5, 2025
069a910
clarifies which fields are modifiable with the LoanBrokerSet transaction
Tapanito Sep 5, 2025
02a27d9
fixes flag names
Tapanito Sep 16, 2025
2c2524e
improves variable name consistency
Tapanito Sep 23, 2025
6b04e50
Merge branch 'master' into xls-66-lending-protocol
Tapanito Sep 26, 2025
4ba07c6
adds DebtTotal > 0 condition to LoanBrokerDelete
Tapanito Sep 26, 2025
4b02ae4
adds Loan.TotalValueOutstanding
Tapanito Sep 26, 2025
a43426e
adds Loan.PrincipalRequested
Tapanito Sep 26, 2025
7022130
adds authentication requirements to the loanset transaction
Tapanito Sep 29, 2025
2ef8f5a
fixes debt maximum calculation
Tapanito Sep 30, 2025
0a05584
improves the handling of fees when loanbroker account is frozen
Tapanito Sep 30, 2025
2977f04
Merge branch 'master' into xls-66-lending-protocol
Tapanito Sep 30, 2025
63730e5
improves the pseudo-code accuracy and removes bugs in late payment co…
Tapanito Oct 1, 2025
ead6cec
adds loan overpayment flag to LoanPay transaction
Tapanito Oct 21, 2025
1607e70
adds description of rounding error handling
Tapanito Oct 22, 2025
5dda351
adds balance checks to loan pay
Tapanito Oct 22, 2025
1933a4a
adds loan scale field
Tapanito Oct 23, 2025
b855be2
completely rewrites they loanPay transaction
Tapanito Oct 23, 2025
789ee88
adds extra guards to loanset transaction
Tapanito Oct 23, 2025
b976847
adds missing fullpayment flag in pseudo-code
Tapanito Oct 23, 2025
d644b04
adds missing fee
Tapanito Oct 24, 2025
77d789c
adds missing fee
Tapanito Oct 24, 2025
853563d
adds exclusivit check for overpayment and earrly payment flags
Tapanito Oct 27, 2025
732b33e
renames PreviousPaymentDate to PreviousPaymentDueDate
Tapanito Oct 28, 2025
a383bf3
adds updated LoanPay logic
Tapanito Nov 6, 2025
805e1f4
improves CoverRate docs
Tapanito Nov 6, 2025
3c2cdc5
restores excess handling
Tapanito Nov 13, 2025
2f0db96
adds equation glossary
Tapanito Nov 14, 2025
cc0559a
adds valueChange to 3.2.4.2
Tapanito Nov 19, 2025
238b204
fixes LoanSequence
Tapanito Nov 19, 2025
9059014
removes accountID from loanID generation
Tapanito Nov 25, 2025
f97480d
adds tfLoanlatePayment flag
Tapanito Dec 16, 2025
607b67f
Merge branch 'master' into xls-66-lending-protocol
Tapanito Dec 16, 2025
ef0f8f8
fixes typos
Tapanito Dec 16, 2025
1a73a6c
runs prettier
Tapanito Dec 16, 2025
4e2de5d
additional typos
Tapanito Dec 16, 2025
e5d13b7
additional typos
Tapanito Dec 16, 2025
692dab9
adds additional failure condition to the LoanSet tx
Tapanito Dec 16, 2025
3eb18b7
adds min gracePeriod duration
Tapanito Dec 18, 2025
c2d8849
improves overpayment pseudo-code
Tapanito Jan 9, 2026
bbf8952
improves LoanBrokerSet documentation
Tapanito Jan 14, 2026
f223966
improves LoanBrokerDelete documentation
Tapanito Jan 14, 2026
11296ec
improves LoanBrokerCoverDeposit documentation
Tapanito Jan 14, 2026
3cb170d
improves LoanBrokerCoverWithdraw documentation
Tapanito Jan 14, 2026
dffa4e2
improves LoanBrokerCoverClawback documentation
Tapanito Jan 14, 2026
3d209f1
improves LoanSet documentation
Tapanito Jan 14, 2026
eb3cb4b
improves LoanDelete documentation
Tapanito Jan 14, 2026
f674331
improves LoanManage documentation
Tapanito Jan 14, 2026
c37438f
improves LoanPay documentation
Tapanito Jan 14, 2026
841c18d
renames lendipng protocol directory and moves pseudo-code for appendix
Tapanito Jan 14, 2026
7474e70
adds docs note
Tapanito Jan 14, 2026
935eb22
improves the strucutre of LoanPay transaction
Tapanito Jan 14, 2026
9af3874
Merge branch 'master' into xls-66-lending-protocol
Tapanito Jan 14, 2026
845cb42
Merge branch 'master' into xls-66-lending-protocol
Tapanito Jan 19, 2026
b66ba8d
Merge branch 'master' into xls-66-lending-protocol
Tapanito Jan 27, 2026
ccb8dff
Merge branch 'master' into xls-66-lending-protocol
mvadari Jan 28, 2026
601b242
Merge branch 'master' into xls-66-lending-protocol
mvadari Feb 3, 2026
d7d5dfb
minor improvements to the xls
Tapanito Feb 4, 2026
537d0b6
Merge branch 'master' into xls-66-lending-protocol
Tapanito Feb 4, 2026
ffefd65
fixes flag json type
Tapanito Feb 4, 2026
6d6d2b5
fixes default withdraw/deposit amount
Tapanito Feb 4, 2026
6e850ae
cleans up json types
Tapanito Feb 4, 2026
3ee5011
Merge branch 'master' into xls-66-lending-protocol
Tapanito Feb 5, 2026
4be7e22
addresses review comments
Tapanito Feb 5, 2026
9e86622
minor gramatical improvements
Tapanito Feb 5, 2026
d36d45d
formatting
Tapanito Feb 5, 2026
541acc6
Merge branch 'master' into xls-66-lending-protocol
Tapanito Feb 10, 2026
7cd84ae
fix: markdown formatting for heavy check mark
AdamJSc Feb 10, 2026
c7eb35a
changes pseudo-account description
Tapanito Feb 5, 2026
a3f3999
adds destination tag to loakBrokerCoverWithdraw
Tapanito Feb 11, 2026
7234c44
Merge pull request #4 from AdamJSc/patch-3
Tapanito Feb 11, 2026
22ba1d9
formatting
Tapanito Feb 11, 2026
6853e2c
Merge branch 'master' into xls-66-lending-protocol
Tapanito Feb 19, 2026
e01ad40
updates links in sav to lending protocol
Tapanito Feb 19, 2026
9c9ca35
updates the outer strucutre of the specification
Tapanito Feb 23, 2026
90bfdef
updates iner specification structure
Tapanito Feb 23, 2026
319c1c4
adds json examples
Tapanito Feb 23, 2026
fdbf53b
filss objecgt deleion'
Tapanito Feb 23, 2026
a40eb11
fills freezing section
Tapanito Feb 23, 2026
2a6771b
adds error codes
Tapanito Feb 23, 2026
5ff33c5
adds rationale
Tapanito Feb 23, 2026
79ef0f1
Merge branch 'master' into xls-66-lending-protocol
Tapanito Feb 23, 2026
c6a3746
addresses review comments
Tapanito Feb 24, 2026
d0c1ea6
one more style fix
Tapanito Feb 24, 2026
308d052
adds svg architeture diagram
Tapanito Feb 24, 2026
8ca02d6
changes examples from code mode to md
Tapanito Feb 24, 2026
65b54ad
Merge branch 'master' into xls-66-lending-protocol
Tapanito Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions XLS-0065-single-asset-vault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## _Abstract_

A Single Asset Vault is a new on-chain primitive for aggregating assets from one or more depositors, and making the assets available for other on-chain protocols. The Single Asset Vault uses [Multi-Purpose-Token](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033-multi-purpose-tokens) to represent ownership shares of the Vault. The Vault serves diverse purposes, such as lending markets, aggregators, yield-bearing tokens, asset management, etc. The Single Asset Vault decouples the liquidity provision functionality from the specific protocol logic.
A Single Asset Vault is a new on-chain primitive for aggregating assets from one or more depositors, and making the assets available for other on-chain protocols. The Single Asset Vault uses [Multi-Purpose-Token](../XLS-0033-multi-purpose-tokens/README.md) to represent ownership shares of the Vault. The Vault serves diverse purposes, such as lending markets, aggregators, yield-bearing tokens, asset management, etc. The Single Asset Vault decouples the liquidity provision functionality from the specific protocol logic.

## Index

Expand Down Expand Up @@ -50,7 +50,7 @@ A Single Asset Vault is a new on-chain primitive for aggregating assets from one

### 1.1 Overview

The **Single Asset Vault** is an on-chain object that aggregates assets from one or more depositors and represents ownership through shares. Other protocols, such as the [Lending Protocol](https://github.com/XRPLF/XRPL-Standards/discussions/190), can access these assets via the vault, whether or not they generate yield. Currently, other protocols must be created by the same Account that created the Vault. However, this may change in the future.
The **Single Asset Vault** is an on-chain object that aggregates assets from one or more depositors and represents ownership through shares. Other protocols, such as the [Lending Protocol](../XLS-0066-lending-protocol/README.md), can access these assets via the vault, whether or not they generate yield. Currently, other protocols must be created by the same Account that created the Vault. However, this may change in the future.

The specification introduces a new `Vault` ledger entry, which contains key details such as available assets, shares, total value, and other relevant information.

Expand All @@ -77,17 +77,17 @@ A Single Asset Vault is owned and managed by an account called the **Vault Owner

#### 1.1.2 Access Control

A Single Asset Vault can be either public or private. Any depositor can deposit and redeem liquidity from a public vault, provided they own sufficient shares. In contrast, access to private shares is controlled via [Permissioned Domains](../XLS-0080-permissioned-domains/README.md), which use on-chain [Credentials](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0070-credentials) to manage access to the vault. Only depositors with the necessary credentials can deposit assets to a private vault. To prevent Vault Owner from locking away depositor funds, any shareholder can withdraw funds. Furthermore, the Vault Owner has an implicit permission to deposit and withdraw assets to and from the Vault. I.e. they do not have to have credentials in the Permissioned Domain.
A Single Asset Vault can be either public or private. Any depositor can deposit and redeem liquidity from a public vault, provided they own sufficient shares. In contrast, access to private shares is controlled via [Permissioned Domains](../XLS-0080-permissioned-domains/README.md), which use on-chain [Credentials](../XLS-0070-credentials/README.md) to manage access to the vault. Only depositors with the necessary credentials can deposit assets to a private vault. To prevent Vault Owner from locking away depositor funds, any shareholder can withdraw funds. Furthermore, the Vault Owner has an implicit permission to deposit and withdraw assets to and from the Vault. I.e. they do not have to have credentials in the Permissioned Domain.

#### 1.1.3 Yield Bearing Shares

Shares represent the ownership of a portion of the vault's assets. On-chain shares are represented by a [Multi-Purpose Token](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033-multi-purpose-tokens). When creating the vault, the Vault Owner can configure the shares to be non-transferable. Non-transferable shares cannot be transferred to any other account -- they can only be redeemed. If the vault is private, shares can be transferred and used in other DeFi protocols as long as the receiving account is authorized to hold the shares. The vault's shares may be yield-bearing, depending on the protocol connected to the vault, meaning that a holder may be able to withdraw more (or less) liquidity than they initially deposited.
Shares represent the ownership of a portion of the vault's assets. On-chain shares are represented by a [Multi-Purpose Token](../XLS-0033-multi-purpose-tokens/README.md). When creating the vault, the Vault Owner can configure the shares to be non-transferable. Non-transferable shares cannot be transferred to any other account -- they can only be redeemed. If the vault is private, shares can be transferred and used in other DeFi protocols as long as the receiving account is authorized to hold the shares. The vault's shares may be yield-bearing, depending on the protocol connected to the vault, meaning that a holder may be able to withdraw more (or less) liquidity than they initially deposited.

### 1.2 Terminology

- **Vault**: A ledger entry for aggregating liquidity and providing this liquidity to one or more accessors.
- **Asset**: The currency of a vault. It is either XRP, a [Fungible Token](https://xrpl.org/docs/concepts/tokens/fungible-tokens/) or a [Multi-Purpose Token](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033-multi-purpose-tokens).
- **Share**: Shares represent the depositors' portion of the vault's assets. Shares are a [Multi-Purpose Token](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033-multi-purpose-tokens) created by the _pseudo-account_ of the vault.
- **Asset**: The currency of a vault. It is either XRP, a [Fungible Token](https://xrpl.org/docs/concepts/tokens/fungible-tokens/) or a [Multi-Purpose Token](../XLS-0033-multi-purpose-tokens/README.md).
- **Share**: Shares represent the depositors' portion of the vault's assets. Shares are a [Multi-Purpose Token](../XLS-0033-multi-purpose-tokens/README.md) created by the _pseudo-account_ of the vault.

### 1.3 Actors

Expand All @@ -96,7 +96,7 @@ Shares represent the ownership of a portion of the vault's assets. On-chain shar

### 1.4 Connecting to the Vault

A protocol connecting to a Vault must track its debt. Furthermore, the updates to the Vault state when funds are removed or added back must be handled in the transactors of the protocol. For an example, please refer to the [Lending Protocol](https://github.com/XRPLF/XRPL-Standards/discussions/190) specification.
A protocol connecting to a Vault must track its debt. Furthermore, the updates to the Vault state when funds are removed or added back must be handled in the transactors of the protocol. For an example, please refer to the [Lending Protocol](../XLS-0066-lending-protocol/README.md) specification.

[**Return to Index**](#index)

Expand Down Expand Up @@ -164,7 +164,7 @@ The `Vault` object costs one reserve fee per object created:

#### 2.1.6 Vault Shares

Shares represent the portion of the Vault assets a depositor owns. Vault Owners set the currency code of the share and whether the token is transferable during the vault's creation. These two values are immutable. The share is represented by a [Multi-Purpose Token](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033-multi-purpose-tokens). The MPT is issued by the vault's pseudo-account.
Shares represent the portion of the Vault assets a depositor owns. Vault Owners set the currency code of the share and whether the token is transferable during the vault's creation. These two values are immutable. The share is represented by a [Multi-Purpose Token](../XLS-0033-multi-purpose-tokens/README.md). The MPT is issued by the vault's pseudo-account.

##### 2.1.6.1 `Scale`

Expand Down Expand Up @@ -215,7 +215,7 @@ The `MPToken` object represents the amount of shares held by a depositor. It is

###### 2.1.6.3.1 `MPToken` Values

The `MPToken` values should be set as per the `MPT` [specification](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033-multi-purpose-tokens#2112-fields).
The `MPToken` values should be set as per the `MPT` [specification](../XLS-0033-multi-purpose-tokens/README.md#2112-fields).

| **Condition** | **Transferable** | **Non-Transferable** |
| ----------------- | ------------------ | -------------------- |
Expand Down Expand Up @@ -344,7 +344,7 @@ The First Come, First Serve strategy treats all requests equally, allowing a dep

#### 2.1.8 Frozen Assets

The issuer of the Vaults asset may enact a freeze either through a [Global Freeze](https://xrpl.org/docs/concepts/tokens/fungible-tokens/freezes/#global-freeze) for IOUs or [locking MPT](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033-multi-purpose-tokens#21122-flags). When the vaults asset is frozen, it can only be withdrawn by specifying the `Destination` account as the `Issuer` of the asset. Similarly, a frozen asset _may not_ be deposited into a vault. Furthermore, when the asset of a vault is frozen, the shares corresponding to the asset may not be transferred.
The issuer of the Vaults asset may enact a freeze either through a [Global Freeze](https://xrpl.org/docs/concepts/tokens/fungible-tokens/freezes/#global-freeze) for IOUs or [locking MPT](../XLS-0033-multi-purpose-tokens/README.md#21122-flags). When the vaults asset is frozen, it can only be withdrawn by specifying the `Destination` account as the `Issuer` of the asset. Similarly, a frozen asset _may not_ be deposited into a vault. Furthermore, when the asset of a vault is frozen, the shares corresponding to the asset may not be transferred.

#### 2.1.9 Transfer Fees

Expand Down
Loading
Loading