Table of Contents
Fetching ...

PolySwarm: A Multi-Agent Large Language Model Framework for Prediction Market Trading and Latency Arbitrage

Rajat M. Barot, Arjun S. Borkhatariya

Abstract

This paper presents PolySwarm, a novel multi-agent large language model (LLM) framework designed for real-time prediction market trading and latency arbitrage on decentralized platforms such as Polymarket. PolySwarm deploys a swarm of 50 diverse LLM personas that concurrently evaluate binary outcome markets, aggregating individual probability estimates through confidence-weighted Bayesian combination of swarm consensus with market-implied probabilities, and applying quarter-Kelly position sizing for risk-controlled execution. The system incorporates an information-theoretic market analysis engine using Kullback-Leibler (KL) divergence and Jensen-Shannon (JS) divergence to detect cross-market inefficiencies and negation pair mispricings. A latency arbitrage module exploits stale Polymarket prices by deriving CEX-implied probabilities from a log-normal pricing model and executing trades within the human reaction-time window. We provide a full architectural description, implementation details, and evaluation methodology using Brier scores, calibration analysis, and log-loss metrics benchmarked against human superforecaster performance. We further discuss open challenges including hallucination in agent pools, computational cost at scale, regulatory exposure, and feedback-loop risk, and outline five priority directions for future research. Experimental results demonstrate that swarm aggregation consistently outperforms single-model baselines in probability calibration on Polymarket prediction tasks.

PolySwarm: A Multi-Agent Large Language Model Framework for Prediction Market Trading and Latency Arbitrage

Abstract

This paper presents PolySwarm, a novel multi-agent large language model (LLM) framework designed for real-time prediction market trading and latency arbitrage on decentralized platforms such as Polymarket. PolySwarm deploys a swarm of 50 diverse LLM personas that concurrently evaluate binary outcome markets, aggregating individual probability estimates through confidence-weighted Bayesian combination of swarm consensus with market-implied probabilities, and applying quarter-Kelly position sizing for risk-controlled execution. The system incorporates an information-theoretic market analysis engine using Kullback-Leibler (KL) divergence and Jensen-Shannon (JS) divergence to detect cross-market inefficiencies and negation pair mispricings. A latency arbitrage module exploits stale Polymarket prices by deriving CEX-implied probabilities from a log-normal pricing model and executing trades within the human reaction-time window. We provide a full architectural description, implementation details, and evaluation methodology using Brier scores, calibration analysis, and log-loss metrics benchmarked against human superforecaster performance. We further discuss open challenges including hallucination in agent pools, computational cost at scale, regulatory exposure, and feedback-loop risk, and outline five priority directions for future research. Experimental results demonstrate that swarm aggregation consistently outperforms single-model baselines in probability calibration on Polymarket prediction tasks.

Paper Structure

This paper contains 33 sections, 8 equations, 3 figures, 3 tables.

Figures (3)

  • Figure 1: PolySwarm system architecture. Active markets are fetched from Polymarket's Gamma API and filtered by volume. The swarm engine samples $N$ agents from the 50-persona pool and fires concurrent LLM inference calls with a rate-limiting semaphore. Agent predictions are confidence-weighted and combined with the market-implied probability via Bayesian aggregation. KL/JS divergence is computed across related markets for arbitrage detection. Qualifying trades are submitted to the Polymarket CLOB API (live mode) or simulated (paper mode), and all data is broadcast to the Vue 3 dashboard via WebSocket.
  • Figure 2: Latency arbitrage pipeline in PolySwarm. Breaking news is ingested from external feeds and classified by the LLM swarm for directional impact on relevant prediction markets. Market prices are polled on a 5-second cycle. When a price-relevant event is detected before its full incorporation into market prices, an order is submitted to the Polymarket CLOB API within the available latency window. Block-time constraints on Polygon PoS (approximately 2 seconds per block) set a lower bound on achievable execution latency.
  • Figure 3: Taxonomy of LLM-based financial forecasting approaches. Single-model methods (left branch) encompass sentiment analysis, price prediction, and event-driven trading but are limited by hallucination and overconfidence. Multi-agent methods (right branch) address these limitations through persona diversity, ensemble aggregation, and Bayesian combination with market priors. PolySwarm instantiates the multi-agent swarm leaf of the taxonomy.