winsznx/theeleven · 30 Jun 2026 · Feature

Uniswap v4 as a Sportsbook, Staffed by Eleven AI Agents

Diego Fernández
Diego Fernández
Staff Writer

A custom hook repurposes a DEX protocol into a pari-mutuel prediction market where autonomous personas mint live football props on X Layer.

winsznx/theeleven
715 stars

The Pitch

Football prop markets have always needed an oddsmaker. The Eleven replaces the oddsmaker with a squad of eleven autonomous TypeScript agents, each assigned a tactical persona drawn from Italian football lore. Il Regista watches for clean sheets and possession swings. Il Bomber hunts for the next goal. Il Mediano tracks fouls and yellow cards. L’Ultimo, the goalkeeper, only watches the clean sheet. During a live match, a MatchPoller consumes fixture data from providers such as Football-Data.org or API-Football and emits state diffs—possession changes, shots on target, corner kicks, foul intensity. Each persona’s TickLoop evaluates whether its tactical window is open and, if so, fires a createMarket call to deploy a new binary prediction market on X Layer mainnet. The project is positioned for the 2026 tournament and is already live at regista11.xyz, complete with a Next.js 15 dApp, a Farcaster Mini App frame, and a public status dashboard that polls the agent runtime every ten seconds.

winsznx/theeleven

The gimmick is easy to dismiss as hackathon theater. It is not. The smart contracts carry 100 percent line, branch, and function coverage across sixty-seven tests. The agent runtime passes 229 of 229 tests and avoids nondeterministic logic entirely—replay the same match feed and every persona fires at exactly the same block. The factory contract is verified on OKLink, the hook is mined to a specific permission bitmap, and the first gasless EIP-3009 settlement was documented on X Layer in May 2026. This is not a slide deck; it is protocol infrastructure built under the deadline pressure of the X Cup and deployed to mainnet before the tournament begins.

A Hook, Not a DEX

The architectural insight is that a prediction market for binary events does not need an automated market maker. It needs a stake aggregator with a commitment mechanism. The Eleven’s PropMarketHook is a custom Uniswap v4 hook that overrides the pool lifecycle—beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, and afterSwap—but its most important feature is what it refuses to do. Liquidity provision is rejected by construction. There are no LPs, no impermanent loss, and no constant-product curve. Instead, the hook manages two side pools, OVER and UNDER. Users stake USDT0 into one side. When the market resolves, the winning pool is paid out proportionally from the losing pool in pure pari-mutuel fashion. If the market voids because the winning pool is empty or a deadline is missed, a refund path returns full stakes.

This design choice is austere but correct. AMMs excel at price discovery for continuous assets where liquidity is always desirable. Binary event markets, by contrast, have a terminal resolution point and an information asymmetry problem. The hook solves the asymmetry with a commit-reveal primitive: on market creation, the originating agent publishes only keccak256(revealedParams || salt || agent). The actual parameters remain hidden until the staking window closes, preventing frontrunners from reading the market’s true terms and racing to stake on the informed side. After the reveal deadline, the agent publishes the preimage and the market proceeds to resolution. The commit is an on-chain hash; the reveal is the preimage that proves the agent did not change the terms after seeing the betting flow.

Deploying this requires mining a CREATE2 salt that produces a hook address carrying the 0x2A80 permission bitmap Uniswap v4 demands. The team reports roughly sixteen thousand iterations and seven hundred forty-nine milliseconds on commodity hardware to find the correct salt. Once deployed, the hook factory registers each of the eleven agent wallets—BIP-44 derived from a single master mnemonic—so every market is on-chain attributable to its persona.

The Autonomy Loop

Autonomy here means restart tolerance and deterministic replay, not mere automation. All eleven personas run inside a single container, each with its own TickLoop consuming MatchStateDiff deltas. If the service redeploys mid-match, pending reveals are restored from state; commitments are not dropped. The runtime is provider-agnostic, polling either Football-Data.org or API-Football depending on which key is configured. API-Football is the intended primary for the 2026 tournament, with Football-Data.org acting as a fallback to dodge free-tier rate limits.

The agents do not use randomness. Every decision replays identically against a given feed, which makes the system debuggable and, in principle, auditable. When a persona decides to open a market, it schedules the reveal call for a fixed block after staking closes. The entire loop—poll, diff, decide, commit, reveal, resolve—is designed to run at the speed of a football match, not a batch auction. A missed reveal turns the market into a void, triggering refunds rather than payouts, so the protocol errs on the side of returning capital when the agents fall behind.

Gasless by Design

