The first perpetual futures exchange built natively on the XRP Ledger
XPerp brings perpetual futures trading to the XRP Ledger. Trade XRP with up to 20x leverage using your own wallet. Funds are secured by Intel SGX hardware enclaves with 2-of-3 multisig and settled natively on-chain — no bridges, no wrapped tokens, no CEX custody.
Live on XRPL Mainnet: Connect your wallet, deposit XRP, and start trading in minutes.
- ⚡ Native XRPL Settlement — 3-5 second finality, < $0.01 transaction costs
- 🔐 Hardware-Secured — Intel SGX Trusted Execution Environment with DCAP attestation
- 🔑 Non-Custodial — 2-of-3 multisig across independent enclaves, master key disabled
- 📊 Full DEX Features — Real-time order book, price charts, WebSocket feeds, market data
- 🎨 Seamless UX — Wallet integration (Crossmark, GemWallet), instant order execution
- 🤖 Automated Liquidity — Built-in market making vaults bootstrap exchange from day one
- Node.js 18+ and Yarn
- XRPL wallet (Crossmark or GemWallet browser extension)
# Clone the repository
git clone https://github.com/LemonTreeTechnologies/perp-dex-ui.git
cd perp-dex-ui
# Install dependencies
make install
# Start development server
make devThe app will be running at http://localhost:5173
# Build static site
make buildsrc/
├── routes/ # SvelteKit pages
│ ├── +page.svelte # Home / wallet connection
│ ├── trade/ # Trading interface
│ ├── portfolio/ # Balance, deposits, withdrawals
│ ├── vaults/ # Market making vaults
│ ├── verify/ # SGX attestation verification
│ └── about/ # How it works
├── lib/
│ ├── api/ # Typed API client + WebSocket
│ ├── components/ # Reusable Svelte components
│ ├── stores/ # State management (wallet, auth, market data)
│ └── utils/ # XRPL authentication helpers
└── app.html # HTML template
- SvelteKit — SSG with static adapter
- Svelte 5 — Runes API (
$state,$derived,$effect) - Tailwind CSS v4 — Utility-first styling
- TypeScript — Strict mode with full type coverage
- @crossmarkio/sdk — Crossmark wallet support
- @noble/hashes — Cryptographic hashing for XRPL auth
- WebSocket API — Real-time market data (trades, orderbook, ticker)
- Vitest — Unit testing with browser mode
- Playwright — E2E testing
- ESLint + Prettier — Code quality and formatting
- svelte-check — TypeScript validation
| Command | Description |
|---|---|
make install |
Install dependencies |
make dev |
Start development server |
make build |
Build static site for production |
make lint |
Run ESLint + Prettier checks |
make fmt |
Auto-format code with Prettier |
make all |
Format, lint, and build |
make docs |
Generate presentation HTML |
Docker commands:
make docker-dev # Run development server with Docker
make docker-prod # Build and deploy production with Docker# Build and run with Caddy (automatic Let's Encrypt)
make docker-prodProduction features:
- Serves at xperp.fi and www.xperp.fi
- Automatic HTTPS with Let's Encrypt SSL certificates
- Auto-renewing certificates
- Gzip compression and security headers
# Run with hot reload
make docker-dev┌─────────────────────┐
│ perp-dex-ui │ ← This repo
│ (SvelteKit SPA) │
└──────────┬──────────┘
│ HTTPS + WSS
▼
┌─────────────────────┐
│ xrpl-perp-dex │ Rust orchestrator
│ (Orchestrator) │ - CLOB order matching
│ │ - Price feeds
└──────────┬──────────┘ - WebSocket server
│
▼
┌─────────────────────┐
│ SGX Enclave │ Hardware-secured
│ (TEE) │ - Margin engine
│ │ - Key custody
└──────────┬──────────┘ - DCAP attestation
│
▼
┌─────────────────────┐
│ XRPL Mainnet │ Native settlement
│ │ - XRP collateral
└─────────────────────┘ - Multisig escrow
- Connect Wallet — Sign in with Crossmark or GemWallet (XRPL secp256k1 signature auth)
- Deposit Funds — Send XRP to the 2-of-3 multisig escrow account on XRPL
- Trade — Submit limit/market orders; the orchestrator matches them in a CLOB
- Margin Engine — SGX enclave validates every position in hardware isolation
- Settlement — Withdrawals signed by 2-of-3 SGX enclaves, settled on XRPL in 3-5 seconds
Security guarantees:
- Private keys never exist in software — generated and stored inside Intel SGX CPU
- No single operator can move user funds (2-of-3 threshold, master key disabled)
- Anyone can verify enclave integrity via Intel DCAP remote attestation
- No smart contract exploits — computation runs in hardware TEE, not on-chain VM
| Document | Description |
|---|---|
| ARCHITECTURE.md | System design, component interaction, data flow |
| BACKEND-API.md | REST endpoints, WebSocket events, authentication |
| PITCH.md | Product vision, market opportunity, roadmap |
| PRESENTATION.md | Slide deck content and key messaging |
| HACKATHON-APPLICATION.md | Hackathon submission details |
| CLAUDE.md | Developer guidance for AI-assisted coding |
| Repository | Description |
|---|---|
| xrpl-perp-dex | Rust orchestrator — CLOB, price feeds, P2P replication |
| SGX Enclave (private) | Margin engine, ECDSA custody, DCAP attestation |
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Code quality standards:
- TypeScript strict mode — no
anytypes - All components must be properly typed
- Run
make fmtandmake lintbefore committing - Write tests for new features
This project is private and proprietary to Lemon Tree Technologies.
- Live App: xperp.fi
- API Endpoint: api-perp.ph18.io
- Presentation: xperp.fi/presentation.html
- GitHub: @LemonTreeTechnologies
Built with ❤️ for the XRP Ledger community
Paris Blockchain Week XRPL Hackathon 2026