System Overview

PolyTools is a machine trader for prediction markets—not a charting or manual trading tool.

The platform exploits information latency and market inefficiencies through pure market arbitrage, event-driven trading, and systematic execution faster than human traders with strict risk discipline.

Unlike retail trading interfaces, PolyTools operates as a non-custodial execution desk. It bypasses the standard Polymarket UI to interact directly with the Central Limit Order Book (CLOB) via API, enabling millisecond-latency order placement and automated risk management.


System Architecture

PolyTools is built on a distributed, event-driven architecture with strict separation of concerns:

Signal Layer

Continuously monitors data sources and produces raw signals for the Decision Engine.

  • Market Monitor: Real-time surveillance of Polymarket order books via WebSocket feeds.
  • Event Monitor: Detects real-world events from news APIs, RSS feeds, and official sources.
  • Social Monitor: (v2) Tracks Twitter/X, Telegram for breaking news detection.

Decision Engine

Transforms raw signals into actionable trade decisions.

  • Arbitrage Detector: Identifies guaranteed-profit opportunities.
  • Event Correlator: Maps real-world events to market implications.
  • Confidence Scorer: Final gatekeeper before execution (GO/NO-GO decision).

Execution Engine

Translates decisions into market actions with full lifecycle management.

  • Order Manager: Creates, tracks, and manages order states.
  • Trade Executor: Signs and submits orders to Polymarket CLOB.
  • Position Tracker: Maintains real-time portfolio state and P&L.

Risk Controller

Enforces trading discipline at all times, gating every order before submission.

  • Pre-Trade Checks: Position size, exposure, daily loss limits.
  • Live Exposure Monitor: Continuous risk surveillance.
  • Kill Switch: Emergency stop mechanism (soft, hard, emergency).

Design Principles

Principle Description
Automation over manual Human operators observe and configure; machines execute
Safety over aggression Discipline and capital preservation trump maximum profit
First-mover advantage Speed and early detection are the primary competitive edges
Separation of concerns Signal → Decision → Execution → Risk as distinct subsystems

Arbitrage Strategies

Pure arbitrage strategies exploit pricing inefficiencies for guaranteed profit.

A1: Same-Market Arbitrage

Exploits when YES + NO prices sum to less than $1.00.

Trigger YES + NO best ask prices sum to < $0.98 (2% fee buffer)
Action Buy both outcomes simultaneously
Exit Hold to resolution (guaranteed payout of $1.00)
Risk Execution risk—prices move before both orders fill
Mitigation Atomic execution attempt; abort if first leg moves price

A2: Multi-Outcome Arbitrage

Extends same-market logic to markets with 3+ outcomes.

Trigger Sum of all outcome best asks < $0.98
Action Buy all outcomes simultaneously
Risk Higher execution risk with more legs
Mitigation Only execute if spread persists; larger minimum threshold

A3: Cross-Market Arbitrage

Exploits logically equivalent markets priced differently.

Trigger Logically equivalent markets priced differently
Action Buy underpriced outcome, avoid overpriced
Risk Markets may not be truly equivalent; interpretation risk
Mitigation Conservative equivalence matching; human approval for new pairs
// Arbitrage Detection Logic (Simplified)
const totalCost = yesPrice + noPrice;  // e.g., 0.49 + 0.49 = 0.98
const guaranteedReturn = 1.00;          // One outcome always wins
const grossProfit = guaranteedReturn - totalCost;  // 0.02
const fees = guaranteedReturn * 0.02;   // Polymarket fee (~2%)
const netProfit = grossProfit - fees;   // Profit after fees

if (netProfit >= minProfitThreshold && totalCost < 1.00) {
    // Valid arbitrage opportunity
    executeArbitrageTrade(market);
}

Event-Driven Strategies

Event-driven strategies capitalize on information before markets reprice.

E1: Known-Source Event Trading

Trades when authoritative sources confirm events.

  • Example: AWS Status page shows us-east-1 outage → Trade "Major tech outage in December" market
  • Mitigation: Require confirmation; check market hasn't moved; time-bound validity

E2: Breaking News Trading

Reacts to breaking news from credible outlets before absorption.

  • Risk: News misinterpretation; already priced in
  • Mitigation: Source credibility scoring; staleness checks; position limits

E3: Scheduled Event Trading

Positions before known events (earnings, elections, court rulings).

  • Risk: Uncertain outcome—this is probabilistic trading
  • Mitigation: Smaller position sizes; clear thesis required

Passive Strategies

Passive strategies provide liquidity and capture spreads over time.

P1: Market Making (Spread Capture)

