product image

HyperBFT Backtest Ordering Engine — Python/Polars

$19

Your CEX-style backtest is lying to you. Real HyperBFT consensus priority.

Python/Polars engine that replicates Hyperliquid’s real within-block consensus ordering — not the price-time priority you’d assume from a centralized exchange.

If you backtest a Hyperliquid strategy with standard CEX-style ordering, you systematically overestimate how well aggressive orders (GTC/IOC) perform. In reality: non-aggressive actions first, cancellations second, aggressive orders last — regardless of arrival order.

What you get:

  • order_by_hyperbft_priority() and a vectorized Polars version for large datasets
  • Verified against Hyperliquid’s official technical blog, corrects a common 2-category misunderstanding (real rule has 3 categories)
  • Built-in comparison function against naive CEX-style ordering, so you can measure exactly how much bias your current backtest has
  • 3/3 tests, including a side-by-side comparison showing the two orderings diverge

Scope: solves cross-category ordering — the part that breaks naive backtests. Same-category sub-ordering depends on the block proposer and isn’t verified deterministic. No matching, fills, or slippage simulation — priority ordering only.

Python + Polars. Delivered as ZIP.