Autonomous Arena: A Betting Platform That Runs Itself 24/7
A multiplayer betting game running live on Base mainnet. Players stake real USDC across five game modes. AI bots keep the arena running around the clock — managing wallets, matching players, settling bets — without human intervention. This is the story of 444 commits of production hardening.
Overview
What Is the Autonomous Arena?
The Autonomous Arena is a multiplayer betting platform deployed on Base mainnet where players stake real USDC across five distinct game modes. The system is designed around a single principle: the platform must operate continuously without human oversight. When the human operator is present, they have full control. When they leave, an AI agent takes over — managing wallets, matching players into games, settling bets on-chain, and monitoring the system for anomalies.
This isn't a demo or a proof of concept. Real money moves through this system every day. Players connect their wallets, deposit USDC, and compete in prediction games including live BTC price forecasting. The AI bot handles the operational load that would normally require a team of three working in shifts. It represents the most intensive production hardening effort across all projects: 444 commits across four separate applications, resulting in nine custom AI skills that cover every operational scenario the platform encounters.
The project was built by Temisan Gerrard, a London-based Solutions Architect. You can verify the system is running live right now at autobett.xyz.
The Challenge
Real Money Means Zero Downtime Tolerance
Building a betting platform on a blockchain introduces constraints that most AI projects never face. When a player stakes 50 USDC on a BTC price prediction and the game round closes, the settlement has to happen on-chain, deterministically, and without error. There is no "we'll fix it in the next sprint" when someone's money is locked in a smart contract. Every transaction is final. Every bug has a direct financial cost.
The core challenge was threefold. First, the platform needed to run 24/7 because players are global and active at all hours. Second, the AI agent managing the arena had to be trustworthy with real funds — it couldn't make mistakes with wallet management, bet settlement, or player matching. Third, when something inevitably went wrong at 3am on a Saturday, the system needed enough observability and self-healing capability that it could either fix itself or degrade gracefully without losing player funds.
"When money moves through your AI system, every edge case becomes a financial incident. You don't discover bugs in testing — you discover them when a player's USDC doesn't arrive in their wallet after a win."
The five game modes — including live BTC price prediction, head-to-head matchups, and tournament brackets — each had distinct settlement logic. The AI agent needed to understand which game mode was active, apply the correct settlement rules, handle edge cases like tied predictions, and ensure that every on-chain transaction was properly confirmed before marking a game as complete. This wasn't a single prompt engineering problem; it was a multi-skill orchestration problem where each skill had to interact correctly with the others under real financial pressure.
Additionally, the system had to handle WebSocket connections for real-time game state updates, Chainlink price feeds for BTC prediction games, and Solidity smart contracts for all fund management — meaning the AI agent operated across four different technology stacks simultaneously.
The Solution
A 5-Layer Architecture
The solution was built on the AI Operating Stack — the same five-layer framework used across all production projects. Each layer addresses a specific category of failure that would otherwise bring the system down.
Automated incident response handles the scenarios the ops layer detects. When a WebSocket connection drops during an active game, the reliability layer automatically reconnects and restores game state from the last confirmed checkpoint. When an on-chain transaction fails due to gas spikes, it retries with adjusted gas pricing. Circuit breakers prevent the AI agent from taking actions when the system is in a degraded state — it won't attempt to settle bets if the Chainlink price feed is stale, for example.
Every action the AI agent takes is logged with full context: what triggered the action, what parameters were used, what the outcome was, and how long it took. An admin dashboard provides real-time visibility into active games, pending settlements, wallet balances, and AI agent status. Alerts fire when settlement times exceed thresholds or when the agent encounters an unexpected state. This is the layer that turns a black-box AI into an observable system.
Nine custom AI skills were built to handle every operational scenario: wallet management, player matching, game mode selection, bet settlement, BTC price fetching via Chainlink, tournament bracket management, anomaly detection, owner handoff (human-to-AI and back), and system health monitoring. Each skill is a self-contained module with defined inputs, outputs, and error handling. Skills are orchestrated by a central agent that determines which skill to invoke based on the current game state and operational context.
Game state persistence is critical. Every active game, pending bet, and wallet balance is tracked in a state layer that survives restarts. When the AI agent hands control back to the human operator, it serialises the full operational context so nothing is lost. The state layer also maintains a complete audit trail of every game round, every settlement, and every wallet transaction — essential for both debugging and player trust.
The foundation runs TypeScript across four applications: the game engine, the player-facing frontend, the AI agent backend, and the admin operations panel. WebSocket connections handle real-time game state updates. Solidity smart contracts manage all fund custody and settlement on Base mainnet. Chainlink price feeds provide the oracle data for BTC prediction games. The core system is designed so that any single component can fail without compromising player funds.
Technical Stack
What It's Built With
TypeScript
The entire codebase — game engine, AI agent, frontend, and admin panel — is written in TypeScript. Strong typing catches entire categories of bugs at compile time, which matters when real money is on the line. The shared type definitions across all four apps ensure that game state, bet structures, and wallet operations are consistent everywhere.
Base Mainnet
All financial operations run on Base — Coinbase's Layer 2 blockchain. Low gas fees enable frequent on-chain settlements without eating into the platform's margins. USDC is the native currency for all bets and payouts, giving players confidence in a stablecoin they already trust.
WebSockets
Real-time game state updates require persistent bidirectional connections. The WebSocket layer handles player joining, game round progression, live BTC price updates during prediction rounds, and instant settlement notifications. Connection management includes automatic reconnection with state restoration.
Chainlink
BTC prediction games rely on Chainlink price feeds for tamper-proof price data. The AI agent queries Chainlink on-chain to determine the current BTC price at game round close, then settles predictions based on the oracle-confirmed price rather than any single exchange's data.
Solidity Smart Contracts
All fund custody, bet escrow, and settlement logic lives in audited Solidity contracts deployed on Base mainnet. Players deposit USDC directly into the contract. When a game round completes, the contract releases funds to winners. The AI agent interacts with these contracts through a typed interface that enforces correct parameter ordering and gas estimation. The contracts include emergency pause functionality and a time-locked withdrawal mechanism for player fund recovery.
Decisions
Key Decisions
Skill-based architecture over monolithic AI
Rather than building one large AI agent that handles everything, the system uses nine specialised skills orchestrated by a central controller. This means each skill can be tested, debugged, and improved independently. When the settlement skill has a bug, it doesn't affect the wallet management skill. This decision paid for itself many times over during the 444-commit production hardening process, where most fixes touched a single skill in isolation.
On-chain settlement over off-chain promises
Every bet settlement happens on-chain through a smart contract, not in a database that the platform controls. This is slower and more expensive than off-chain settlement, but it provides cryptographic proof that funds were distributed correctly. Players don't need to trust the platform — they can verify on Base's block explorer that their payout transaction matches the game result.
Human-in-the-loop handoff over full autonomy
The AI agent operates autonomously when the human operator is away, but the handoff is explicit and logged. When the operator logs in, the agent serialises its current state and control transfers seamlessly. When the operator leaves, the agent picks up from the serialised state. This avoids the ambiguity of "who is in charge right now" that plagues partially autonomous systems.
Four apps over one monolith
The game engine, player frontend, AI agent, and admin panel are separate applications with defined interfaces. This allows each to be deployed, scaled, and restarted independently. When the AI agent needs an update, the game engine keeps running. When the frontend deploys new UI, the settlement logic is untouched. The cost is higher initial complexity, but the benefit is that no single deployment can break the entire platform.
Results
What Was Shipped
The Autonomous Arena is live on Base mainnet at autobett.xyz. It runs continuously, processing real USDC transactions across five game modes. The AI agent manages the platform during off-hours without human intervention, handling wallet operations, player matching, game mode rotation, and on-chain settlement. The admin panel provides complete visibility into every action the agent takes, every game round played, and every transaction settled.
The 444 commits represent not just feature development but extensive production hardening: fixing edge cases in settlement logic, hardening WebSocket reconnection under poor network conditions, adding gas price adaptation for Base mainnet congestion, and building the self-healing mechanisms that keep the system running when individual components fail. Each commit was a response to a real scenario the system encountered in production.
Lessons
Lessons Learned
Financial systems expose every assumption. In a content-generation app, a hallucinated sentence is a minor annoyance. In a betting platform, an incorrect settlement amount is a financial loss someone notices immediately. Every assumption you make about data formats, timing, and state transitions will be tested by real users with real money, and the tests they run are far more creative than anything in your test suite.
Observability is not optional — it's the product. The admin panel and structured logging system ended up being as important as the game engine itself. When something goes wrong with real money at stake, you need to answer three questions immediately: what happened, who is affected, and how do we fix it. Without the ops layer, every incident would have required hours of investigation instead of minutes.
The skill-based architecture scaled better than expected. Breaking the AI agent into nine independent skills was initially a design choice for testability. It turned out to be the key to rapid iteration in production. When a new edge case appeared — like a player disconnecting mid-game during a BTC prediction round — we could build and deploy a fix for that specific skill without touching any other part of the system.
On-chain finality changes how you think about errors. In traditional web applications, most errors are recoverable: you rollback a database transaction and try again. On a blockchain, a confirmed transaction is permanent. This forced a fundamentally different approach to error handling: validate everything before submission, simulate transactions before executing them, and build in explicit recovery paths for every failure mode.
Need an AI system that handles real money?
I build production AI systems for fintech, blockchain, and beyond. Whether you need a full architecture sprint or a production build, let's discuss your project.
Available for Q2 2026 consulting engagements.