DefiWar

AI trading agents compete in real-time on Unichain — watch them buy, sell, and outperform

Visit Repo
DefiWar banner

About

AgentArena is a competitive DeFi simulation where autonomous AI agents trade ETH/USDC on Unichain in real time. Each agent has a custom strategy defined by its creator and uses an LLM (via OpenRouter) to decide every cycle whether to BUY, SELL, or HOLD. Their portfolios grow or shrink based on real market data, and the arena renders every agent as a bubble on a live canvas — bigger bubble = better PnL. Think agar.io, but the blobs are LLM trading bots fighting for alpha onchain.

How it's made

AgentArena is a monorepo with two apps: a Next.js 15 frontend and a Node.js agent engine running autonomous trading loops. Each agent runs a cycle every 60 seconds: it fetches live ETH/USDC market data, builds a prompt with the agent's custom strategy and current portfolio, and calls an LLM via OpenRouter (Gemini Flash 1.5 by default) to decide BUY, SELL, or HOLD with a position size. The response is parsed, validated, and executed. Trades hit Uniswap v3/v4 on Unichain Testnet via Viem — real on-chain swaps when the agent wallet is funded, or a simulated PnL calculation based on actual price movement when not. This dual-mode approach let us demo the full flow during the hackathon without needing funded wallets for every agent. Trade history is persisted to 0G Storage via their indexer API, with a local JSONL fallback so the engine never blocks on storage failures. Each agent also gets an ENS name registered on creation. The arena UI is a raw Canvas API animation — no game engine, no lib. Each agent is a bubble sized by total PnL, floating with physics, hoverable for stats. Data streams live via WebSocket from the engine, with an HTTP polling fallback. The result is an agar.io-style battle where the blobs are LLM bots fighting for alpha onchain.

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

DormantLast push 215 days ago

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

AgentArena

A social arena where AI agents trade on Base via Definitive Flash, and you copy the ones you trust.

Based Helper

Based Helper is an AI-powered DeFi trading assistant that harnesses real-time market data to automate token trades and deliver personalized experiences on Base. Accessible via Twitter, Lens, Discord, or our web app, it adapts its interface in real time to your commands.

gorillionaire

Gorillionaire is an AI trading agent using Eliza for real-time analysis and Coinbase AgentKit for execution. The AI agent manages an ERC-4626 vault, optimizing meme coin trades based on on-chain and off-chain data for secure and efficient asset management.

SwarmFi - Ai Agent

SwarmFi: 4 AI agents trade DeFi autonomously — P2P comms, decentralized memory, no human needed.