Liquidity-aware sizing and demand gating in a virtual commodity exchange
Abstract
We study manual market-making decision support in Hypixel SkyBlock’s Bazaar using visible order-book summaries and retrospective replay. The system estimates competition from the standing ladder, limits position size by visible exit depth, and combines 2,618 crafting recipes through one-sided price penalties. These changes reduce the earlier model’s estimated hourly edge by a factor of 5.3. The crafting snapshot contains 289 fully priced recipes and 167 products affected by active penalties. A capture gate fitted on an earlier recording is replayed on a separate day. Additional demand gating and flow-based sizing, evaluated on that replay day, raise simulated return per cycle from 4.13% to 13.21% while reducing capital cycled from 81.5 billion to 27.3 billion game coins. A quote-depth sweep favors 5% of the spread under two tested fill models. The API exposes limited depth and rolling activity summaries, so capture and fills remain modeled quantities. Market impact, fresh-day confirmation of the later policy changes and prospective execution validation remain open.
Keywords: market making · limit order books · market microstructure · virtual economies · arbitrage · backtesting
1Introduction
Online games have long run economies large enough to study with the tools of economics [1]. Some now run full continuous double auctions with public order books, which makes them unusually transparent settings for market microstructure [2, 3]. The Bazaar of Hypixel SkyBlock is one: an exchange of roughly 1,700 in-game commodities with resting buy and sell orders, instant market orders on both sides, and a public endpoint that publishes limited-depth order summaries for each product.
A widespread informal practice in such markets is flipping: placing passive buy and sell orders to collect the spread. Returns depend on fills, inventory, fees and adverse selection [4, 5]. This paper evaluates liquidity and demand constraints using the API-visible book [6]. It compares retrospective policy variants under explicit execution assumptions.
The system is decision support only. It ranks five strategy families (spread capture, craft arbitrage, arbitrage against fixed vendor prices, mean reversion, and event-driven trades) and sizes each against the user's bankroll with a Kelly rule [7]. It shows which orders to place, and a person places every one by hand. The system does not operate the game client.
2Data
The collector has a configured ten-second polling interval. The endpoint exposes the top 30 buy and sell summary entries, together with aggregate status fields [6]; the recorded payload is a partial view of the book. It appends each raw payload verbatim to an hourly zstd archive, which is the system of record, and writes a heartbeat for every poll so that downtime is recorded rather than inferred. Derived tables are a rebuildable cache. Full-resolution ticks roll up into one-minute bars that retain per-bucket counts of order changes, because naive open–high–low–close bars destroy the churn statistics the flipping model depends on. Every tick records its source and resolution. A two-hour bar from a third-party backfill or a six-hour outage would otherwise make a contested market look calm and inflate every persistence estimate. When coverage is too thin, the model declines to quote. Consecutive payloads are about 95% identical, and long-distance compression reduces storage by roughly an order of magnitude.
The evaluation uses two days recorded on different machines. A short window on 2026-08-24 was used to fit thresholds. The recorded replay set for 2026-09-01 contains 4,240 snapshots and 3.99 million product-book observations. The stated 24-hour span implies about 20.4 seconds per stored snapshot, so the configured ten-second poll interval should be distinguished from stored or API-update cadence. Timestamp and heartbeat reconciliation is required before asserting gap-free coverage.
3Four measurements
3.1Capture estimates from visible competition
The original model assumed a new top-of-book quote captures 35% of the flow at that price in every product. Each level in a Bazaar book reports its price, size and number of orders, so we can count the competitors standing within 50 basis points of the best price on each side. Against 943 live books, the constant overstates ask-side capture for 93% of products. Median ladder-based capture estimate is 0.10, and it differs by side: one snapshot of a heavily traded item had nine competing sellers within 0.013% of the best ask and three buyers on the bid. Per-product, per-side competition estimates replace the global constant wherever a summary is stored. They are fill-model inputs; realized capture also depends on queue position, cancellations and competing quotes.
3.2Size is limited by the exit
Inventory risk was modelled as capital times one-hour volatility of the mid. That treats a discrete liquidity void as a diffusion. In the same snapshot, 62% of visible bid support was a single order. The engine now walks the book for the largest quantity it could unwind within a fixed slippage budget and caps the position there. It prices the residual risk as the worse of a volatility move and the proceeds of half the position once the largest order is withdrawn. A third fix follows: throughput was bounded by flow but not by size. Turning over 10,000 units an hour through a 19-unit position requires re-placing orders every seven seconds, so throughput is now also bounded by a realistic requote rate.
Together, these changes cut the total claimed hourly edge of flip signals by a factor of 5.3 on recorded data. The size limit accounts for about 21% of the reduction and the competition estimate for the remainder. These changes alter the valuation and sizing of the same candidate trades.
3.3Directional price constraints from the craft graph
A mean-reversion signal that buys dips against an item's own trailing mean is circular: an item that has fallen steadily for two days looks cheap against a mean its own decline produced. The game's 2,618 crafting recipes provide an anchor that does not move with the price. Under frictionless, accessible conversion, a recipe supplies an upper-price relationship between its output and ingredient bundle. Executable arbitrage additionally depends on ingredient ask prices, output bids, fees, depth and crafting restrictions. Conversion is generally directional; recipe reversibility must be checked individually.
A directional price model avoids imposing equality between an output and its ingredient cost. We solve jointly for x_i=v_i/m_i, the ratio of a latent reference value to the observed mid. Each recipe contributes a squared positive-part penalty:
where o(r) is the recipe's output, q_{ri} the quantity of ingredient i, n_r the output count, and a_{ri} the ingredient's share of the output's notional. The objective is convex and piecewise quadratic, and can be expressed as a quadratic program using slack variables. Finite penalties produce soft constraints; the fitted values are model-based reference prices rather than certified no-arbitrage ceilings. We set the price-noise proxy to the half-spread and use its inverse variance as w_i. This is a modeling choice requiring sensitivity analysis. The trade-off \lambda is chosen by cross-validation. The hinge is inactive when a recipe’s output reference price is below the ingredient reference cost. Of 289 fully priced recipe rows, 160 have active penalties and 129 are inactive. Of 1,733 products, 481 appear in a fully priced recipe and 167 (10%) are touched by a binding constraint. Propagating ceilings through the graph rather than pricing ingredients at market tightens the bound for about 70 items, by 2.5% at the median. Coverage is the binding limitation and it is structural: most recipes involve items that are not traded on the Bazaar, and one unpriced ingredient leaves a recipe unconstrained. The fitted reference is used to veto reversion entries that remain expensive relative to the modeled crafting relationship.
3.4Demand estimation and residual inventory
Every gate above concerns supply, players selling instantly into our bid. The complaint from trading the signals by hand was a margin of thousands of percent with nobody buying. The replay agrees once leftover inventory is valued at the bids actually standing at the horizon rather than at the top bid: 55–95% of units bought were still held at the horizon in every spread bucket. Products with fewer than three instant buys an hour lost 2.7% per cycle at any margin. The flow estimate could not see this, because a weekly counter that has not moved reads as the weekly average. The engine now counts intervals in which the instant-buy counter actually rose, and caps each position at our share of that flow over the maximum cycle time.
4Replay
A backtester replays the engine's own signals against recorded books and scores the quotes it would have advised, in coins, using fill volumes inferred from the API activity fields. Inventory still held at the horizon is sold into the bids standing there. Table 1 shows the capture gate fitted on the first day and replayed with its threshold frozen on the second, for spreads under 50%, quotes one tick inside the best, first fill only.
| Rule | Quotes | Return/cycle | Net | Net after 1% trim | Products positive |
|---|---|---|---|---|---|
| Ungated | 273,735 | +0.55% | +1,820 | −534 | 426/639 |
| Ladder ≤ 5 | 38,450 | +1.90% | +417 | +111 | 335/495 |
| Ladder ≤ 5, spread ≥ 10% | 32,266 | +3.63% | +461 | +189 | 290/406 |
The ungated strategy is positive only because of its top 1% of quotes. The gated rule is positive in both halves of the product set, both halves of the day and 23 of 24 hours. Return by ladder depth falls from about +2.5% with six or fewer standing orders to +0.2% with twenty or more, which is the mechanism the gate was built on. Spreads under 10% lost money under every gating in every sub-bucket on both days, so they are no longer quoted.
Adding the demand gate and flow-based sizing on the same day and scoring changes the picture again (Table 2). Return per cycle triples, net profit is slightly higher, and the capital cycled falls to a third. The result associates lower inventory exposure with higher simulated capital efficiency. A margin of 1,694% with 339 buyers an hour is now sized at 294 units instead of 1,136. A 91% margin with one instant buy every two hours is no longer quoted.
| Engine | Return/cycle | Net | Capital cycled | Units held at horizon |
|---|---|---|---|---|
| Before | +4.13% | +3,361 | 81,500 | 57.5% |
| Demand gate + sizing | +13.21% | +3,603 | 27,300 | 39.8% |
Product halves give +14.0% and +12.3%, time halves +13.6% and +12.9%, and 318 of 349 products are positive.
5Where to quote
A resting bid faces competing fill and displacement events. We compare six quote depths in more than two million quote–depth records. The recorded exponential fit reports h(\delta)=h_0 e^{-k\delta} with k=5.9 per unit of spread. At \delta=0.05, this formula implies a hazard ratio e^{-0.295}\approx0.745 relative to zero depth. The previously reported sevenfold reduction is inconsistent with those units and is excluded pending reconciliation with the event-level output. The replay comparison in Table 3 independently favors the tested 5% quote under both fill models. The connection to inventory-aware quoting [8, 9] is qualitative; outbid hazards and market-order arrival intensities are distinct quantities.
| Depth | Order keeps filling | First fill only |
|---|---|---|
| One tick inside | +9.78% (+2,092) | +7.46% (+472) |
| 5% of spread | +13.21% (+3,603) | +8.13% (+575) |
6Discussion and limitations
The experiment links competition estimates, visible exit depth, recipe constraints and demand estimates to retrospective inventory outcomes. The policy comparison suggests that execution-aware constraints are useful candidates for prospective testing.
The replay omits market impact [10] and uses inferred fills from truncated snapshots and rolling activity fields. Those fields cannot identify individual executions or queue position. The results are conditional simulated opportunities, with uncertain executable capacity. Extreme spreads and residual inventory are especially sensitive to liquidation assumptions. The capture gate has a separate-day evaluation; demand gating and quote-depth selection were examined on that same evaluation day and require a fresh chronological holdout. Uncertainty should be estimated across independent days and products with appropriate dependence blocks. This is particularly important given backtest selection effects [11].
7Conclusion
Visible-book competition, exit liquidity and demand estimates substantially change the sizing and replay performance of a virtual-market strategy. The reported demand-gate comparison improves simulated capital efficiency on one recorded day. Establishing a general result requires longer frozen-policy holdouts, reconciled observation cadence and prospective manual-fill validation.
Data and code availability
The collector, signal engine, backtesters and archive tooling are in the private project repository. The raw archive can be rebuilt into the analysis database with a single script, and each result table is reproduced by the backtester docstrings.
References
- E. Castronova. Virtual worlds: A first-hand account of market and society on the Cyberian frontier. CESifo Working Paper Series, No. 618, 2001.
- M. D. Gould, M. A. Porter, S. Williams, M. McDonald, D. J. Fenn, and S. D. Howison. Limit order books. Quantitative Finance, 13(11):1709–1742, 2013.
- L. Harris. Trading and Exchanges: Market Microstructure for Practitioners. Oxford University Press, 2003.
- L. R. Glosten and P. R. Milgrom. Bid, ask and transaction prices in a specialist market with heterogeneously informed traders. Journal of Financial Economics, 14(1):71–100, 1985.
- R. Cont, S. Stoikov, and R. Talreja. A stochastic model for order book dynamics. Operations Research, 58(3):549–563, 2010.
- Hypixel. Public API v2: Bazaar endpoint. Official API documentation, accessed November 2026.
- J. L. Kelly Jr. A new interpretation of information rate. Bell System Technical Journal, 35(4):917–926, 1956.
- M. Avellaneda and S. Stoikov. High-frequency trading in a limit order book. Quantitative Finance, 8(3):217–224, 2008.
- Á. Cartea, S. Jaimungal, and J. Penalva. Algorithmic and High-Frequency Trading. Cambridge University Press, 2015.
- R. Cont, A. Kukanov, and S. Stoikov. The price impact of order book events. Journal of Financial Econometrics, 12(1):47–88, 2014.
- D. H. Bailey, J. M. Borwein, M. López de Prado, and Q. J. Zhu. Pseudo-mathematics and financial charlatanism: The effects of backtest overfitting on out-of-sample performance. Notices of the American Mathematical Society, 61(5):458–471, 2014.