System architecture
Supermission is a full-stack trading terminal that sits on top of Polymarket’s infrastructure. Understanding the layers helps you understand what’s happening when you place a trade, receive a signal, or interact with an AI agent.Architecture layers
Core systems
Frontend
Next.js 15 with React 19. App Router with React Server Components for performance. Tailwind CSS + Framer Motion for styling and animation. Zustand for local state, React Query for server state.
Backend
Next.js API routes (150+ endpoints). Supabase PostgreSQL with Row-Level Security. Privy for auth token verification. Rate limiting per-IP and per-user.
AI Pipeline
MiniMax M2.7 for multi-agent market analysis. OpenRouter (GPT-4O-mini) for chat agents (Oracle, Delphi, Securo). Vercel AI SDK for streaming and tool calling. 4-agent debate system with judge synthesis. Scheduled analysis runs per market tier.
Blockchain
Base (L2) for wallet and settlement. Polygon for Polymarket CLOB execution. Privy MPC for wallet infrastructure. Auto-bridging between chains via Circle CCTP.
Data flow: placing a trade
1
User confirms trade in UI
Click “Buy YES” on a market. The frontend validates amount, checks balance, and prepares the order parameters.
2
API processes the request
The trade route authenticates via Privy JWT, checks wallet balance on Base, and initiates the bridge if needed.
3
USDC bridges Base → Polygon
Circle CCTP bridges the exact USDC amount from your Base wallet to Polygon. USDC converts to USDC.e (Polymarket’s settlement token).
4
Order hits Polymarket CLOB
A FAK (Fill-And-Kill) or GTC (Good-Till-Cancel) order is submitted directly to Polymarket’s orderbook. No mempool, no MEV exposure.
5
Position recorded
The trade is recorded in Supabase. Portfolio updates in real-time. The user sees their new position in the Portfolio tab.
Data flow: AI signal generation
1
Market data ingested
Polymarket Data API provides real-time prices, volume, and orderbook depth. Market catalog synced to Supabase.
2
4 agents analyze independently
Four agents — Bull (narrative analysis), Bear (microstructure analysis), Contrarian (consensus challenge), and Quant (base-rate anchoring) — each receive market data + external context (news, social, on-chain). Each produces an independent probability estimate with reasoning.
3
Judge synthesizes
A judge agent reviews all 4 analyses, weighs argument quality and evidence strength, and produces a final probability + confidence score.
4
Signal emitted if divergence exists
If the synthesized probability diverges meaningfully from market price, a signal is stored in
market_ai_analysis and pushed to the frontend via Server-Sent Events (SSE).Market tiering
Not all markets get the same AI treatment. Analysis depth scales with market importance:Tech stack summary
Supermission is deployed on Vercel with Supabase as the primary database. All blockchain interactions happen through verified RPC providers (Alchemy, QuickNode) with fallback routing.

