Polymarket

Quant infrastructure for probability markets — multi-source signal, Kelly-sized positions, dedicated agent stack.

Polymarket architecture diagram

Context

Prediction markets are noisy, thinly traded, and often under-instrumented. The signal is public, but turning that signal into a tradeable decision takes infrastructure: ingestion, cross-market comparison, probability estimation, position sizing, and risk gates. That's the setup. The question is what you need to build before the market is worth touching.

Trading Hermes — the trading orchestrator inside the broader Hermes system — already had a working trading stack when I started. It executes trades across equities, crypto, and Polymarket. Simple, interconnected, part of the broader Hermes ecosystem.

But Polymarket is its own beast. The signal sources are different, the math is different, the time horizons are different, the failure modes are different. A simple trading stack inside a generalist orchestrator can execute Polymarket trades — but it can't run Oracle dispute analysis, cross-asset farming across five different venues, or the kind of probability-matrix synthesis that probability markets actually reward.

So I built a specialized stack for it. Trading Hermes and the Polymarket stack live in the same ecosystem at two zoom levels. Trading Hermes still trades Polymarket through its simple path. The Polymarket stack is what makes that trading good. The two systems coordinate at the portfolio level; the specialized one handles the specialized work.

What shipped

The system has three layers.

The signal layer watches what other people are doing. Whale wallets on-chain, publicly disclosed political trades, Oracle dispute activity, cross-venue pricing across Polymarket cash, options, futures, equities, and other prediction markets. The point isn't to copy any single source — none of them is right alone. The point is to aggregate across them and look for places where the synthesis disagrees with the market's price.

The quant layer takes that signal and runs it through actual position sizing. Kelly criterion for fractional sizing. Probability matrices that compute distributions over outcomes rather than point estimates. Explicit gates: jurisdiction, tax consequences, correlation across open positions, variance budget for the week. Every gate has to clear before any position sizes up.

The execution layer trades. Most of the time autonomously, within bounded position sizes. Big trades escalate to me with the agents' reasoning attached — the system explains why it wants the position, not just what. Daily briefings tell me what got traded, what didn't, what the system is watching, what the gates are blocking.

Three things in the system worth naming explicitly.

Cross-asset farming. The system watches the same future event priced across five venues — Polymarket cash, options markets, futures, equities, and other prediction markets like Kalshi. When the same outcome is priced differently across instruments, that gap is the trade. Most Polymarket-only traders never look at this. The agents that watch the broader markets aren't trading there — they're triangulating.

Oracle dispute analysis. Polymarket markets resolve through UMA's optimistic oracle, which has dispute windows. Those windows are themselves opportunities — for or against the dispute, depending on what the underlying signal says. The system flags disputes early and positions around them. This is a niche most retail doesn't touch.

Tiered model routing. Routine queries run locally on small open-weight models — fast, free, good enough for most reasoning. Long-context work escalates to cheaper hosted open-weight models. Multi-strategy synthesis, Oracle dispute reasoning, and cross-asset farming use frontier APIs on demand. Today that means a Gemma-class local tier, Kimi/DeepSeek-class middle tier, and Opus/GPT-class frontier tier. The tiers are what's stable; the specific models rotate as the landscape shifts.

The whole stack manages multiple wallets, runs mostly on hardware I control, and operates only inside the bounds the gates define.

What landed

In one of the first weeks the system was live, the agents flagged a weather-related market I would never have looked at manually — wrong domain, not on my radar — sized a small position, and the trade resolved profitably. That moment was the proof. The agents weren't just executing strategies I'd already thought of. They were expanding the search space while keeping risk bounded.

The system's been running for about two months. Net positive. Compoundable. Five micro-bets a day is a normal week. Zero is also a normal week — quiet on quiet weeks is a feature, not a bug. The daily briefings give me the read I need without watching markets myself.

What I learned

The first lesson is that agents trading on signal need foundation before they can trade. Two to three weeks of historical context and live data ingestion before the system produces signal you can act on. Most people throw an LLM at trading expecting day-one performance and lose money learning what the system needs to learn for free. The infrastructure has to bake.

The second lesson is the one I'd put on a wall. Small repeated edge compounds. Large conviction bets don't. Fractional positions with bounded risk survive losing streaks. Big occasional bets with confidence drawdowns give it all back, even when they're "right." The system is built around this — refuses certainty even at 95% model confidence, sizes fractionally, treats every trade as one of many rather than the one. Conviction without restraint is a way to lose money slowly.

The third lesson is honesty about decay. Any specific edge erodes. What works on Polymarket today is a YouTube tutorial in six months. The architecture has to assume that. Strategies are replaceable; the infrastructure to find new ones quickly is what you actually own.


Next: scaling the same pattern to other markets. A dedicated stack for crypto signal, another for equities flow, each with its own agent infrastructure. The bet is that domain-specific quant systems beat general-purpose trading agents.