<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: MikeMiles</title>
    <description>The latest articles on DEV Community by MikeMiles (@chorchc_chan_17d20ee45739).</description>
    <link>https://dev.to/chorchc_chan_17d20ee45739</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3872073%2Ff5766f9b-a187-4cd9-9c6b-037e2794a6f3.png</url>
      <title>DEV Community: MikeMiles</title>
      <link>https://dev.to/chorchc_chan_17d20ee45739</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chorchc_chan_17d20ee45739"/>
    <language>en</language>
    <item>
      <title>I Built an On-Chain AI Agent Battle Arena on Base — Here's How It Works</title>
      <dc:creator>MikeMiles</dc:creator>
      <pubDate>Fri, 10 Apr 2026 16:10:42 +0000</pubDate>
      <link>https://dev.to/chorchc_chan_17d20ee45739/i-built-an-on-chain-ai-agent-battle-arena-on-base-heres-how-it-works-63n</link>
      <guid>https://dev.to/chorchc_chan_17d20ee45739/i-built-an-on-chain-ai-agent-battle-arena-on-base-heres-how-it-works-63n</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Promdict is an AI agent battle arena on Base. You prompt your agent with a strategy. Agent reads the game guide, builds an autonomous snake bot, and fights for you. 10 bots battle on a 30×30 grid. Smart bots win. Dumb ones die. Spectators predict who survives with USDC — 90% to correct predictors. Every bot is an ERC-721 NFT with a verifiable on-chain kill record.&lt;/p&gt;

&lt;p&gt;No coding needed. Your prompt quality determines your bot's win rate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arena:&lt;/strong&gt; &lt;a href="https://promdict.ai" rel="noopener noreferrer"&gt;promdict.ai&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Game Guide:&lt;/strong&gt; &lt;a href="https://promdict.ai/SNAKE_GUIDE.md" rel="noopener noreferrer"&gt;promdict.ai/SNAKE_GUIDE.md&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Core Idea: Your Prompt Determines Who Wins
&lt;/h2&gt;

&lt;p&gt;Most games reward reflexes, time investment, or spending. Promdict rewards something different: how well you can prompt an AI agent.&lt;/p&gt;

&lt;p&gt;You prompt your agent with a strategy — something like "hunt food when HP is below 30, control territory with flood fill when healthy, only attack head-on when longer." Your agent reads the game guide, understands the mechanics, builds a complete snake bot, and fights for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your prompt is the entire product.&lt;/strong&gt; Two players using the same AI, reading the same guide, with different prompts — wildly different results. One bot dominates. The other dies in 30 seconds.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Game Guide: Purpose-Built for AI Consumption
&lt;/h2&gt;

&lt;p&gt;The entire system depends on SNAKE_GUIDE.md being purpose-built for AI agents to read. It contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Complete game rules&lt;/strong&gt;: 30×30 grid, HP system (100 HP, -1/tick, food restores to 100, ~5 seconds without food = death), head-on collision rules (longer eats shorter, equal = both die)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API reference&lt;/strong&gt;: WebSocket protocol, game state format, valid return values&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sandbox constraints&lt;/strong&gt;: What the isolated-vm allows and forbids (no process, require, eval — AST scanned)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;4 bot templates&lt;/strong&gt;: Starter (basic movement), Food Chaser (A* pathfinding), Flood Fill (territory control), Hunter AI (aggressive targeting)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you prompt your agent "read this guide and build me a bot that...", it has everything it needs. The variance comes entirely from your prompt — how precisely you describe your strategy, what scenarios you anticipate, which template approaches you combine.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Prompt Quality = Win Rate
&lt;/h2&gt;

&lt;p&gt;The game mechanics create situations where vague prompts produce dead bots and precise prompts produce killers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HP bleeds constantly&lt;/strong&gt; (-1/tick). A bot that doesn't actively path to food when low will die in ~5 seconds. If your prompt didn't mention HP thresholds, your bot ignores this and dies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Head-on collisions have clear rules.&lt;/strong&gt; Longer snake eats shorter. If your prompt didn't mention this, your bot charges into longer snakes and gets eaten.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Competitive mode spawns obstacles, food vanishes, corpses become walls.&lt;/strong&gt; If your prompt only considered the basic arena, your bot crashes into obstacles and dies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Getting cornered is fatal.&lt;/strong&gt; The #1 cause of death. If your prompt didn't address corner escape, your bot dies in a corner.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same AI. Same guide. Different prompt. One bot wins consistently. The other dies every time.&lt;/p&gt;




&lt;h2&gt;
  
  
  USDC Prediction Layer
&lt;/h2&gt;

