Engineering a dual-exchange prediction market intelligence & arbitrage engine.
Prediction markets represent billions in event-contract volume, but fragmented liquidity between crypto-native protocols (Polymarket) and regulated domestic venues (Kalshi) creates glaring mispricings. BuxEdge was engineered as a high-frequency intelligence and automated risk engine: cross-exchange orderbook matching, Bayesian confluence scoring, and fractional Kelly capital protection.
Event contracts move fast, orderbooks are shallow, and emotion guarantees drawdowns.
Trading binary prediction contracts is fraught with structural hazards: liquidity can evaporate during breaking news, and bid-ask spreads can easily swallow theoretical edges.
Polymarket trades in USDC on Polygon; Kalshi trades in USD under CFTC oversight. Due to capital friction, the exact same political or economic event often trades at a 5–12% spread between the two orderbooks.
Quoted top-of-book prices look attractive, but thin depth means a $5,000 order moves the market by multiple cents, instantly flipping a profitable position into negative expectation.
Without strict mathematical position sizing, traders who identify a genuine 60/40 edge bet too large a fraction of their capital and are wiped out by standard mathematical variance.
Edge without execution discipline is just a slow way to lose capital.
BuxEdge strips human subjectivity from market trading. Every position must be mathematically sized by a fractional Kelly algorithm, corroborated by multiple uncorrelated data streams, and guarded by automated pre-trade liquidity gates.
Dual-Exchange Arbitrage
Monitors identical real-world binary contracts across Polymarket and Kalshi, detecting pricing dislocations and synthetic risk-free spreads.
Fractional Kelly Sizing
Full Kelly betting leads to extreme volatility. BuxEdge implements conservative fractional Kelly (0.25x–0.5x) to maximize growth while preventing ruin.
Zero-Tolerance Go/No-Go Guards
Automated pre-trade checks: spreads, available fill depth, and upcoming blackout windows must pass or the execution signal is killed instantly.
Tri-Factor Confluence Scoring
Trades require alignment across 3 independent pillars: statistical base rates, orderbook flow imbalance, and verified news catalysts.
The BuxEdge Pipeline: High-speed ingestion and automated risk gating.
The Python backend continuously syncs orderbook states from both exchanges, evaluates cross-market spreads, and pipes trade candidates through strict risk filters before calculating position sizing.
Polymarket Clob API Kalshi Exchange API
│ │
└─────────────────┬─────────────────┘
▼
[Dual Orderbook Normalizer]
│
┌────────────┴────────────┐
▼ ▼
[Arbitrage Engine] [Confluence Scorer]
(Price Discrepancy) (Base Rates + News NLP)
│ │
└────────────┬────────────┘
▼
[Go/No-Go Execution Gate]
├─ Slippage & Spread Check
├─ Depth Liquidity Test
└─ Event Blackout Filter
│
▼
[Fractional Kelly Sizer (0.25x)]
│
▼
[Automated Order Router / Paper Desk]| Layer | Technology | Why it's there |
|---|---|---|
| Core Engine API | Python 3.12 · FastAPI · Pydantic v2 | Asynchronous high-throughput REST service running live market scanners, signal processors, and portfolio risk engines |
| Market Connectors | Polymarket CLOB API · Kalshi Exchange API | Dual-exchange orderbook polling, order placement, WebSocket telemetry feeds, and regulatory boundary mapping |
| Risk & Sizing Model | Fractional Kelly Criterion · Volatility Bounds | Mathematical capital allocation capping max loss, adjusting position size by estimated edge and probability confidence |
| Confluence Engine | Bayesian Base Rate Models · News Sentiment NLP | Scores prediction conviction by cross-referencing historical base rates, breaking news momentum, and liquidity depth |
| Execution Guard | Go/No-Go Gate · Slippage & Spread Monitor | Rejects execution if market spreads exceed thresholds, book depth is insufficient, or event blackout windows are active |
| Client Dashboard | React 19 · Vite · Tailwind CSS | Real-time unified intelligence interface displaying live arbitrage opportunities, active orders, and portfolio exposure |
The Pre-Trade Go/No-Go Gate: Preserving capital on volatile events.
Every identified edge must pass the automated Go/No-Go gate. If the top 3 levels of the orderbook do not hold enough depth to fill the requested size without exceeding 1.5% slippage, the trade is rejected automatically.
Ingests real-time bids/asks from Polymarket and Kalshi, standardizing divergent contract expiries and strike definitions.
Combines historical empirical base rates with live NLP sentiment to compute model-implied probability vs. market implied odds.
Validates orderbook depth: verifies the full order size can fill within the target spread without crossing excessive slippage.
Computes exact dollar allocation as a fraction of current bankroll, submitting atomic limit orders to the exchange API.