XRPL Parimutuel Prediction Market
Demo Day: February 24, 2026 | JFIIP Hackathon
MITATE is a prediction market DApp built on XRPL (XRP Ledger) using parimutuel betting mechanics. Users bet on binary outcomes (YES/NO) with XRP, and winners share the entire pool proportionally.
- XRPL-Native Design: Uses 6 XRPL primitives (Escrow, Issued Currency, Trust Line, DEX, Multi-Sign, Memo)
- Parimutuel Pricing: No complex AMM math — simple pool-based payouts
- Verifiable On-Chain: All bets and outcomes recorded on XRPL ledger
- Multi-Sign Resolution: 2-of-3 governance prevents manipulation
┌─────────────────────────────────────────────────────────────────┐
│ Frontend (Next.js) │
│ Vercel │
└─────────────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Backend (Hono) │
│ Fly.io + SQLite │
└─────────────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ XRPL Testnet │
│ Escrow │ Issued Currency │ Trust Line │ DEX │ Multi-Sign │
└─────────────────────────────────────────────────────────────────┘
| Feature | Usage |
|---|---|
| Escrow | Pool XRP bets with time-locked release |
| Issued Currency | YES/NO outcome tokens per market |
| Trust Line | Users hold outcome tokens |
| DEX | Secondary trading of outcome tokens |
| Multi-Sign | 2-of-3 resolution governance |
| Memo | On-chain metadata for all transactions |
- Market Created → Admin creates market with betting deadline
- Bets Placed → Users bet XRP on YES or NO, receive outcome tokens
- Trading → Users can trade tokens on XRPL DEX before deadline
- Resolution → Multi-sign committee resolves outcome
- Payout → Winners receive proportional share of pool
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React, Tailwind CSS, shadcn/ui |
| Backend | Hono, Bun, SQLite (WAL mode) |
| Blockchain | XRPL Testnet, xrpl.js |
| Deployment | Vercel (frontend), Fly.io (backend) |
- Bun 1.0+
- Node.js 20+ (for Next.js)
- XRPL Testnet accounts (operator, issuer)
# Clone
git clone https://github.com/thinkshake/mitate.git
cd mitate
# Configure environment
cp .env.example .env
# Edit .env with XRPL addresses
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
# Clone
git clone https://github.com/thinkshake/mitate.git
cd mitate
# Install dependencies
bun install
# Configure environment
cp apps/api/.env.example apps/api/.env
# Edit .env with XRPL addresses and API key
# Run database migrations
cd apps/api && bun run migrate
# Start development servers
bun run dev # Starts both frontend and backendYou need two XRPL Testnet accounts: Operator (holds escrow, receives bets) and Issuer (mints tokens).
-
Get accounts from the XRPL Testnet Faucet:
# Get Operator account curl -X POST https://faucet.altnet.rippletest.net/accounts # Response: {"account":{"xAddress":"...", "address":"rXXX...", "secret":"sXXX..."}, ...} # Get Issuer account (run again) curl -X POST https://faucet.altnet.rippletest.net/accounts
Or use the web interface: https://xrpl.org/resources/dev-tools/xrp-faucets
-
Save the addresses:
XRPL_OPERATOR_ADDRESS= first account'saddress(starts withr)XRPL_ISSUER_ADDRESS= second account'saddress(starts withr)- Keep the
secretvalues safe — needed for signing transactions
-
Generate Admin API Key:
# Generate a random 32-character key openssl rand -hex 16 # Or use any secure random string generator
Backend (apps/api/.env)
PORT=3001
DATABASE_PATH=./data/mitate.db
XRPL_RPC_URL=https://s.altnet.rippletest.net:51234
XRPL_WS_URL=wss://s.altnet.rippletest.net:51233
XRPL_OPERATOR_ADDRESS=rXXX... # From faucet step 1
XRPL_ISSUER_ADDRESS=rYYY... # From faucet step 1
ADMIN_API_KEY=your-secret-key # From step 3
Frontend (apps/web/.env.local)
NEXT_PUBLIC_API_URL=http://localhost:3001/api
GET /api/markets— List all marketsGET /api/markets/:id— Market detailsPOST /api/markets— Create market (admin)POST /api/markets/:id/close— Close market (admin)
POST /api/markets/:id/bets— Place bet (returns tx payloads)POST /api/markets/:id/bets/confirm— Confirm betGET /api/markets/:id/bets/preview— Preview payout
POST /api/markets/:id/offers— Create DEX offerGET /api/markets/:id/trades— List trades
POST /api/markets/:id/resolve— Resolve market (admin)POST /api/markets/:id/payouts— Execute payouts (admin)GET /api/markets/:id/payouts— List payouts
cd apps/api
fly launch
fly secrets set XRPL_OPERATOR_ADDRESS=rXXX...
fly secrets set XRPL_ISSUER_ADDRESS=rYYY...
fly secrets set ADMIN_API_KEY=your-secret-key
fly deploycd apps/web
vercel
# Set NEXT_PUBLIC_API_URL to your Fly.io URLSee docs/demo-script.md for the 3-minute demo walkthrough.
MIT
Built for JFIIP Hackathon 2026 by: