PolymarketIntel — System Architecture
An autonomous whale-following trading bot that monitors Polymarket blockchain transactions in real time, scores insider-signal probability, sizes positions via Kelly Criterion, and manages risk across multiple kill-switch layers.
⚡Real-Time Signal Detection
Monitors Polymarket blockchain transactions in real time with a resilient RPC layer and automatic failover.
- ›Price capture, wallet monitoring, batch grading
- ›Auto-reconnect with exponential back-off
- ›Watchdog supervisor restarts stalled processes
🎯Composite Scoring Engine
4-weight scoring system that evaluates every whale trade for insider-signal probability. Score ≥ 0.6 triggers an alert.
- ›57+ insider-prone keywords (assassination, arrest, hack, merger …)
- ›Tiered alerts: Tier 1-4 based on composite score
- ›Anti-spam: wallet cooldown 180s, market cooldown 60s
📐Kelly Criterion Position Sizing
Optimal bet sizing via the Kelly formula with fractional scaling, confidence throttling, and hard guardrails.
- ›Confidence throttle: linear or logistic curve
- ›Portfolio heat limit + per-market concentration cap
- ›Tier fallback: T1=15%, T2=10%, T3=6%, T4=3%
🛡️Multi-Layered Risk Management
4 independent kill switches, a risk governor, and graduated escalation with full audit trails.
- ›Rolling drawdown window with daily loss limits
- ›Graduated escalation levels (warn → throttle → halt)
- ›State persistence across restarts
- ›Every decision logged with audit trail
🧪Backtesting & Validation
Historical trade replay against ground-truth outcomes with per-tier accuracy metrics and regression detection.
- ›Score distribution: p25, p50, p75, p90, p95, p99
- ›Compare-to-baseline with configurable thresholds
- ›Per-tier accuracy breakdown (win rate, expected value)
🔄Cross-Venue Arbitrage
Detects pricing discrepancies between Polymarket and Kalshi with a two-step evaluate → execute pipeline.
- ›Slippage model: venue floors + depth impact + latency penalty
- ›Shadow P&L tracking vs paper execution comparison
- ›Two-step pipeline: evaluate() then execute()
🔍Deterministic Replay & Drift Detection
Decision fingerprinting with SHA-256, parity checking every 60 s, and multi-sigma drift alerting.
- ›Drift thresholds: 1.5σ info, 2.0σ warn, 3.0σ kill recommend
- ›Rolling 100-point statistical windows
- ›Config versioning — every decision stores config_id
🧬Alpha Tuning & Convergence
4 Quick-Win filters, multi-whale convergence detection, automated calibration grid search, and a single-source-of-truth config.
- ›Gambling filter: $5K+ on long-shots
- ›Hot wallet boost: +0.15 for 80%+ recent win rate
- ›Category limit: max 2 positions per category
- ›Context floor: market score ≥ 60 OR wallet score ≥ 45