DEV Community

Ilya Gordey
Ilya Gordey

Posted on

I Built an AI Agent That Trades Polymarket 24/7 — Here's How It Works

Prediction markets. Whale wallets. And the question that kept me up at night.

It Started With Watching Wallets

I was manually trading on Polymarket. Losing, mostly — not because my analysis was wrong, but because by the time I'd read the news, checked the odds, and placed the trade, someone had already moved the market.

Then I started looking at on-chain data. Some wallets were consistently early. 58%+ win rate across hundreds of trades. Not lucky — systematic.

They weren't smarter. They were faster. And they clearly had automation.

So I started building mine.

What I Learned Building an Autonomous Trading Agent

Getting the data is easy. Acting on it is hard.

Polygon is public. You can read every wallet, every trade, every timestamp. The signal is all there — whale opens a position at 2am, market moves 20% by morning.

The problem is execution speed and geo-blocks. Polymarket blocks most of the world (including where I live — Thailand). The CLOB API is finicky. And placing an order requires: USDC approval, wallet signing, order construction, submission — four steps that need to happen in seconds.

I ended up routing everything through Vercel's Tokyo region (hnd1) — the one datacenter Polymarket doesn't block. It's janky but it works.

Non-custodial was non-negotiable.

I didn't want to hold user funds. So every user gets their own Polygon wallet, private key encrypted with AES-256-GCM, stored only on their side. The agent signs transactions locally. We never touch the money.

The leaderboard changed everything.

When I added a public leaderboard showing which agent strategies were performing — people started competing. Optimizing not just for profit but for rank. It turned a trading tool into a game.

The Bigger Realization

Halfway through building this I had a thought that I can't un-have:

People already deposit money into AI agents. They just don't call it that.

Your Meta Ads budget? That's a deposit into an AI agent. It decides targeting, bids, timing — autonomously. You fund it and hope it earns more than it spends.

Polymarket is the same model, but transparent. Every trade is on-chain. You can audit exactly what the agent did and why.

We're at the beginning of a shift where "giving money to an AI and letting it run" becomes normal. Not just for ads. For trading, for content, for operations.

I don't know how fast this happens. But it's already happening.

Where It Is Now

The tool is live at polyclawster.com. Early, rough around the edges, but real — real wallets, real trades, real on-chain history.

Building this in public. Sharing the wins and the stupid mistakes along the way.

If you're doing anything similar — AI agents with real-world stakes, prediction markets, on-chain automation — I'd genuinely love to talk: https://twitter.com/ilyagordey

Top comments (2)

Collapse
 
alienjesus profile image
Ilya Gordey

One thing worth clarifying: PolyClawster isn't a "set it and forget it" bot that trades on autopilot with some fixed strategy.

It's a skill — meaning your AI agent executes your strategy, whatever that is. Feed it a YouTube video and say "trade this thesis." Drop in a news article. Tell it to find arbitrage between correlated markets. Ask it to mirror a specific whale wallet.

The agent handles execution. The strategy is yours.

That's the difference between a tool and a terminal. We're building the terminal.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.