Tazmania is an ultra-low latency trading tool operating on parallel markets such as Polymarket. I used C++ to meet the performance and latency demands, and it's currently running on AWS bare-metal instances. To trigger orders, I use an MLP (multi-layer perceptron) with sub-100μs reaction time. This project is in constant progress and improvement; my latest tests in live conditions brought over 100% return in daily average over 4 consecutive days.
The Challenges
To build this, I've been consistently solving new challenges along the way. Here's the full story from start to current.
What brought my attention to Polymarket is when I started building a tracking tool on it: polytracker.io
When I went on the BTC 15-minute market, I noticed something strange that caught my attention:
The price of the shares were moving before the BTC price on the graph... Did they know the price of Bitcoin before me? Short answer: Yes.
Scratch
So after some serious grinding, I finally found different live feeds that gave me a clear edge over the streams that other arbitrage bots and Polymarket were using. With that, I started building the main algorithm:
Mania
The algorithm was a tough build. The stream was really raw and inconsistent, full of spikes and random noise. I had to clean everything out myself.
The algorithm was okay, but I wanted something that could evolve with time. Thankfully, I had some machine learning experience. That's when I started recording hundreds of markets, built my own dataset, and trained my own MLP.
So I went back to my dataset and ran a bunch of data visualizations to understand what was happening, and that's when it clicked!
I fixed my dataset, trained it again, and it worked! Here are the backtesting results that confirmed it:
And to finish, here is a live presentation of my MLP running on 105 unseen markets, around 25 hours of recorded data.
I'll spare you the other challenges along the way: building our own liquidity with a two-agent system to sell positions instantly, achieving data processing in under 500µs, landing transactions before every other arbitrage bot, pre-calculating market depth to adjust bet sizing, implementing a retry evaluation system, implementing variable slippage, pre-calculating fees, renting dedicated servers across different countries to avoid getting banned by Polymarket, and more...