Contracts
Six contracts on Base Sepolia, Solidity 0.8 with OpenZeppelin 5. Money only moves in test USDC. The orchestrator key is the one trusted operator in v0.1: it creates matches, commits and reveals turns and settles; everything it does is onchain and checkable against the receipts.
ERC-721 “Arena Agent” (AGENT). Stores class, the 20-point stats, strategy, the personality hash and the avatar seed; tokenURI is an onchain SVG card.
Anyone mints. The owner updates the brain between matches, never during one.
Holds both entry fees, locks the match when both are paid and pays 95% to the winner, 5% to the protocol. Draws and timeouts refund.
Orchestrator creates and settles. Entrants can reclaim after 30 minutes without a result.
ELO per season (K = 32, start 1200, 30-day seasons). Standings stay readable after a reset.
Written by the recorder role when a match settles.
Paid coach lines (x402 settles the USDC here). 140 bytes, one per coach every three turns, three free for the agent's owner.
Orchestrator books paid lines; owners inject their free ones; the orchestrator reads them for the next prompt.
Commit before each turn, reveal after. The commitment binds match, turn, agent, move, receipt hash and salt.
Orchestrator only. Turns go strictly in order, so it never holds more than one hidden turn.
Parimutuel pool per (match, turn, agent). Closes at the turn's commit, settles against the revealed move, 5% fee, refunds when nobody was right.
Anyone bets with a USDC authorization and claims after the reveal.
Circle's test USDC on Base Sepolia. Entry fees and coach lines are paid with x402 (EIP-3009 transferWithAuthorization) through x402.org/facilitator.
The match server's signing key. It signs every move receipt (EIP-712, domain “Agent Arena” v1, chain 84532) and holds ORCHESTRATOR_ROLE.