Model parameters (shared by live, backtest and sweep)
Live paper quoting
The engine quotes a five-level ladder off the live Binance book every second, fills against a share of real Binance taker flow, gets picked off when its quote goes stale, and hedges net delta on a perp. Nothing is sent onchain. The right panel reads the PancakeSwap v3 pools on BNB Chain.
A gap wider than the pool fee plus the arb threshold is an open arbitrage on that pool. A prop AMM that tracks the Binance mid never shows this gap.
Backtest against a passive v3 pool
Replays Binance 1-second bars through the engine and through a concentrated v3-style position with the same capital, router and arbitrageurs. PnL is marked to the Binance price. The passive pool is scored against holding its starting mix.
Spread and skew sweep
Twenty runs over the bars loaded in the backtest tab: base half-spread against inventory skew. The trade the desk tunes is volume against PnL per dollar and peak exposure.
Who wins the aggregator route on BNB Chain
Live KyberSwap routes for the pair at four sizes. Each route is split by venue type, priced against the Binance mid, and compared with what the engine's ladder would quote for the same size.
PancakeSwap's PropAMM, read from the chain
Quote-update cadence, update cost and swap flow for the PropAMM contracts on BNB Chain over the last 2,000 blocks. Contract addresses come from KyberSwap's public integration, which renamed the source to LiquidFi on 2026-11-11.
Method
What the engine does each second, what it assumes, and where the assumptions are weakest.
Pricing
- Fair value: Binance spot (1-second close in backtests, live mid in paper mode).
- Volatility: EWMA of squared 1-second log returns, half-life set in parameters.
- Half-spread:
max(min, base + volMult × σ × √refresh). Wider when the quote will be stale for longer. - Skew: the centre moves by
skew × half-spread × exposure / limit, so a long pool cheapens its ask and sells down. - Depth: five levels,
stepbps apart, level k+1 sizedratiotimes level k. A ratio above 1 keeps thin size at the touch where stale quotes get picked off. - Size taper: the side that adds exposure shrinks toward zero at the limit. Asks never exceed pool base, bids never exceed pool USD.
Flow and fills
- Arbitrage first: any level priced through the new fair value by more than
arbBpsis taken in full. - Routed flow:
shareof Binance taker buys and sells reaches the aggregators. The router sends a logistic fraction to the pool by its best price againstcompBps, then the flow walks the ladder. - Hedge: when net delta passes the threshold, the full delta is hedged on a perp at fair plus
hedgeCostBps. The pool starts delta neutral. - Refresh: the ladder updates every
refreshSec, each update costsgasUsd. - PnL = spread captured at fill - hedge cost - gas + inventory and adverse moves.
Passive benchmark
- A concentrated constant-product position (v3 maths on √P) over ±
lpRangePct, feelpFeeBps, same capital. - Arbitrage pushes its price back inside fair ± (fee + arbBps). Routed flow uses the same router.
- Scored as PnL against holding the starting mix: fees minus the loss to arbitrage.
Known limits
- One-second bars. BNB Chain blocks are faster, so refresh latency below one second is not modelled.
- Routed flow is a fixed share of Binance taker flow with no size or toxicity mix of its own.
- No funding, no rebalancing cost for pool inventory, no MEV beyond the arb threshold.
- Hedges fill at fair plus a cost. Real perps have their own basis and depth.
Code
The engine is js/model.js in the browser and quant/propamm.py as the Python reference. A parity test runs both on the same hour of bars across four parameter sets and checks 192 summary numbers match. The Python CLI: python3 quant/backtest.py --symbol BNBUSDT --hours 2 --sweep.
Data: Binance public market data (data-api.binance.vision), BNB Chain public RPC for PancakeSwap v3 slot0 and liquidity, KyberSwap aggregator API for routes. All keyless and called from your browser.