SecureZero @securezer0
I just completed a major refactor of my Polymarket Arbitrage Trading Bot at 6am instead of going to bed
Its Found 2,500 More Matches
And Over $5,000 in New Arbitrages
Here’s exactly how it works and why it's so effective
1. Fetch and Match Markets
The most important feature of a cross market arbitrage bot is that it can identify markets that are the same between two different platforms,
The bot tracks Polymarket, Kalshi & Opinion
Before the bot was looking just at the title and matching using a three phase Jaccard, Vector and Trigram algorithm, then an AI model would look at each match individually and either approve or reject it
Now it runs the same matching algorithm on multiple unique identifiers of a market
For example:
The Category / Tags
The Markets ‘Short Title’
Isolate of an event's market outcome: ‘50 BPS’ on ‘Fed rate cut amount?’
With this improvement I've been able to greatly improve the number of potential matches, which are then sent to the AI which can then do the final confirmation on if the markets are functional equivalent.
+ 15% increase in matched markets
2. Prompt Engineering
AI can be pretty stupid at times, it gets things that should be obviously wrong. One of the key problems here is just in the sheer quantity of different events traded on Polymarket, Opinion & Kalshi.
Most of them the bot matches correctly every time, others require a line in the prompt to give the AI assistance on how to correctly decipher if it's a match or not, and a few are just stubborn and still randomly error even when the prompt is direct.
Figuring out what those are just takes time, a lot of reviewing, revisions and user feedback
I’ve redone a lot of the prompt & then reanalysed over 20,000 potential matches.
+10% increase in matched markets from those previously rejected
( this is becoming one of the hardest parts of building this app, initially I thought it would be easy! )
3. Recreate orderbooks locally
I’ve spoken about this in detail a lot recently, so i wont bore you with it again, just know its key for arbitraging, without recreating the orderbooks you’re going to be an incredibly unprofitable arbitrage trader.
I’ve not done anything to update this part of the bot today, although I do have some big plans!
4. Post it to the Website
The Arbitrages found by the bot are accessible on the AlertPilot website!
There is no delay on the arbitrage data, but there is an interval between refreshes. So you get the live data, wait a few minutes, refresh, get it again
These arbitrages dont close quickly because they are cross market, meaning you can easily manually enter trades and be a successful arbitrager!