What I learned market-making ~$1M of Polymarket sports bets
Thirteen months of running a small market-making bot on Polymarket sports markets: where the profit came from, what changed, and why I paused it.
For about thirteen months I ran a small bot that made markets in sports games on Polymarket. Making a market means keeping a bid and an offer on the book at the same time, so that other people can trade with you whenever they like; you hope to earn the gap between the two prices without being left holding a position that goes against you. I started it to learn how that works in practice. I'd read about Avellaneda–Stoikov (the best-known model for quoting while holding an inventory) and about inventory risk (i.e. the risk of the shares you're holding), but I'd never had to live with either, and I wanted to see which parts of the theory hold up on a real order book. The account was small. It started from an initial deposit of under $500 and grew to the few-thousand-dollar range, so this was a learning project, even though it traded a lot of volume.
Over that time the bot traded about $1.15M of volume across roughly 11,000 markets and 125,000 fills. It made money overall, but about 85% of the profit came from maker rebates (a share of the trading fees that Polymarket pays back to whoever's order was already resting on the book) rather than from the trading itself. Before Polymarket introduced fees on sports markets, the trading made a small, steady margin. Once fees and rebates arrived it roughly broke even, and from late June 2026 it lost money. On 20 November the rebate scheme changed so that an account this size earns nothing, and I wound the bot down.
I built and analysed most of it with Claude Code, and I'll say where that helped and where it didn't.
How a Polymarket sports market works
Each game is a market with two tokens, one per outcome (say Lakers and Celtics). The winning token pays $1 when the market resolves and the losing one pays nothing, so a pair made of one of each is always worth exactly $1. Polymarket lets you merge a pair back into $1 at any time, and split $1 into a pair. For a market maker this means that if I buy one of each, I can turn the pair straight back into $1 without waiting for the game.
Prices are quoted in dollars between 0 and 1, so a price is roughly the market's probability for that outcome. The two tokens share one order book in practice, because buying Lakers at 0.47 and buying Celtics at 0.53 add up to a full pair: when two such bids meet, Polymarket's matching engine fills both and mints the pair. So a bid for Lakers at 0.47 works like an offer to sell Celtics at 0.53. Most sports markets trade on a one-cent grid (the tick), the gap between the best bid and the best offer is usually one to three ticks, and orders at the same price are filled first come, first served (the queue).
Someone who places a limit order that rests on the book is a maker. Someone who trades against a resting order is a taker. From 30 March 2026 Polymarket charged takers on sports markets a fee of
where \(p\) is the trade price and \(r\) was 0.03, rising to 0.05 on 10 July (a couple of leagues had fees from February). Makers paid no fee. Each day they also got back a share of the fees their fills had generated: 25% while \(r\) was 0.03, and 15% after it rose to 0.05, so the rebate per share stayed the same at \(0.0075 \times p(1-p)\). The \(p(1-p)\) term peaks at a price of 0.50, so fees and rebates are largest for coin-flip games and small near the extremes.
I'll quote margins in basis points (bps) of the dollar volume traded, so +20 bps means a profit of 0.2% of what changed hands. For scale, the rebate at a price of 0.50 under either fee rate works out to about 37 bps of the trade's value, and across the prices the bot actually traded it averaged about 25 to 30 bps.
The fee and the rebate at any price Drag the slider or the chart. Values per share, from the formula above.
| Per share | 3% era | 5% era |
|---|---|---|
| \(p(1-p)\) | ||
| Taker fee | ||
| Maker share of fee | 25% | 15% |
| Maker rebate | ||
| Rebate, bps of price | ||
| Rebate on 30 shares | ||
One market, by hand
It helped me to work through a single market with numbers. Suppose the best bids are 0.47 for Lakers and 0.50 for Celtics (a fairly wide three-cent spread, which keeps the arithmetic visible), and I bid 30 shares on each.
| Step | What happens | Cash |
|---|---|---|
| Both bids fill | I pay 30 × 0.47 + 30 × 0.50 | −$29.10 |
| Merge 30 pairs | Each pair turns back into $1 | +$30.00 |
| Maker rebates | 0.0075 × 30 × p(1−p) on each fill | +$0.11 |
| Net | +$1.01 |
Buying both sides for a little under $1 in total, merging and collecting the rebate on top makes about 3.5% on the $29 I put in, with no price risk once both sides have filled.
Usually only one side fills. If only the Lakers bid fills, I'm holding 30 shares that will be worth either $30 or nothing once the game is played, so I'm risking $14.10 to make about $1. And the fills that leave me holding one side tend to happen when someone has a reason to trade (a late injury, a line-up change, a sharper model), which is what market makers call adverse selection. If Lakers falls from 0.47 to 0.40 just after my bid fills, I've lost $2.10 on paper, about two of those round trips.
So most of what follows is about how often both sides fill, what to do with the side that doesn't, and what the one-sided fills cost on average. I'll call that cost the drift after a fill: how far the midpoint (halfway between the best bid and best offer) moves against me in the few minutes after I'm filled. It's a common way of measuring adverse selection, and people also call it a markout.
Getting to a bot
Testing on crypto
The account's first trades, in October 2025, weren't sports at all. I tested the order placement, position tracking and risk controls on Polymarket's crypto up-or-down markets (e.g. "Bitcoin up or down in this hour"), because the volume there was high enough to get feedback within minutes. That came to about 2,200 fills across under a hundred markets, mostly bitcoin, solana and ethereum. It lost a little money, which I expected, and it was the cheapest way I could think of to find out whether the code did what I thought it did.
One of the first things it caught: selling 23 shares came back with "not enough balance / allowance", because partial fills had left the wallet holding 22.99695. Rounding came back in other forms (5.99, X.999) for months.
Version 0: join the best bid
The first proper strategy went live in late November 2025, and it was deliberately simple. It looked at sports games with more than $5,000 of volume that started more than eight hours out. On each one it joined the best bid on both outcomes with 6-share orders, backed off one tick when the sizes at the top of the book were very uneven, and sold any inventory twenty minutes before the start. With about $150 in the account it was profitable in its first weeks, but partial fills caused trouble straight away.
The bot capped its inventory at the order size, so a partial fill of 4 shares left it unable to buy more (it would go over the cap) and unable to sell (4 is below Polymarket's 5-share minimum). The cap went from 6 to 11.999 to "order size + 5" over three days.
A detour into Avellaneda–Stoikov
The best-known model for this problem is Avellaneda and Stoikov (2008). A market maker holding \(q\) units of an asset with midpoint \(s\) quotes around a reservation price
rather than around the midpoint, where \(\gamma\) is risk aversion, \(\sigma^2\) the variance of the price and \(T - t\) the time left. When you're long, \(r\) sits below the midpoint, so you shade both quotes down (i.e. you become keener to sell and less keen to buy), and the shading grows with the size of the position and with the time you'll have to carry it.
The intuition carries over to a binary sports token, but it took me a while to work out where the model fits and where it doesn't.
Only the net position carries risk. Because a Lakers and a Celtics share merge into $1, only the difference between the two holdings matters. Holding 60 of one and 30 of the other is the same risk as holding 30 of the first, so I'll use net position for that difference.
The price doesn't only wander. The model assumes the price moves in lots of small random steps. Before a game that's roughly true, but the real risk is the jump to 0 or 1 when the game is played, with variance \(p(1-p)\). The bot never wants to hold through that jump by accident, so the horizon \(T\) is the cutoff (twenty minutes before the start, when the bot stops quoting), not the resolution.
The spread is set by the tick and the queue. In the model, a wider quote trades a better price against fewer fills. With one-cent ticks and spreads of a few cents there isn't much choice: you're at the best bid, a tick or two behind it, or not really quoting.
The model has no adverse selection. In Avellaneda–Stoikov fills arrive at random and carry no information about where the price is going. In practice the drift after a fill was probably the biggest cost the bot had.
The April rewrite
By April I'd outgrown the first version. With a lot of help from Claude I rewrote the engine around a short strategy write-up that maps each piece back to Avellaneda–Stoikov.
- Buy ladders on each outcome. The engine plans only BUY orders: a ladder of 30-share rungs on each outcome, starting at the best bid and stepping back a tick at a time (two or three rungs, depending on the month).
- The flip. A BUY of Celtics at 0.40 sits in the same place in the book as a SELL of Lakers at 0.60, so any planned BUY that's backed by inventory on the other side gets re-expressed as a SELL of that inventory. It removed a set of bugs where the bot bought the other side instead of selling what it held.
- A cap on the net position of 35 shares (one order plus Polymarket's 5-share minimum), raised to 65 for part of the year.
- Inventory skew. Each full order's worth of net position beyond the first moves the quotes back a tick. The first order gets no skew, because on a two-cent spread a tick is half the margin.
- A wind-down and a cutoff. Two hours before the start the cap drops to zero, so the bot only places orders that reduce its net position. At the cutoff it cancels everything and merges any pairs. Whatever is left (I'll call it the residual) was sold at market (i.e. straight into the best bid, paying the taker fee) until October and held to resolution after that.
- Quality gates. A market needs at least 51 trades and $5,000 of volume in the past day, a best bid above 0.10, and (from August) an event type on an inclusion list.
The bot ran every ten minutes on Railway (a hosting service), later every twenty, and in November moved to a small rented server. Each run looks at every market where it has a position, an order or an interest, works out the orders it wants, and changes only the ones that differ from what's already resting, so it doesn't lose its place in the queue by cancelling and re-placing identical orders.
Where the money came from
The chart below splits cumulative profit into trading before fees, the taker fees the bot paid (mostly from selling residuals at the cutoff), and rebates. It's scaled so that the peak of total profit is 100, so you can read the shape but not dollar amounts.
Cumulative profit by source Weekly, indexed so that peak net profit = 100
Total profit peaked in mid-July. Trading profit had peaked on 19 June and gave back about three quarters of its gains by November, while the rebates kept climbing until the end. In margins:
| Period | Trading margin (after fees) | Rebates | Volume per week |
|---|---|---|---|
| Jan to 29 Mar (no fees) | +27 bps | none | $27k |
| 30 Mar to 10 Jun (3% fee) | +2 bps | +28 bps | $34k |
| 11 to 21 Jun (World Cup) | +59 bps | +29 bps | $47k |
| 22 Jun to 9 Jul (World Cup) | −6 bps | +31 bps | $51k |
| 10 to 21 Jul (5% fee) | −48 bps | +31 bps | $29k |
| 22 Jul to 19 Aug | −77 bps | +31 bps | $11k |
| 25 Aug to 8 Oct | −67 bps | +28 bps | $5k |
| 9 Oct to 15 Nov | −43 bps | +24 bps | $8k |
So the profit came from different places at different times. Before fees, the trading itself made a small margin on fairly high volume. Once fees and rebates arrived at the end of March, trading roughly broke even and the rebates were most of the profit (about 93% of it between 30 March and 10 June). The first part of the World Cup was the best stretch the bot had. From about 22 June the trading margin turned negative and stayed there, and after mid-July the rebates no longer covered it.
Daily profit shows the same pattern. Between November and March the bot made money on 91% of days, and its daily profit had an annualised Sharpe ratio (i.e. mean daily profit divided by its standard deviation, times \(\sqrt{365}\)) of about 17, where a broad stock index usually manages less than 1. I don't fully trust a number that high. Polymarket's daily profit series is smoothed by settlement timing, and hundreds of small, nearly independent bets on a small account are about as favourable as it gets for a Sharpe ratio. But the direction is clear.
| Period | Sharpe, trading only | Sharpe, with rebates | Days with a profit (with rebates) |
|---|---|---|---|
| Late Nov to 29 Mar | 17.4 | 17.4 | 91% |
| 30 Mar to 10 Jun | 0.5 | 7.1 | 74% |
| 11 Jun to 9 Jul (World Cup) | 3.9 | 10.3 | 79% |
| 10 Jul to 15 Nov | −6.3 | −3.2 | 43% |
What changed in late June
The fee rise on 10 July was Claude's first hypothesis when I asked it to look, and the step in the chart lines up with it. There's a plausible story behind it too: a higher fee puts off casual takers first, so the flow that's left is better informed. The tests didn't support it.
The measurement that helped was the drift after a fill, per fill, five minutes later, using one-minute midpoint prices. Claude ran it over about 41,000 of the bot's maker fills (every fill in a random sample of about 40% of the events). Through the spring the midpoint moved about 0.3 to 0.5 cents against the bot in the five minutes after a fill, against a tick of one cent, and from about 22 June that grew to about 0.8 cents. The pattern was:
- the drift got worse from around 22 June, while the fee was still 3%;
- comparing 1 to 21 June with 22 June to 9 July (a placebo boundary, i.e. a date where the fee didn't change) showed a shift about as large as the one across 10 July;
- in a narrow window either side of 10 July there was no step;
- the drift partly recovered after 20 August, with the fee still at 5%;
- there was no sign that the effect was larger at prices near 0.50, where the fee is largest.
From mid-September some NFL and college football markets were fee-free promotions, and some were charged 3% rather than 5%. Within the same sports, the drift after a fill showed no detectable dependence on the fee rate. That test can only rule out large effects (more than about 100 to 150 bps), so a smaller fee effect is still possible, though the drift worsening from 22 June, while the fee was still 3%, suggests the fee wasn't the main cause.
The other useful comparison was against other makers. Polymarket's public trade data shows every fill in a market, including the maker's wallet, so for each of the bot's fills I could find other makers filled in the same market, in the same direction, within half an hour. Their drift after a fill was similar to the bot's in every window, and it worsened by about the same amount after June. So the other makers saw the same worsening as the bot.
Drift after a fill, the bot and other makers Five-minute move of the midpoint against the maker, in bps. Further left is worse.
The timing coincides with the late group stage and the knockouts of the World Cup, and with the end of the summer's big events. My guess is that the mix of people trading sports markets changed around then, but I don't have data on the flow itself (taker volume per market barely changed after 10 July), so that's speculation.
One difference was specific to the bot: the other makers got filled at better prices relative to the midpoint, so they captured more of the spread at the moment of the fill, by roughly 30 to 150 bps depending on the window. I don't know why. An earlier check in October suggested the gap sat in the bot's fresh joins at the best bid (i.e. orders it had just placed there) rather than in orders it had left sitting too long, which points at where it chooses to stand more than at how often it updates.
Where the volume went
Weekly volume fell by about 79%, from about $34,000 a week in April–June to about $7,000 a week in September–November. Some of that was seasonal (baseball ended, and the World Cup volume was a one-off), but I think most of it came from my own changes, made for reasons that seemed sensible at the time.
The clearest lever was the cap on the net position. Raising it from 35 to 65 shares on 29 April took the average number of fills per market from about 7 to about 16. Cutting it back to 35 and dropping the third rung of the ladder on 22 July, which I did because the bot had started losing money, took it from about 16 to about 9, and the drop showed up in every sport.
Fills per market, by week Average fills in each market the bot traded, from 17 Nov 2025
Other changes added to the drop. In August the bot went from running every ten minutes to every twenty. I changed that in Railway's settings rather than in the code, and forgot about it until the logs showed 504 runs a week instead of 1,008. On 24 August it switched to an inclusion list of event types, dropping for example Counter-Strike and the minor football leagues, which had lost money on trading; those types had been about a quarter of April–June volume (roughly $8,000 a week). And the quality gates, which hadn't changed, turned out to exclude most tennis. By the autumn the bot traded in about 8% of the eligible events each week, against 23% in April–June.
From July, when the logs start, about one order in four got filled, and that held steady, so volume moved almost one-for-one with the number of orders the bot placed. So once the trading margin was negative, more orders would have meant more losses, and the cuts probably saved some money.
Exits, and what went wrong
Selling the residual
For most of the year the bot sold any residual at market at the cutoff, paying the taker fee and crossing the spread. In July a $50 safety limit on market orders (meant to catch a runaway order) blocked the bot's own sale of about 60 shares worth $52 to $58, every ten minutes for two hours, until the games were played (as it happened, both positions won).
In October Claude and I looked at it properly. The first comparison was misleading: markets that ended in a sale lost about 142 bps, against about +5 bps for markets that closed out cleanly, but that's mostly selection (the markets that reach the cutoff holding something tend to be the ones that moved against you). Comparing each sale with holding to the result, the sales gained roughly nothing: the side the bot sold went on to win about as often as its price implied. So the fee and spread on the sales (about $87 over six weeks) were mostly cost, and from 9 October the bot merges what it can and holds the rest.
Holding has its own cost. With the cap at 35 and orders of 30, one fill puts a market close to its cap, and about a third of markets since October have ended with a full-size residual. From 10 October to mid-November the bot held 249 residuals to resolution, bought at an average price of 0.47. They won 108 times, against 116 that the prices implied. That's about one standard deviation below what the prices implied, which is consistent with mild adverse selection on the side the bot is left holding, and also with none. The weekly profit since then is mostly the outcome of those bets, and over seven weeks it's probably negative but only about one standard error from zero.
Held residuals: price paid and how often they won 249 residuals, 10 Oct to mid-Nov, grouped by entry price
Incidents, with their costs
The most expensive single market was Thunder vs Hawks on 8 October, a preseason NBA game whose book swung between 0.02 and 0.98. The quality gates only ran when the bot was flat (i.e. holding nothing), so while it held a position it kept quoting, and it sold at 0.027 into the collapse. Ten minutes later the price was 0.35. That one market lost $74, about 38% of the bot's trading loss over the previous six weeks. Two days later I added what I'll call the jump guard: the bot pulls its quotes whenever a book has collapsed or the midpoint has moved 10 cents in half an hour, whether or not it holds anything.
The longest outage came from a single new field. On 11 August Polymarket added grossInitialValue to its positions endpoint, and a strict check on the response made every run fail. The runs still reported success, so nothing alerted me, and 30 markets rode unmanaged for 25.5 hours, costing about $90. With a week of manual wind-down after that and then over a week where the scheduled runs didn't happen, the bot was effectively down for sixteen days. Since the move in November, failed runs exit with an error and ping an external health check.
Start times were a recurring problem. Polymarket's listed start time for minor events can be hours or days late. In July the bot market-made the whole of a League of Legends match, which was played between 05:00 and 08:40 UTC while the listing said it started at 09:50, and in one week in July wrong start times cost about $33. Since August the cutoff also triggers on Polymarket's own "live" and "ended" flags.
Another start-time problem was a college basketball game, Air Force vs Pacific, in November. It was moved back a day, and while Polymarket was editing it the listed start time flipped between the two days several times. Something also moved the thin book: Air Force had traded at around 0.11 to 0.17 that evening, jumped to 0.43 just after midnight, and then swung between 0.16 and 0.47 for hours.
Air Force vs Pacific, 13 to 16 November Air Force price, UTC. Fills in Pacific are shown at the equivalent Air Force price, so buying Pacific appears as selling Air Force.
The jump guard did pull the bot's quotes. But it looks back only 30 minutes, so once the price had sat at a new level for half an hour the bot quoted again. It placed a bid at 0.46 about forty minutes after the jump, which filled shortly before the price fell back. When the start time flipped to the earlier day, the bot hit its cutoff, merged and held a residual. When it flipped forward again, the bot started quoting again and ended up holding the losing side. The market lost about $32 in total: about $31 in the first nine hours and $12 from re-entering after the cutoff, with about $10 made back in between.
Polymarket retired version 1 of its data API on 2 November. This was before the alerting change, so every run failed quietly from that evening until I migrated the code two days later. The orders left resting on the book in the meantime took 64 fills with nothing managing them, leaving several markets at about twice the cap.
How I checked the conclusions
Most of the ideas and decisions over the year were mine, but a lot of the analysis was done with Claude Code.
For the final review I used a handful of separate Claude sessions with different jobs. An independent analyst got access to the data and a description of the question, but none of my hypotheses. Specialist sessions ran single tests (the drift after a fill across fee regimes, the comparison against other makers). Then a reviewer that saw only their written reports, not the data, looked for contradictions, mismatched windows and claims stronger than the confidence intervals allowed. Its notes were small and specific, which made them easy to check:
- it changed "the strategy is losing money" to "probably losing money, not proven" for the period since October;
- it corrected a claim that reaching the new rebate threshold would take three to five times the bot's best month (it's about 2.3 times);
- it pointed out an income source I hadn't priced, liquidity rewards (a separate Polymarket payment for keeping quotes near the midpoint in selected markets), which the bot had earned $0.49 from in its life.
The independent analyst found what was probably the most consequential bug of the year, in my own backup job. My Logfire logs only go back about 30 days, so since August a nightly job had been archiving them along with the account's activity feed. It removed duplicate rows, which seemed harmless, but one transaction can fill several of my orders of the same size at the same price, producing rows that are identical in every field and are still separate fills. About 600 fills ($7,900 of volume) had quietly disappeared from the archive. For months I'd been working around what I thought was Polymarket's API dropping rows, and setting aside around 240 markets whose share counts didn't add up. The same missing fills had also produced a false confirmation that one of Polymarket's profit fields included fees, because they happened to cancel out the fees almost exactly. The activity feed itself has the full history, so the archive has since been rebuilt from it.
The findings that reversed during the year (the trades endpoint, the ten-minute price bars, the fee netting and the backup's dropped rows) all came from data that was incomplete or stale, and the reasoning on top of that data was mostly fine. In July a finding that "fills at the best bid are toxic" turned out to come from Polymarket's trades endpoint returning only about 3% of my fills (97 rows where the full activity feed had 2,995). Later that month a finding that "fills deeper in the ladder are toxic" came from the price-history endpoint, which silently returns ten-minute bars when you ask for the full history, so every "midpoint at fill time" was up to ten minutes stale. Both came to light when a fresh Claude session rebuilt its own pipeline without seeing my conclusion. So for any finding that would change the strategy, I now ask for that kind of re-derivation before acting on it.
Claude reads a skill file before any analysis of the bot, and over the year it turned into a running list of traps like these. Two I'd pass on to anyone doing this. The last day or two of any profit window looks much worse than it really is, because positions settle the following day (one "−$106 day" turned out to be −$16 once settlement landed). And on a laptop that isn't set to UTC, Python's naive datetime.timestamp() uses local time, which for a while in October silently shifted every price-history window I fetched; building timestamps from timezone-aware UTC datetimes fixes it.
Why I paused it, and what would change my mind
Since late June the trading margin has been negative: clearly so over July to November, and probably so since October. From 20 November Polymarket pays maker rebates in tiers, by 30-day volume weighted by \(p(1-p)\), starting at $200,000. The bot's weighted volume over the last 30 days was about $16,000, and its best 30 days ever were about $87,000. Even the lowest tier pays 3% of the fees a maker's fills generate, about 7 bps at a price of 0.50, against the 25 to 30 bps the bot used to get. With no rebate and no trading margin I can point to, there's no expected profit in running it. So I switched it to a shutdown mode that cancels anything that would add to a position and lets the remaining positions reach their cutoffs.
I'd restart it if a small test showed a positive margin before rebates. The things I'd try first:
- Quote one tick behind the best bid rather than joining it, and judge the change on the drift after a fill over a few weeks rather than on profit, which would take months to separate from noise at this size.
- Give every order an expiry time just before the cutoff (Polymarket supports this), so orders never rest into a game when a run is late or fails.
- Make the cutoff permanent once a market has reached it, so a start time that changes can't send the bot back in, and make the jump guard remember a jump for longer than 30 minutes.
- Separate the order size from the cap (smaller orders under the same cap), so one fill doesn't turn a market into a directional bet.
- Update faster than every twenty minutes, mainly so that a jump or a collapsing book gets a response within a minute or two.
If I built another one, I'd set up the things that went wrong this year before writing any strategy: an archive that keeps every row of the activity feed, runs that fail loudly and alert me, order expiry times, and a fresh Claude session re-deriving any finding before I change the strategy because of it. Avellaneda–Stoikov was useful for thinking about inventory and the cutoff, but I think most of the change in profit this year came from adverse selection and the fee schedule, and the model includes neither.