Low-latency execution infrastructure for real-time crypto prediction markets.
Exec Trade is a real-time market engine designed to power short-duration prediction markets on crypto assets such as BTC, ETH, and SOL.
The system aggregates prices from multiple exchanges, generates executable strike ladders, signs market data cryptographically, and distributes live markets to clients over WebSockets.
The long-term vision is to combine:
- Off-chain low-latency market generation
- On-chain escrow and settlement using Solana
- Deterministic execution and settlement
Exchange Feeds
│
▼
Aggregator
│
▼
Market Engine
│
├── Strike Generation
├── Probability Computation
├── Market Signing
└── Redis Caching
│
▼
WebSocket Distribution
│
▼
Frontend Clients
Live market data is consumed from:
- Binance
- Coinbase
- Kraken
- Bybit
The aggregator normalizes symbols and produces a unified market snapshot.
Example:
{
"symbol": "BTC/USDT",
"price": 76315.99,
"provider_count": 2,
"confidence": 0.2
}The aggregator maintains an in-memory view of the latest market state.
AggregatedSnapshot {
markets: Vec<AggregatedMarket>
}The market engine generates strike ladders around the current spot price.
Example:
BTC Spot: 76315
76100
76200
76300
76400
76500
Asset-specific spacing is supported.
Example:
BTC → 100
ETH → 10
SOL → 1
A basic probability model computes directional pricing for each strike.
Outputs:
UP Probability
DOWN Probability
Example:
Strike: 76400
UP = 0.43
DOWN = 0.57
This model will be replaced later with more sophisticated market-making logic.
For every strike generated:
LiveMarket {
quote_id,
symbol,
strike,
up_price,
down_price,
expiry_ts,
generated_at
}Markets are regenerated continuously as new prices arrive.
All generated markets are signed using a Solana keypair.
This ensures:
- Market authenticity
- Execution integrity
- Future on-chain verification
Signed market structure:
SignedLiveMarket {
market,
signature,
signer
}Redis acts as the hot execution cache.
Current responsibilities:
markets:BTCUSDT
markets:ETHUSDT
markets:SOLUSDT
Stores active executable markets.
quote:<quote_id>
Stores individual signed markets.
Markets automatically expire and are regenerated continuously.
Signed live markets are streamed to frontend clients.
This enables:
- Real-time updates
- Live strike ladders
- Dynamic probability changes
- Low-latency market visualization
crates/
├── api/
│ ├── websocket endpoints
│ ├── http endpoints
│ └── application state
│
├── feeds/
│ ├── binance
│ ├── coinbase
│ ├── kraken
│ └── bybit
│
├── aggregator/
│ └── market aggregation logic
│
├── market-engine/
│ ├── strike generation
│ ├── probability engine
│ ├── live market generation
│ └── redis caching
│
├── signer/
│ └── cryptographic signing utilities
│
└── common/
└── shared types
Start Redis:
docker compose up -dRedis runs on:
localhost:6379
RedisInsight:
http://localhost:5540
Completed:
- Feed ingestion
- Aggregation engine
- Strike ladder generation
- Probability generation
- Market signing
- Redis integration
- WebSocket distribution
- In-memory market cache
In Progress:
- Frontend market terminal
- Market visualization
- Execution engine
Planned:
- Position creation
- Quote execution
- Replay protection
- Settlement engine
- Solana PDA escrow accounts
- On-chain settlement
- User balances
- Risk engine
- Oracle validation
- Multi-market support
Exec Trade aims to become a low-latency execution layer for crypto prediction markets.
Market generation remains off-chain for speed while custody and settlement move on-chain through Solana programs and PDA-based escrow accounts.
This architecture combines:
- Centralized exchange performance
- Decentralized settlement guarantees
- Real-time prediction market trading
Private - Internal Development