GLFT Optimal Market Maker
What It Does
GLFT quotes both sides of the order book around fair value, earning the spread while keeping inventory in check. Where the Perp Market Maker uses hand-tuned rules, GLFT computes its bid and ask placement from the Gueant–Lehalle–Fernandez–Tapia model — a closed-form solution from academic market-making research. Quotes automatically widen when volatility rises and skew to shed inventory when a position builds up, with far fewer knobs to turn. In plain terms: the bot continuously asks “given how jumpy this market is, how often orders are arriving, and how much inventory I’m already holding, what is the mathematically best price to bid and ask right now?” — and re-answers that question twice per second.How It Works
The GLFT engine
The engine derives optimal bid/ask offsets from mid-price using three live inputs:- Gamma (risk aversion, default 0.01) — how strongly the engine penalizes holding inventory. Higher gamma → wider spreads, smaller positions.
- Sigma (realized volatility) — measured from recent prices. More volatility → wider optimal spreads.
- Kappa (order arrival rate) — estimated from order-book liquidity and refined by the Cartea–Jaimungal trade-intensity estimator. Busier books → tighter spreads, because fills come faster.
Inventory skew
The model’s key property: quotes become asymmetric as inventory builds.Key Features
- Regime detection — ADX-based classification (ranging / trending / volatile) scales gamma: tighter quoting in ranges (0.7x), defensive against-trend quoting (1.5x), wider in volatile regimes (1.3x)
- Grid breathing — spacing widens with drawdown (base 150 bps) and each side (long/short) breathes independently on its own P&L, with smoothing so transitions don’t whipsaw
- Mantis spread — composite microstructure signal (book imbalance + aggressor trade flow + Cartea–Jaimungal arrival estimate) that shades the quotes
- Squeeze detection — monitors funding extremes and open-interest shifts for squeeze conditions
- Inventory TP — take-profit targets tighten exponentially as inventory grows: small positions wait for full profit, large ones exit faster
- Time decay — TP targets decay on positions older than 15 minutes; maximum-hold times depend on regime (320 min ranging / 240 volatile / 120 trending)
- Dynamic sizing — quote size scales between a base and max (15 conservative, 50 BloFin aggressive) with conditions
- S/R snapping — quotes snap up to 5 bps to nearby order-book walls (≥ $500) so they rest behind real liquidity
- Multi-symbol — one bot instance runs up to 5 symbols (multi presets ship with BTC, ETH, SOL, SUI, XRP), each with independent state and recovery
Supported Exchanges
BloFin
- Requires API key, secret, and passphrase
- Configured fees: maker 2 bps, taker 6 bps
- WebSocket orders and data streams
Bybit
- Requires API key and secret only
- Auto fee detection — fees read from your account, no manual config
- WebSocket order management
Available Presets
GLFT ships with 8 presets — conservative and aggressive, single- and multi-symbol, on both exchanges. In the Marketplace they appear as 4 cards with a Bybit/BloFin toggle. All values below are read from the actual preset configs.- BloFin
- Bybit
| Preset | Min Profit | Quote Size | Max Position | Drawdown Stop | Leverage |
|---|---|---|---|---|---|
| Conservative | 16 bps | 15) | $500 | $100 | 20x |
| Aggressive | 12 bps | 50) | $2,000 | $500 | 20x |
| Multi Conservative | 16 bps | 15) | $500/symbol | $100 | 20x |
| Multi Aggressive | 12 bps | 20) | $1,000/symbol | $500 | 20x |
Key Parameters
| Parameter | Description | Conservative | Aggressive |
|---|---|---|---|
min_profit_bps | Minimum profit target per round trip | 14–16 | 12–14 |
quote_size_usdt | Base quote size per order | $10 | 25 |
max_position_usdt | Maximum position per symbol | $500 | 2,000 |
leverage | Leverage multiplier | 20x | 20x |
glft_gamma | Risk aversion (higher = wider, smaller) | 0.01 | 0.01 |
grid.levels | Quote levels per side | 2 | 2 |
risk_management.max_drawdown_usdt | Hard stop per symbol | 200 | 500 |
loop_interval_seconds | Quote refresh interval | 0.5s | 0.5s |
Grid configuration
Quote levels per side. Level 1 sits at the GLFT-optimal price, Level 2 a further offset out.
Offset per level from the GLFT-optimal price: Level 1 at the optimum, Level 2 20 bps wider.
Size split per level: 60% at Level 1, 40% at Level 2.
Scale grid behavior by detected regime (ranging / trending / volatile).
Inventory-based quote skewing — quotes less on the side that would grow inventory, blocks adds entirely past 75% of the position cap.
Long and short sides widen independently based on their own drawdown and age.
Recovery Grid
When a position goes underwater, normal quoting on the losing side is suppressed and a recovery system takes over.Detection
Underwater position detected; grid adds on the losing side stop (
suppress_grid_adds: true).Order-book analysis
orderbook_dca mode scans for the strongest support (longs) or resistance (shorts) walls within a recovery range computed from the last 8 hours of 15-minute price action.Placement
Up to 2 recovery orders are placed at those walls — at least 1% from the last fill, at least 1% apart, and at least 3% from the current price.
The recovery grid is not a loss guarantee. In a strong trend it adds to a losing position; the
max_drawdown_usdt hard stop is the final safety net.Risk Warning
GLFT vs Perp Market Maker
| Aspect | GLFT | Perp MM (XGrid family) |
|---|---|---|
| Quoting method | Closed-form academic equations | Heuristic rules |
| Parameters | ~20 key settings | 100+ |
| Spread derivation | Automatic from volatility/flow | Manual base_spread_bps + modifiers |
| Inventory management | Built-in penalty function | Configurable skew factor |
| Recovery system | Order-book DCA with scaled sizing | XGrid counter-scalp + loss tiers |
| Leverage (presets) | 20x | 75x |
| Best for | Fewer knobs, model-driven quoting | Full customization |
Next Steps
Vaults
Deploy GLFT through managed vaults
Preset Guide
All presets across strategies and exchanges
Perp Market Maker
The heuristic-rules alternative
Bot Management
Deploy, monitor, and manage bots