Skip to main content
Case Study · BuxEdge

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.

Polymarket CLOB & Kalshi APICross-Venue Arbitrage EngineFractional Kelly SizingTri-Factor Confluence ScoringPre-Trade Go/No-Go GateEvent Blackout Protection
01 — Problem

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.

Venue Fragmentation

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.

Slippage Traps

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.

Over-Betting Ruin

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.

02 — Thesis

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.

03 — Architecture

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]
LayerTechnologyWhy it's there
Core Engine APIPython 3.12 · FastAPI · Pydantic v2Asynchronous high-throughput REST service running live market scanners, signal processors, and portfolio risk engines
Market ConnectorsPolymarket CLOB API · Kalshi Exchange APIDual-exchange orderbook polling, order placement, WebSocket telemetry feeds, and regulatory boundary mapping
Risk & Sizing ModelFractional Kelly Criterion · Volatility BoundsMathematical capital allocation capping max loss, adjusting position size by estimated edge and probability confidence
Confluence EngineBayesian Base Rate Models · News Sentiment NLPScores prediction conviction by cross-referencing historical base rates, breaking news momentum, and liquidity depth
Execution GuardGo/No-Go Gate · Slippage & Spread MonitorRejects execution if market spreads exceed thresholds, book depth is insufficient, or event blackout windows are active
Client DashboardReact 19 · Vite · Tailwind CSSReal-time unified intelligence interface displaying live arbitrage opportunities, active orders, and portfolio exposure
04 — Deep Dive

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.

01 · Scan & Normalize

Ingests real-time bids/asks from Polymarket and Kalshi, standardizing divergent contract expiries and strike definitions.

02 · Confluence Scoring

Combines historical empirical base rates with live NLP sentiment to compute model-implied probability vs. market implied odds.

03 · Risk Verification (Go/No-Go)

Validates orderbook depth: verifies the full order size can fill within the target spread without crossing excessive slippage.

04 · Kelly Allocation

Computes exact dollar allocation as a fraction of current bankroll, submitting atomic limit orders to the exchange API.

05 — By the numbers
2 exchanges
Polymarket + Kalshi
<250 ms
Signal processing latency
0.25–0.5x
Fractional Kelly boundary
3-tier
Signal confluence score
100%
Pre-trade risk enforcement
0
Over-allocation drawdowns
Building prediction market models or automated trading infrastructure? Let's talk.