
Where the money comes from
3 minDifficulty Checked 2026-11-10- Depositors fund loans through a Single Asset Vault and hold shares in return.
- Money out on loan is owed to the vault but cannot be withdrawn until repaid.
- Lending transactions only work when SingleAssetVault is enabled too.
Depositors put one asset into a Single Asset Vault. It can be XRP, a trust-line token or a Multi-Purpose Token (MPT). In return they get vault shares, a token that records their slice of the vault.
The loan broker draws on the vault to fund loans. Money out on loan still counts as the vault's, as money owed back. When borrowers repay, it returns to the vault with interest. The broker's management fee comes out of that interest first.
If loans earn interest, each share can be redeemed for more than it cost. If loans go bad, shares are worth less. A vault earns nothing by itself. It holds money for whatever protocol is connected to it.
Today the vault owner and the broker must be the same account. The spec says this may change. One vault can back more than one broker, each with its own terms.
Money out on loan is not sitting in the vault. A depositor who wants to leave can only take what is there now. If most of the vault is lent out, a large withdrawal fails until borrowers repay.
The two features depend on each other. Lending needs vaults to exist. A vote for one without the other does not turn lending on.
The Vault entry tracks two totals:
AssetsTotal: everything the vault holds or is owed.AssetsAvailable: what sits in the vault's pseudo-account now.
LoanSet moves principal out of AssetsAvailable. VaultWithdraw fails with tecINSUFFICIENT_FUNDS if it asks for more than AssetsAvailable.
LoanBroker.DebtTotal is what the broker owes the vault: principal plus interest, without fees. DebtMaximum caps it, and 0 means no cap. A loan that would push DebtTotal past the cap fails with tecLIMIT_EXCEEDED.
LoanBrokerSet must come from the vault's Owner. It creates the LoanBroker entry plus a pseudo-account that holds first-loss capital. That costs the owner two owner reserves.
Spec example, under the original accrual accounting:
| Step | AssetsTotal | AssetsAvailable | DebtTotal |
|---|---|---|---|
| Start | 100,000 | 100,000 | 0 |
| Lend 1,000 at 10%, 10% management fee | 100,090 | 99,000 | 1,090 |
The simplified interest is 100 tokens. The broker's fee is 10, so the vault books 90 at origination. LendingProtocolV1_1 changes when interest is booked; see V1_1 and the vote.
Dependencies: in the xrpld 3.4.1 source, every lending transaction checks that SingleAssetVault and MPTokensV1 are enabled. MPTokensV1 is already live on mainnet. A DomainID also needs PermissionedDomains, which is live.
Read a vault with vault_info and its vault ID, or with ledger_entry. Clio servers add vault_list to find vaults by asset.
Related: Single Asset Vault, Multi-Purpose Tokens.
- XLS-66 Lending ProtocolRead 2026-11-10
- XLS-65 Single Asset VaultRead 2026-11-10
- Single Asset VaultsRead 2026-11-10
- LendingHelpers.cpp (xrpld 3.4.1)Read 2026-11-10