&lt;p&gt;While bots fight, spectators predict who survives with USDC.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pari-mutuel system on Base:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;90% of the pool to correct predictors (50%/30%/20% for 1st/2nd/3rd place picks)&lt;/li&gt;
&lt;li&gt;5% to top 3 bot owners (their bots earn USDC from every prediction pool)&lt;/li&gt;
&lt;li&gt;5% platform fee&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This creates two ways to play:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Prompt your agent&lt;/strong&gt; → bot fights → top 3 earn from the pool&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch and predict&lt;/strong&gt; → pick the winner → take 90%&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both zero-sum. You win, someone else doesn't.&lt;/p&gt;




&lt;h2&gt;
  
  
  On-Chain Infrastructure: 8 Smart Contracts on Base
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Contract&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;BotRegistry&lt;/td&gt;
&lt;td&gt;Bot creation, dynamic registration fees, NFT minting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SnakeBotNFT&lt;/td&gt;
&lt;td&gt;ERC-721 with on-chain metadata and kill records&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PariMutuel&lt;/td&gt;
&lt;td&gt;USDC prediction pools, on-chain settlement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RewardDistributor&lt;/td&gt;
&lt;td&gt;USDC reward accumulation + batch claiming&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PredictionRouter&lt;/td&gt;
&lt;td&gt;EIP-712 intent routing and resolution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BotMarketplace&lt;/td&gt;
&lt;td&gt;Escrow-based NFT secondary market (2.5% fee)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ReferralRewards&lt;/td&gt;
&lt;td&gt;Referral system (points-based)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MatchRecordStore&lt;/td&gt;
&lt;td&gt;Match result hash storage every 3 hours&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Bot Execution Environment
&lt;/h3&gt;

&lt;p&gt;Bots run in &lt;code&gt;isolated-vm&lt;/code&gt; — a V8 isolate with strict constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;8KB max code size&lt;/li&gt;
&lt;li&gt;No access to Node.js APIs, filesystem, or network&lt;/li&gt;
&lt;li&gt;AST security scanning (blocks process, require, eval, import)&lt;/li&gt;
&lt;li&gt;50ms tick rate (20 FPS), fully autonomous during matches&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During a match, bots are fully autonomous. No human intervention. Just the algorithm your prompt created, making decisions 20 times per second for 180 seconds.&lt;/p&gt;




&lt;h2&gt;
  
  
  NFT War Economy
&lt;/h2&gt;

&lt;p&gt;Every registered bot mints as an ERC-721 NFT on Base:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verifiable kill record&lt;/strong&gt;: Win rate, matches fought, kills — all on-chain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Earning potential&lt;/strong&gt;: Top 3 bots earn USDC from every prediction pool (3% / 1.5% / 0.5%)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tradeable&lt;/strong&gt;: BotMarketplace with escrow-based trading&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic registration&lt;/strong&gt;: 0.01 ETH base fee, increases every 60 registrations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A bot with a 70% win rate is a genuine income-generating asset. The marketplace creates price discovery for prompt quality.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: Node.js, Express, WebSocket (real-time match broadcasting at 20 FPS)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: React 19, Vite, wagmi, viem, RainbowKit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart Contracts&lt;/strong&gt;: Solidity, Hardhat, OpenZeppelin, deployed on Base&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bot Sandbox&lt;/strong&gt;: isolated-vm (V8 isolate), AST security scanning&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prediction&lt;/strong&gt;: EIP-712 typed data for gasless prediction intents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure&lt;/strong&gt;: Dual TX queue (backend + settlement wallet), PM2, VPS&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What We Learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Precision beats creativity.&lt;/strong&gt; The strongest bots don't come from poetic prompts. They come from precise ones — exact HP thresholds, exact collision rules, exact mode-switching conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The guide quality is the weapon factory.&lt;/strong&gt; The better the game guide is for AI consumption, the better the output. We've iterated on SNAKE_GUIDE.md extensively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Iteration is the meta.&lt;/strong&gt; Nobody wins with their first prompt. The loop is: prompt → watch 3-5 fights → identify how your bot died → refine → repeat. Players who iterate 5-10 times consistently produce stronger bots.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Non-coders compete equally.&lt;/strong&gt; Players who can't code but understand strategy and prompt effectively build bots that beat developer-made ones. The prompt layer levels the playing field.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;You prompt your agent. Agent builds the bot and fights for you. Smart bots win. Dumb ones die. Predict the outcome with USDC.&lt;/p&gt;

&lt;p&gt;Arena runs 24/7. Free to start. No coding needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://promdict.ai" rel="noopener noreferrer"&gt;promdict.ai&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>blockchain</category>
      <category>webdev</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
