Skip to main content
Likely is built as a distributed system with specialized services that work together to process bundles, execute trades, and deliver real-time updates.

System Flow


Core Services


Data Layer

NATS JetStream:
  • Event streaming backbone
  • Guarantees event ordering
  • Enables replay for recovery
  • Scales horizontally
Redis:
  • Fast user state cache
  • Sub-millisecond access
  • Recent trader data
QuestDB:
  • Time-series analytics
  • Historical trade data
  • User balance history
  • Market statistics
Snapshots:
  • Periodic state backups
  • Fast recovery
  • Every 5 seconds

How a Bundle Flows Through the System

1. Submission (t=0ms)
2. Sequencing (t=5ms)
3. Queuing (t=10ms)
4. Auction Close (t=500ms)
5. Delivery (t=505ms)
Total latency: 5-505ms depending on when you submit within the auction window.

Why This Architecture?

Event-driven design:
  • Everything is an event (auditable, replayable)
  • Services can scale independently
  • Natural disaster recovery via event replay
Batch processing:
  • Fair competition (no speed advantage)
  • Efficient resource usage
  • Predictable latency
Separation of concerns:
  • Each service has one job
  • Easy to understand and maintain
  • Can optimize independently

Auction Timing

The Sequencer is the heartbeat of Likely:
  • Detects every 500ms boundary
  • Emits AuctionOpen events
  • Emits AuctionClose events
  • Ensures deterministic batch IDs
This creates the rhythm: submit → wait → execute → repeat.

Privacy by Design

Bundle privacy:
  • Bundles don’t expose trader identity
  • Only you see your bundle details
  • Market sees aggregated orderbook
Selective routing:
  • Dispatcher filters events by user
  • Private data goes only to you
  • Public data (orderbooks, auction state) broadcast to all
This is a key differentiator vs platforms like Polymarket where trader profiles are public.

Next Steps