Introduction
The XRP Ledger (XRPL) is a decentralised, open-source blockchain known for its unique consensus mechanism that enables fast, energy-efficient transactions. Unlike proof-of-work systems, XRPL’s consensus algorithm ensures transaction finality in seconds while minimising costs, making it ideal for financial applications. XRPL’s low fees and quick settlement times are especially beneficial for DeFi applications.
The XLS-65 and XLS-66 specifications introduce native primitives to enable uncollateralised, fixed-term loans sourced from a pooled liquidity structure known as a Vault. This article provides an overview of these specifications' key features and functions, highlighting how they contribute to a robust lending framework on the XRP Ledger.
XLS-65: Single Asset Vault Overview
The XLS-65 specification introduces a Single Asset Vault, an on-chain primitive designed to aggregate assets from one or more accounts, making this liquidity accessible to other protocols, such as the Lending Protocol. By decoupling liquidity provision logic from the core protocol or business logic, the Single Asset Vault offers greater flexibility and efficiency in managing pooled assets within the XRP Ledger ecosystem.
Vault Representation and Management
The Single Asset Vault is represented on the ledger by a Vault entry. This Vault object is owned and managed by a VaultOwner account responsible for overseeing functionality and asset management. Assets are deposited into the Vault by one or more users, known as depositors, whose shares represent the proportional ownership of the Vault assets. These shares entitle them to withdraw assets from the Vault.
Withdrawal Policy
The withdrawal policy defines how depositors exchange their shares for assets in the vault. The Single Asset Vault currently uses a First-Come, First-Serve policy, where withdrawal requests are processed in the order they are received. While this approach is simple and efficient, it may only suit some DeFi use cases. For example, it can incentivise early withdrawals, making vault liquidity less predictable. Therefore, the vault design is modular, allowing for future implementation of alternative withdrawal policies aligned with specific use cases and offering greater flexibility in managing vault liquidity.
Public and Private Vaults
A Vault falls into one of two types: public or private, with the type determined at creation:
- Public Vault: Any account can deposit and withdraw assets freely, encouraging open participation.
- Private Vault: Only authorised Depositors—granted permission by the Vault Owner via a Permissioned Domain—can deposit assets. However, any account holding corresponding shares can withdraw assets, ensuring Depositors always retain access to their assets. This dual structure enables flexible access control, supporting open and restricted configurations within the XRP Ledger ecosystem.
Permissioned Domains for Access Control
A Permissioned Domain is an allow-list-based access control mechanism in the XRP Ledger. It enables Vault Owners to specify accepted Credential Authority and Credential Types. If an account has a credential issued by an approved authority and is of the correct type, it is permitted to deposit assets into a Vault and hold the Vaults shares. In the event the Credential Authority revokes account credentials, the account will still be able to withdraw shares held. However, the account will be unable to deposit assets or receive additional shares. For more on Permissioned Domains and Credentials, see the specifications of the XLS-80d Permissioned Domain and XLS-70d Credentials.
Vault Shares and Transferability
Vault shares are first-order assets issued directly by the Vault instead of the Vault Owner, with transferability configured at Vault creation:
- Non-transferable shares: Cannot be sent to other accounts or traded on the Decentralized Exchange, limiting circulation.
- Transferable shares: Can be freely traded on the Decentralized Exchange or transferred to other accounts, provided the recipient (or buyer) is authorised to hold the shares. In other words, if a Vault has an associated Permissioned Domain, the recipient must have credentials accepted in that domain, even when trading on the Decentralized Exchange. This flexibility allows Vault Owners to tailor liquidity and trading dynamics, with transferable shares offering secondary market opportunities to enhance overall market liquidity.
Compliance Features: Freezing and Clawback
The Single Asset Vault supports compliance features, including asset freezing and clawback by the Asset Issuer:
- Account Freeze: If an Asset Issuer freezes a Depositor’s account, that Depositor cannot deposit or withdraw assets from the Vault, nor can they transfer or receive shares.
- Global Freeze: Prevents all Depositors from depositing, withdrawing assets, or transferring shares. If the Asset Issuer freezes the Vault, this halts operations and any connected protocols. Only the Asset Issuer can recover assets through Clawback—executing a forced withdrawal that burns the Depositor's shares in exchange for the available funds in the Vault.
XLS-66: Lending Protocol
The XLS-66 specification introduces the XRP Ledger-native Lending Protocol, which facilitates straightforward, on-chain, uncollateralised fixed-term loans with pre-set interest terms. Loan liquidity is sourced from pooled funds, while the design relies on off-chain underwriting and risk management to assess borrowers’ creditworthiness. In cases of loan default, the First-Loss Capital protection scheme absorbs a portion of losses to protect Vault Depositors.
The Lending Protocol is represented on the ledger by a LoanBroker entry, created, owned, and managed by the same account as the VaultOwner. Future updates may allow for greater independence and flexibility by decoupling Vault and Lending Protocol components.
Loan Creation and Terms
Loans in the Lending Protocol are represented on the ledger by a Loan entry—a formalised, on-chain agreement between the Loan Issuer (the owner of the LoanBroker object) and the Borrower. The Loan entry is created through a transaction signed by both parties, binding them to specific terms.
Since the Lending Protocol relies on off-chain underwriting and risk assessment, it assumes that the Loan Issuer has conducted thorough due diligence before issuing the loan.
Payment Structure and Options
Loans are issued with a fixed term and a pre-determined payment schedule calculated using an amortisation function, producing fixed-sized payments with varying proportions of principal and interest. XRP Ledger Lending Protocol loans utilise a second-based payment resolution, allowing for intervals as short as 60 seconds, enhancing repayment flexibility.
Upon issuance, the Borrower can draw down the loan funds and make periodic payments toward the loan. Each payment includes three components:
- Principal: Applied toward the loan balance and returned to the Vault.
- Interest: Also returned to the Vault (minus a LoanBroker fee).
- LoanBroker Fee: Directed to the LoanBroker. Missed and Late Payments If the Borrower misses a scheduled payment, they enter a grace period, during which they can still make a late payment, albeit with a late payment fee and a higher interest rate. After the grace period, the Loan Issuer may default the loan, which:
- Recalls any undrawn loan principal to the Loan Issuer.
- Triggers risk management processes (detailed later in this article).
- Reduces the Vault’s total value, impacting all Vault Depositors. Early and Overpayments The Borrower may also repay the loan in full before the term ends, with early repayment incurring an early repayment interest rate and fee. Additionally, Borrowers can make overpayments, paying more than the required amount, which is handled based on the Loan configuration:
- Non-application: Only the minimum payment is applied, disregarding extra payment.
- Application to Principal: The overpayment reduces the outstanding principal, lowering future interest. (The Loan Issuer may apply an overpayment interest rate and fee to offset reduced future yield.)
Risk Management and First-Loss Capital Protection
The Lending Protocol introduces optional first-loss capital protection, where the LoanBroker deposits a fund that can partially cover losses in case of a loan default. This capital protection mitigates risk to Vault Depositors:
- The first-loss capital required is a percentage of the total debt owed to the Vault.
- Upon default, a portion of this capital is liquidated based on the minimum required cover, and the proceeds are returned to the Vault to cover some losses. Loan Impairment If the Loan Issuer anticipates difficulty with a Borrower’s repayment, they can impair the loan, which advances the payment due date to the current time and temporarily reduces the Vault value. This discourages Depositors from withdrawing prematurely, as it would shift the burden of losses to the remaining Depositors. Once resolved, the impairment status is lifted.
Asset Freezing and Protocol Impact
Freezing of assets by the Issuer can affect the Lending Protocol. If the Borrower’s account is frozen, preventing them from making a payment, the loan remains active and is not pardoned. After a grace period, the Loan Issuer may:
- Default the Loan: Claiming any remaining assets to protect the Vault.
- Impair the Loan: Accelerating the default process if repayment is unlikely.
Future Development
The next step in developing the Lending Protocol involves introducing a collateral system to enhance risk mitigation and strengthen the security of loan agreements. Borrowers will pledge acceptable assets as collateral, protecting depositors against potential defaults and promoting responsible borrowing practices. The system will support various asset types, providing flexibility in securing loans. A dynamic collateralisation ratio will adjust requirements based on asset volatility and risk profiles, ensuring robust protection for both borrowers and depositors.
Implementing a robust liquidation mechanism will be crucial to the success of the collateral system. This mechanism will establish clear thresholds for collateral value that trigger liquidation processes, enabling the protocol to recover loan amounts in the event of default. Borrowers will have a grace period to address any shortfalls in collateral, reinforcing the protocol’s commitment to maintaining positive borrower-lender relationships. Real-time collateral valuation through Oracle services (XLS-47 Specification) and regular audits will ensure accurate collateral values, providing transparency and trust in the lending process. Overall, introducing a collateral system represents a significant advancement in the Lending Protocol's capabilities, contributing to a more secure and efficient lending ecosystem within the XRP Ledger.
Top comments (0)