Token Escrow (XLS-85) is a new feature that will extend XRPL’s existing escrow functionality to support both Trustline-based tokens (IOUs) and Multi-Purpose Tokens (MPTs). It will enable XRPL to hold any token in escrow, meaning they can be locked up and released only when certain conditions are met.
This is important because currently, XRP is the only asset that can use the Escrow feature. Token Escrow will increase the versatility of token operations on XRPL, allowing for more complex and secure transactions involving different types of tokens while respecting issuer controls and maintaining the integrity of the Ledger.
Key Feature Highlights
Expanded Asset Support: Enables escrow functionality for both Trustline-based tokens (IOUs) and Multi-Purpose Tokens (MPTs), not just XRP.
-
Dedicated Transaction Modifications:
- EscrowCreate: Allows specifying the token type and amount (IOU or MPT) to be held.
- EscrowFinish: Facilitates the conditional release of the escrowed tokens to the designated recipient.
- EscrowCancel: Allows for the return of escrowed tokens to the sender if conditions for release are not met or the escrow expires.
-
Respect for Issuer Controls: Integrates with existing token issuer settings, such as:
- Authorization requirements (e.g.,
lsfRequireAuth
for IOUs,tfMPTRequireAuth
for MPTs). - Freeze conditions for IOUs (
lsfGlobalFreeze
,lsfDefaultRipple
) and Lock conditions for MPTs (lsfMPTokenLock
). - Transferability flags for MPTs (
tfMPTCanTransfer
,tfMPTCanEscrow
).
- Authorization requirements (e.g.,
Consistent Fee Handling: Captures and locks the TransferRate (for IOUs) or TransferFee (for MPTs) at the moment of escrow creation, ensuring predictability in the amount transferred upon settlement.
Ledger Object Update: Modifies the Escrow ledger object to store token-specific information like the token Amount, TransferRate/TransferFee, and IssuerNode (if applicable).
Benefits of Token Escrow
Enhanced Security for Token Transactions: Tokens are locked in an on-ledger escrow and released only upon fulfillment of predefined conditions (e.g., time-based condition).
Increased Versatility for XRPL Applications: Expands the range of programmable transactions possible with diverse token types, fostering more complex decentralized applications.
Predictable Outcomes: By locking the transfer rate or fee at the time of creation, both sender and receiver have clarity on the net amount to be transferred.
Maintained Issuer Autonomy: Upholds issuer-defined rules regarding token holding, authorization, and transferability.
Strengthened Ledger Integrity: Ensures that token escrows adhere to the fundamental rules and state management of XRPL.
Use Cases Unlocked by Token Escrow
Conditional Payments: Automated release of token payments upon completion of services or milestones.
Time-Locked Distributions: Secure vesting schedules for team tokens, grants, or airdrops, releasing them incrementally over time.
Decentralized Exchanges/Marketplaces: Temporary holding of various tokens as part of trade settlements or collateralization within decentralized finance (DeFi) applications.
Secure P2P Token Swaps: Facilitating trustless peer-to-peer exchanges of different tokens with conditional execution.
Digital Rights Management: Release of tokenized assets (e.g., MPTs representing licenses or collectibles) upon payment or agreement.
Get Started: Testing Token Escrow on Devnet
I have created a replit for TokenEscrow. You can see it live on the Devnet by going here and then using the command yarn run iou
What's Next and Call to Action
- Explore on devnet and provide feedback.
- Prepare for the amendment, update tooling, and participate in voting.
- Amendment process (voting)
- Prepare for integration