User experience in on-chain betting is usually a graveyard of approvals, gas estimation, and bridge hops. The Eleven sidesteps this with EIP-3009 transferWithAuthorization on USDT0, Tether’s omnichain stablecoin on X Layer deployed via LayerZero OFT v2. A user signs a single EIP-712 typed-data payload in their wallet. An in-app facilitator validates the authorization and relays the stake on-chain, paying gas in OKB. The user pays nothing. The project claims this is the first documented dapp on X Layer using the EIP-3009 gasless flow, and the team has published the x402-facilitator package to npm so other builders can reuse the settlement rail.

The dApp itself is a Next.js 15 application with a 3D stadium landing page, but the more interesting surface is the Farcaster Mini App frame. Casting a market address opens a shared betting card inside Warpcast. The gasless signature is chain-agnostic—signed off-chain—so settlement always lands on X Layer even if the user’s wallet is native to another chain. The caveat is that native signing through the Warpcast host wallet currently requires X Layer to be added to Farcaster’s supported chain list, which today includes Base, Optimism, Arbitrum, Mainnet, Polygon, Unichain, and Zora. Until then, the frame launches the external dApp to complete the stake. The decoupling of signature chain from settlement chain is a small but meaningful UX pivot that acknowledges the reality of fragmented host-wallet support.

The Centralization Tax

For all its on-chain minimalism, The Eleven carries a conspicuous trust anchor. Every market resolves through a single resolver address hardcoded at deploy. If msg.sender is not that address, the transaction reverts. Non-tournament markets currently use an admin resolver, which is exactly as centralized as it sounds. Tournament markets plan to delegate resolution to FlapResolutionRelay, which consumes a WorldCupResolver feed on BNB Chain, holds the outcome through a dispute window, and allows a guardian veto before finalization. That architecture is described in the repository but labeled as planned, not live.

There are other bottlenecks. Match data originates from centralized sports APIs subject to rate limits and downtime. The eleven agents are the only entities permitted to create markets; there is no open market-creation policy. And because the hook rejects liquidity provision by design, the protocol cannot tap into passive liquidity or composable yield strategies. It is a closed, pari-mutuel arena staffed by a fixed roster of AI personas. The protocol is trust-minimized at the staking layer, but not at the oracle or market-creation layer.

Agents as Infrastructure

The Eleven arrives at a moment when AI agents are graduating from novelty to plumbing. Mark Hendy’s experiments with an OpenClaw agent navigating Polymarket—configuring VPNs, executing cross-chain swaps, and signing CLOB orders—demonstrated that autonomous finance is already possible on commodity hardware. Polymarket’s own agents repository, now archived, sketched a Python framework for the same idea. Recent industry coverage has tracked autonomous AI agents entering crypto prediction markets, framing the shift as an inevitability rather than an experiment. The Eleven differs in direction: instead of teaching an agent to trade existing markets, it teaches agents to birth the markets themselves and settles them inside a DEX protocol repurposed as a betting primitive.

The project also ships an MCP server, exposing four tools and two resources to any Model Context Protocol client—Claude Desktop, Cursor, or a Vercel AI SDK loop. A compatible runtime can query active markets, inspect pool balances, and submit a gasless stake without ever opening a browser. The team frames this as an ERC-8257-style skill manifest, registry-ready for OnchainOS discovery layers. Whether or not that standard matures, the implication is clear: the same autonomous loop that creates markets can now be invoked by other autonomous loops.

Sports betting on blockchain has long promised transparency and automatic payout via smart contracts. Industry observers note that regulatory alignment, infrastructure investment, and digital literacy remain significant barriers to mainstream adoption. The Eleven does not solve regulation, but it does compress the infrastructure problem into a single container running eleven deterministic processes, a mined hook address, and a gasless relayer. For the 2026 tournament, the question is whether the agents can keep pace with ninety minutes of live football without dropping a commitment or missing a reveal deadline. If they do, they will have proven that a Uniswap pool can become a sportsbook, and that the oddsmaker can be a script.

Sources

  1. The Eleven
  2. Teaching My AI Agent to Trade Prediction Markets - Mark Hendy
  3. Blockchain in Sports: E-sports, Betting & Ethical Use - aists
  4. The Eleven (Live in San Francisco, 1969) (2001 Remaster) - YouTube
  5. There's Now an Autonomous AI Agent for Crypto Prediction Markets
  6. Blockchain in Sports: A Comparative Analysis of Applications and ...
  7. THE ELEVEN | Spotify
  8. Autonomous AI agents in decentralized finance: Market dynamics ...
  9. [PDF] The Legal Integration of Sports Betting With Cryptocurrency
  10. The Eleven Productions (@theelevenmusic) - Instagram
  11. Trade autonomously on Polymarket using AI Agents - GitHub
  12. Sports Betting, Bitcoin and Crypto - Has It's Time Come?

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.