Trigger Wide bid-ask spread in liquid market
Action Quote both sides, collect spread
Exit Continuous; manage inventory
Risk Adverse selection; getting run over by informed traders
Mitigation Tight inventory limits; widen quotes near events; circuit breakers

P2: Liquidity Provision

Trigger Stable markets with predictable spreads
Action Provide liquidity at favorable prices
Exit Reduce exposure before market-moving events
Mitigation Event calendar awareness; quick position reduction capability

Execution Engine

The Execution Engine translates decisions into market actions with institutional-grade reliability.

Order Manager

  • Creates orders with proper sizing based on risk limits
  • Tracks order states: pending → submitted → filled/cancelled
  • Handles partial fills intelligently
  • Implements retry logic with exponential backoff

Trade Executor

  • Signs and submits orders to Polymarket CLOB
  • Monitors for fills via WebSocket
  • Records execution quality (slippage, fill time)
  • Handles API errors gracefully

Position Tracker

  • Maintains current positions across all markets
  • Calculates unrealized P&L in real-time
  • Tracks position attribution by strategy
  • Reconciles with on-chain state periodically

Order Types

Polymarket CLOB supports only limit orders. Execution behavior varies by time-in-force:

Type Behavior
Immediate-or-Cancel (IOC) Take available liquidity, cancel remainder
Good-til-Cancelled (GTC) Rest in book until filled or cancelled
Fill-or-Kill (FOK) Fill entire amount or cancel (if supported)

Execution Modes

Mode Description Use Case
AGGRESSIVE Market orders, accept slippage Pure arbitrage (guaranteed profit)
STANDARD Limit orders at or near best price Event-driven trades
PASSIVE Limit orders in book Market making, spread capture
CAREFUL Small initial order, scale if confirmed Uncertain signals

Risk Philosophy

The core tenet: Survive first, profit second. Prediction markets are volatile and illiquid—risk management is not optional.

Default Global Limits

Daily Loss Limit $2,000
Max Drawdown 10%
Max Position Size $5,000
Max Total Exposure $50,000

All limits are configurable per user and per strategy via the Dashboard → Risk Controls panel.


Pre-Trade Checks

Every order is validated by the Risk Controller before submission:

  1. Position size within limits? — Trade value vs. max_position_size
  2. Market exposure within limits? — Total exposure per market
  3. Daily loss limit intact? — Current P&L vs. daily_loss threshold
  4. Strategy-specific limits respected? — Per-strategy position caps
  5. Sufficient collateral available? — Wallet balance check
  6. Market not blacklisted? — Exclude known problematic markets

If any check fails, the order is rejected and an alert is generated. Warnings are issued when approaching limits (e.g., 70% of daily loss).

// Risk Controller Pre-Trade Check (Excerpt)
if (tradeValue > positionSizeLimit.limit_value) {
    result.approved = false;
    result.reason = `Position size ${tradeValue} exceeds limit ${positionSizeLimit.limit_value}`;
}

if (currentLoss >= dailyLossLimit.limit_value) {
    result.approved = false;
    result.reason = `Daily loss limit reached: $${currentLoss}`;
}

Kill Switch

Emergency stop mechanism to prevent catastrophic loss.

Type Behavior
Soft Kill Stop new trades, keep existing positions
Hard Kill Stop new trades, begin orderly position exit
Emergency Kill Cancel all orders immediately

Triggers

  • Daily loss limit breached
  • Operator manual activation
  • Connectivity issues detected
  • Unusual market conditions

Token Gate

Access to live execution requires holding 1% of $POLYSCAN supply in your connected wallet.

Why Token Gating?

  • Capacity Limit: Maximum 100 active users executing simultaneously.
  • Strategy Protection: Arbitrage opportunities disappear when too many bots compete.
  • Aligned Incentives: Token holders benefit from execution quality preservation.

Access Tiers

Demo (Free) Paper trading with simulated $10,000 balance. Full dashboard access.
Live (Token Gated) Real execution on Polymarket. Requires 1% $POLYSCAN holding.

Getting Started

  1. Connect Wallet: Click "Access Desk" and connect your Phantom wallet.
  2. Verify Holding: Ensure you hold 1% of $POLYSCAN supply for live access.
  3. Configure Risk: Set your daily loss limit, max position size, and exposure caps.
  4. Enable Strategies: Activate desired strategies (Arbitrage, Event-Driven, Market Making).
  5. Monitor Execution: The system automatically identifies and executes trades according to your defined parameters.

Dashboard Overview

  • Positions: Current holdings and unrealized P&L
  • Orders: Active orders and recent fills
  • Performance: Daily/weekly/monthly returns by strategy
  • Alerts: Risk warnings, execution failures, opportunities
  • Strategy Config: Enable/disable strategies, adjust parameters