Avellaneda-Stoikov, retail-accessible.
Inventory-aware, volatility-scaled, lead-lag-defended market making that post-only quotes into maker fees. Up to 10 concurrent sessions per machine.
Mid
67,203.10
Spread
0.186%
Inventory
+0.015 BTC
P&L (24h)
+$0.42
Live Orders
γ 0.10 · κ 1.5
Event stream
→ Placed BUY 0.015 @ 67,140.50 · SELL 0.015 @ 67,265.80
Live session mockup. Real UI streams via SSE — sub-100ms from fill to screen.
The model
The spread is earned, not assumed.
We start from Avellaneda & Stoikov (2008), then clamp for fees and scale by live volatility.
Reservation price
Skews the mid by your inventory
// How far to shift quotes given current inventory
reservationPrice = midPrice
- (inventory × gamma × variance × timeRemaining) × midPriceSpread
Optimal half-width with a fee floor
// Raw model spread
rawSpread = sqrt(2 × gamma × variance × timeRemaining)
+ (gamma / k) × 0.01
// Clamp by fees + margin
feeFloor = max(makerFee × 2 × 1.2, 0.0001)
effectiveSpread = max(min(rawSpread, 0.01), feeFloor)Under the hood
Four detectors. One decision loop.
Every quote goes through this stack. Any component can widen the spread or skip a tick if the market turns hostile.
LeadLagDetector
Monitors if a correlated venue (e.g. Binance) is leading price moves. If it drops 0.5% while your session exchange sits flat → danger signal → spread widens 3× to avoid adverse selection.
MomentumDetector
Scores momentum in [-1, +1]. Picks buy strategy from {limit, aggressive, skip} and suppresses sells into a falling tape — the cooldown kicks in for 60s after a momentum-triggered sell.
VolatilityTracker
EWMA variance of log returns updated each tick. Spread scales with √variance, so quiet pairs get tight quotes and volatile pairs stay safe.
AutoTuner
Adjusts γ, κ, and the lock factor based on live win rate and drawdown over a 30-minute window. Learns per-pair per-exchange.
Parameters
Tune it yourself. Or let the auto-tuner.
Every parameter below is exposed in the config panel per session.
| Parameter | Default / Range | Effect |
|---|---|---|
| gamma (γ) | 0.01 – 1.0 · 0.10 | Risk aversion. Higher = wider spreads, tighter inventory control. |
| kappa (κ) | 0.5 – 5.0 · 1.5 | Order arrival intensity. Lower κ widens the spread (illiquid regime). |
| timeRemaining (T) | 0.3 – 1.0 · 0.5 | Decay over a 4-hour half-life. Shrinks spread as session matures. |
| makerFeeRate | 0.00005 – 0.0005 · 0.00075 | Binance BNB-discount (0.075%). Drives the fee floor. |
| spread target | feeRate × 1.2 × 100 | Base quote width before volatility scaling kicks in. |
| fee floor | feeRate × 2 × 1.2 | Round-trip fees + 20% margin. Sells never price below this. |
| post-sell cooldown | 10,000 ms | Quick re-entry after the sell fills. |
| sell-stale timer | 45,000 ms | Max age before refreshing a resting sell. |
| loss-cut timeout | 120,000 ms | Hard cutoff — sells below entry if inventory lingers. |
Expected returns
No hype. Honest ranges.
Market making is not a get-rich-quick mechanism. Tight spreads, high fill counts, small margins — this is edge accumulation.
Typical fills / hour
10 – 30
Major pairs on Binance, κ=1.5
Profit per cycle
0.02% – 0.05%
After maker fees, before slippage
Compound hourly
0.2% – 1.5%
Pair- and volatility-dependent
Returns degrade sharply in trending regimes. Lead-lag + momentum detectors pause the strategy before realizing loss; the 2-minute loss-cut timeout is a hard stop if inventory lingers. Treat as a volatility harvester, not a directional bet.
Run MM v3 on your desk. No VPS. No API fuss.
The bundled Node sidecar runs inside the Tauri shell — no ports exposed, no cloud latency, no middleman.