๐ข XLS-81 Permissioned DEXes
Complete implementation and testing suite for XLS-81 Permissioned DEX system enabling regulated financial institutions to participate in XRPL DEX while adhering to compliance requirements.
๐ Wallet Management
Connect your wallet and create additional test wallets for permissioned DEX operations.
Primary Wallet
๐๏ธ Wallet 1
Generate a new wallet with automatic funding for testing.
๐๏ธ Wallet 2
Generate a new wallet with automatic funding for testing.
๐๏ธ Wallet 3
Generate a new wallet with automatic funding for testing.
Permissioned DEXes Overview
What are Permissioned DEXes?
Permissioned DEXes are controlled environments for trading within the XRP Ledger's decentralized exchange (DEX). Trading in a permissioned DEX works like trading in the open DEX, except that a permissioned domain controls who can place and accept offers.
By relying on permissioned DEXes, regulated businesses can participate in trading on the XRP Ledger while ensuring that all the counterparties they deal with have been properly vetted.
There can be multiple permissioned DEXes within the XRP Ledger blockchain. Each one is uniquely associated with a permissioned domain, which acts as an allow-list for accessing that DEX.
Key Concepts
๐ข Permissioned DEX
The subset of the DEX that operates within the rules of a specific domain
๐ Open DEX
The un-permissioned DEX that has no restrictions
๐ Domain Offers
Offers that can only be filled by other offers within the same domain
๐ Hybrid Offers
Offers that participate in both domain-specific and open orderbooks
Basic Trading Flow
Domain Setup
Owen creates a domain with KYC credentials
User Verification
Tracy and Marko obtain required KYC credentials
Trading
Users place permissioned offers within domain
Compliance-by-Design Features
Building on XRPL's existing compliance framework:
Existing Features
- Deposit Auth - Granular fund control
- Authorized Trustlines - Asset distribution oversight
- Clawback - Asset reclaim mechanism
- Freezing - Account restrictions
- Multisign - Enhanced authorization
- Payment Paths - Flexible routing
XLS-81 Additions
- Domain-Based Trading - KYC compliance
- Permissioned Orderbooks - Regulatory adherence
- Credential Verification - Identity validation
- Hybrid Trading - Flexible participation
- Enhanced RPC Filtering - Compliance queries
Trading Scenarios
๐ Scenario 1: Regulated Institution Trading
Places a permissioned USD/EUR offer within Owen's compliance domain
Sees arbitrage opportunity and places matching permissioned offer
โ Trade executes successfully - both parties are domain members
๐ซ Scenario 2: Cross-Domain Isolation
Places open EUR/USD offer on public orderbook
Places permissioned USD/EUR offer that would cross Marko's
โ No trade - permissioned offers can't fill open offers
System Invariants
๐ Offer Isolation
- Permissioned offers only fill within same domain
- Open offers cannot fill permissioned offers
- Cross-domain offers remain separate
๐ Orderbook Placement
- Permissioned offers go to domain orderbooks
- Open offers stay on open orderbooks
- Hybrid offers participate in both
โ Domain Validation
- Domain membership verified on placement
- Invalid domain offers treated as unfunded
- Credential expiration auto-removes offers
Permissioned DEXes Technical Reference
Amendment Information
677E401A423E3708363A36BA8B3A7D019D21AC5ABD00387BDBEA6BDE4C91247ETransaction Changes
OfferCreate
- DomainID: Hash256 field to specify permissioned domain
- tfHybrid flag: 0x00100000 (1048576) for hybrid offers
Payment
- DomainID: Hash256 field for domain-restricted cross-currency payments
Ledger Entry Changes
Offer
- DomainID: Domain ledger entry ID
- AdditionalBooks: Array for hybrid offer directories
DirectoryNode
- DomainID: Domain ID for offer directories
- Modified ledger entry ID calculation with domain
API Method Changes
- book_offers:
domainparameter for permissioned order books - path_find:
domainparameter for domain-restricted paths - ripple_path_find:
domainparameter for path finding - subscribe (books):
domainparameter for order book subscriptions
Offer Matching Compatibility
| Offer/Payment Type | Open Offer | Hybrid Offer | Permissioned Offer | AMM |
|---|---|---|---|---|
| Open | โ | โ | โ | โ |
| Hybrid | โ | โ | โ (same domain) | โ |
| Permissioned | โ | โ | โ (same domain) | โ |