System Components
- Frontend (
web): user UI, order entry, portfolio, market pages, rewards pages.
- Backend (
backend): authentication, market APIs, rewards accounting, payout orchestration.
- CLOB Engine (
clob-engine): orderbook state, matching, execution stream.
- Contracts (
contracts): market lifecycle, tokenized outcomes, settlement.
Data Flow (High Level)
- User places order via frontend.
- Backend validates and forwards to CLOB engine.
- Match/trade events are persisted and indexed.
- Rewards jobs compute maker and creator ledgers by epoch/day.
- Payout service settles rewards from fee collector treasury.
Reliability
- Idempotent reward epoch finalization
- Payout failure reason codes and retry paths
- Dry-run mode for safe verification before payouts
- Admin observability for epochs, payouts, and failures