Back to portfolio
Case Study · 21Core AI

How I Built 21Core Around Prediction Markets

21Core AI builds measurement infrastructure for prediction markets. It records the Polymarket and Kalshi order books first-hand, maintains the reference clock that makes prints and books joinable, and runs independent validation on quantitative research before it receives capital. The motto on the site is the whole idea: measured, not assumed.

I handle the recording infrastructure, the data engineering, the research, the platform and the product. This is how it came together.

Why prediction markets

More than a billion dollars a year now trades on esports across prediction markets, and very little of it has been measured properly. In equities or futures, microstructure research is a mature field with decades of literature and vendors selling clean history. In esports prediction markets that layer does not exist yet. Each venue sees only its own book, and nobody holds both at once.

The opportunity is operational as much as intellectual. Measuring these markets means recording them continuously, in real time, without missing a window. So the first thing I built was not a model. It was a recorder.

The foundation: data nobody else holds

2.63 billion records from 21Core's own recorders. As of 3 October 2026, the first-party capture holds 1.12B Polymarket records over 44 days and 1.51B Kalshi records over 34 days, with the venue hash, frame order and sequence numbers preserved. The full data lake is 657 GB across 44 datasets, and every file in it is content-addressed and checked by sha256 or ETag.

Two order books on one clock. Kalshi and Polymarket are stamped against the same clock, so a price on one venue can be compared with a price on the other at one-second resolution. The offset between the trade tape and the order book is measured from the market itself: a trade has to hit the price that was resting just before it. That is how the desk found the one day, 7 May 2026, when Polymarket's offset shifted. Without that correction, prints and books cannot be joined at all.

A provenance tier on every source. Every source in the archive carries a label describing how strongly it can be proven:

TierWhat it means
Ground truthFirst-party recording, or what the contract actually paid out on-chain
VerifiedChecked against a second, independent source and agreed
UnverifiedCould not be checked elsewhere, and is labelled that way everywhere it appears

Settlement history the venues do not keep. Kalshi purges settled markets from its API after about 70 days. The archive holds the settlements 21Core recorded daily, so it keeps an outcome oracle nobody else can rebuild later.

Wallet-level history. Polymarket settles on-chain, which makes fill history attributable. The archive holds 221,386 addresses with a role derived from their own trading history.

What 21Core offers

Reference Data. A licence to the first-party order book and trade tape for both venues, with the clock correction that makes them joinable, the venue hashes and sequence numbers preserved, and the settlement oracle included.

Validation. Send 21Core a model and it gets attacked the way the desk attacks its own work: timestamp semantics and label provenance checked, a clustered bootstrap with the multiplicity correction the search actually needs, and a verdict clear enough to hand to an allocator.

Alpha. An esports microstructure strategy in development on the same archive and reference clock. It is held to exactly the standard 21Core applies to clients: a prospective record first, and release when the evidence clears the gate.

No pooled capital, no deposits and no withdrawal credentials, by design.

The research desk underneath

Everything above rests on a research desk with 280+ pre-registered experiments, 4,500+ automated tests, a promotion gate written in code and 1,092 real exchange orders measured end to end. It is described in full in The Research Desk.

The platform

Commits on the platform repository550 since February 2026
Python~55,900 lines across 245 files (FastAPI backend)
TypeScript and TSX~30,400 lines across 154 files (Next.js 16, React 19, Tailwind 4)
REST API endpoints132
Backend test functions636 across 88 test modules
Auth and hostingClerk, Vercel, and a hardened VPS with systemd services and tested restores

The engineering carried forward from earlier generations of 21Core: a multi-tenant decision workspace with a citation-first retrieval engine and a deterministic KPI layer, documented in RAG That Cannot Fake a Citation, and a property-intelligence product whose method work is written up in What I Chose Not to Build. Each generation left something the current one runs on: provenance as a first-class property, deterministic computation kept away from language models, and writing the success criteria down before looking at the result.

The rule that shaped everything

A number is either provable from a source I can name, or it is labelled with how far it can be proven. There is no third category.

That rule is why the provenance tiers exist, why the reference clock is measured from the market instead of assumed, and why the validation offer exists at all. It is also what buyers in this market need most, because a model is only as trustworthy as the data and the test behind it.

Status

ItemStatus
First-party Polymarket recordingRunning on a dedicated Linux server
First-party Kalshi capture1.51B records over 34 days
Data lake657 GB, every file checksum-verified
Reference clockMeasured from the book, 7 May 2026 shift identified
Kalshi settlement oracleArchived
Research desk280+ pre-registered experiments
Live execution lane with operator controlsBuilt and measured on 1,092 real orders
Reference Data and ValidationOffered
Esports microstructure strategy (Alpha)In development

Related: The Research Desk · RAG That Cannot Fake a Citation · Build Evidence