theeleven: The Eleven: How Uniswap v4 Became an AI-Powered Sports Market Engine
Eleven autonomous personas watch live football, commit markets before the action unfolds, and settle winners through a hook-driven prediction protocol.
- The Eleven treats Uniswap v4 as a programmable venue for market creation, not just a swap engine.
- Its eleven personas are market operators with different tactical lenses, which turns one match feed into many distinct prop markets.
- Commit-reveal timing is the anti-cheat core, because it proves the market was opened before the match event it references.
- Gasless authorization lowers the friction enough to make a crypto-native mechanism feel like a fan-facing product.
The hook is the app
The surprise in winsznx/theeleven is not that it uses AI or prediction markets. It is that the project treats a Uniswap v4 hook as the thing the app is built on, then uses that hook to behave like a binary market engine for live football.
In the repo, the pool is not a normal AMM venue. The hook blocks ordinary liquidity behavior and repurposes the lifecycle around market creation, stake aggregation, and settlement. That inversion is the whole point: the contract is not hosting trades, it is hosting a timed market protocol.
function beforeAddLiquidity(
address,
PoolKey calldata,
IPoolManager.ModifyLiquidityParams calldata,
bytes calldata
) external pure returns (bytes4) {
revert LiquidityNotAllowed();
}
Why eleven personas instead of one oracle
The eleven personas are not decoration. They give the protocol a market ecology, where each agent watches a different tactical slice of the same match. One persona cares about cards, another about the next goal, another about fouls, and each produces a different prop from the same live feed.
| Model | Market creator | Timing model | User friction |
|---|---|---|---|
| Standard Uniswap pool | Liquidity providers | Continuous price discovery | Requires trading intent and gas awareness |
| Generic prediction market | A single market creator or oracle | Event-driven, but usually monolithic | Often one market, one outcome, one operator |
| The Eleven | Eleven tactical AI personas | Commit-reveal with deadline control | Signature-based flow that hides gas complexity |
How the protocol stops the market from cheating
Live sports markets are vulnerable to latency. If a goal lands and a market opens after the fact, the system is just laundering hindsight. The Eleven answers that with commit-reveal: the agent first posts a hash, then reveals the actual prop parameters only after the timing window makes the order of events provable.
That matters because it turns the contract into a timestamped witness. The commit proves intent before the match event, the reveal unlocks the market after the window, and settlement only happens once the outcome is known.
bytes32 commitHash = keccak256(abi.encode(revealedParams, salt, agent));
// later, after the reveal window
require(keccak256(abi.encode(revealedParams, salt, agent)) == commitHash, "bad reveal");
Generating illustration...
From match feed to on-chain market
The off-chain agent loop is where the protocol becomes operational. `TickLoop.ts` polls live match data, turns it into snapshots and deltas, asks a persona whether the new state is worth acting on, and then drives commit, reveal, and resolution while Prisma keeps memory of deadlines and prior openings.
That makes the system feel less like a bot and more like a protocol coordinator. The database is not the source of truth for settlement, but it is the guardrail that stops duplicate openings and missed reveal windows.
const snapshot = await tickLoop.buildSnapshot(match);
const delta = tickLoop.diff(snapshot, previousSnapshot);
const decision = await persona.evaluate(delta);
if (decision.shouldOpen) {
await agent.commitMarket(decision.commitHash);
await agent.revealMarket(decision.revealedParams);
await agent.resolveMarket();
}
Gasless participation lowers the barrier
The UX layer matters because a technically elegant market is still a bad product if every participant has to think about gas. The Eleven leans on signature-based authorization and a facilitator or relayer pattern so users can participate without handling the native fee token directly.
| Experience | What the user does | What the protocol hides |
|---|---|---|
| Crypto-native flow | Approve, send, manage gas, wait for finality | Nothing |
| The Eleven flow | Sign an authorization | Gas payment, relaying, and execution complexity |
That is the difference between a prototype and a thing a football fan could actually use. It lowers the cognitive tax without flattening the underlying mechanics.
What this is not
| It is not | Why that framing fails |
|---|---|
| A standard Uniswap pool | The hook blocks normal liquidity behavior and uses the pool as market infrastructure. |
| A generic prediction market | The market is persona-driven, match-specific, and timed around commit-reveal windows. |
| A single-oracle AI agent | The architecture is multi-agent, with each persona responsible for a different tactical lens. |
Why it matters
The Eleven is useful because it shows how far Uniswap v4 hooks can stretch. Once a hook becomes the execution layer, and signatures plus relayers make the UX tolerable, DeFi primitives start looking like app substrates rather than static financial widgets.
The broader lesson is simple. The real innovation is often not the AI, and not even the market. It is the protocol shape that makes the market possible in the first place.