Cartea-Jaimungal Micro MM — Patch Update
Audit / Issue Found
The strategy was posting one full-size buy and one full-size sell every cycle. If the market moved hard in one direction, the bot could land the entire intended position in a single fill, leaving no room to average in if price kept moving against it.
Before the patch
On a sudden move, you could end up holding a full target inventory at the very first price — and if price kept dropping right after the buy filled, the bot had nothing left to ladder into. The same applied on the way up: a full exit could happen at the first ask, with no remaining size to capture the rest of the move.
After the patch
The bot now splits both sides of the quote into a stack of smaller orders spread across a price band. By default, the target size is split into four rungs on each side, spaced eight basis points apart. The top rung sits where the original quote was; the rest sit a bit deeper into the book on each side. If the market only ticks once, only the top rung fills — the bot keeps powder dry. If the market continues, the deeper rungs fill and the average entry/exit improves.
You can tune the rung count and the spread width per pair using two new settings (number of layers and how wide the layer band is in basis points). Set layers to one if you want the old behaviour back.
Bottom line
You no longer risk getting your full position printed on the first wick. The bot now scales into and out of inventory the way an institutional market maker would, which protects against the downside scenario where the trade goes against you immediately after the first fill.
Follow-up correctness audit, same day
Two additional issues were found and fixed in a deeper review.
First, the way the strategy was recording the entry price of new fills used the live touch as a proxy. With the new laddered quotes that fill at the actual rung price (often a bit off the touch), this proxy quietly biased the recorded entry. The fix is to take the entry price from the exchange-reported breakeven figure (which is updated from real fills), falling back to mid-price only when breakeven is not yet available. So your recorded average entry now matches what the exchange shows.
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 only runs on futures. The fix replaces it with a futures-correct calculation, position notional divided by wallet balance, so the figure now reflects how much of your account is actually committed to this pair.
Nine other findings from the review were checked and confirmed as false positives or cosmetic concerns and did not need code changes.