Microprice Market Maker — Patch Update
Audit / Issue Found
The strategy anchored its quotes to the Stoikov microprice — a forward-looking blend of bid and ask weighted by order-book pressure — but it posted only one buy and one sell each cycle at full size. The microprice is excellent at predicting which side will move first, which is exactly why getting filled in lump at that price hurts: when the tape confirms the lean, the bot has nothing left to follow through with.
Before the patch
A book imbalance pointing down would put the bid at a tilted price, but the full size sat at that single rung. If the down-move was real, the full buy filled at the worst place and price kept going lower with no spare capital to add. Same on the other side with rallies.
After the patch
The buy and sell sizes are now spread across four rungs each side by default, walking eight basis points deeper into the book per side. The microprice tilt still sets where the top rung sits — the model's prediction is unchanged. What changes is that you keep a queue of orders ready to fill if the predicted move continues, so the average fill tracks the move instead of front-loading at the top of it.
Tunable per pair: number of rungs and the rung spacing in basis points. Set rungs to one for the previous single-shot behaviour.
Bottom line
The bot now respects the microprice signal AND respects the fact that signals continue past the first tick. Better averages, less hurt from getting picked off on the first fill.
Follow-up correctness audit, same day
Three real issues were found and fixed in a deeper review.
First, the position cap that protects you from over-extending was checking your current position before placement, but the new four-rung ladder can add up to one full target size on each side. On an under-inventoried day with the size skew turned up, the ladder could push you past the cap in a single cycle. The fix projects what the cap would look like if the entire ladder filled and only allows the loop to start if the projected position still respects the cap. Same applies on the ask side.
Second, the side-panel value labelled Pair Exposure was always showing one hundred percent on this strategy because the formula was the spot-side version and the strategy runs on futures. The fix replaces it with a futures-correct calculation, position notional divided by wallet balance.
Third, the trade counter never moved on normal post-only fills. It only incremented on emergency scratch closes and on hard position-cap reductions. So a healthy strategy quietly capturing spread looked like it was doing nothing on the dashboard. The fix turns the inventory-change detector at the end of each cycle into the authoritative source for the counter and the volume totals. The emergency paths still tag the cycle so they don't get double-counted, and post-only fills now show up exactly once each.
Other findings from the review were checked and confirmed as false positives or already covered.