Path independent market making on CEX CLOB: model and validation

Path-independent CEX market making on Bitfinex: a non-custodial Constant-Depth Curve for [TOKEN]/USD — one derived parameter, validated on an 11-month, 25,297-trade tape.

By Pablo Baiocchi and Chasco · path-independence · cex-market-making · bitfinex · order-book · bonding-curve · non-custodial · constant-depth-curve · market-making

Path independence means a market maker's inventory and portfolio value are a function of the current price alone — never of the path taken to reach it. Two books that arrive at the same price hold identical positions, whatever happened in between. It is a strong guarantee, it is rare on a central limit order book, and it is expensive.

This is a case study in paying that price deliberately. A client required path independence as a hard constraint for non-custodial market making on a thin [TOKEN]/USD book on Bitfinex. What follows is the curve we derived to satisfy that constraint at the lowest capital cost we could construct, how it maps onto a real order book with discrete levels and finite refill latency, and what an 11-month replay against the venue's own tape — 25,297 trades, 2025-04-06 to 2026-03-03 — says about what the guarantee actually costs to hold.

The client and the token are anonymized. Every parameter, capital figure, and result is the real one.

On capital efficiency — read this first. Path independence was a hard requirement from the client, not a design preference of ours, and it is an expensive one. A path-independent book must pre-fund its entire price range with resting orders, which forfeits the ability to reallocate capital as inventory and volatility change. The literature is unambiguous on the consequence: inventory-dependent quoting (Avellaneda & Stoikov 2008; Guéant, Lehalle & Fernández-Tapia 2013; Cartea, Jaimungal & Ricci 2014) is strictly more capital-efficient than any path-independent strategy — which is precisely why order-book market makers do not run path-independent models. This model is therefore materially less capital-efficient than a modern inventory-skewed one, by construction. Given the requirement, our problem was narrower: find the most capital-efficient structure that still satisfies it. The Constant-Depth Curve below is that structure — it eliminates the over-provisioning inherent in a constant-product book, cutting the capital needed for the same compliance depth by roughly 3x.

The binding constraint. Bitfinex requires $25,000 of resting depth within 2% of mid on each side — $50,000 across the book. That obligation is what fixes the curve's depth constant CC, and it must hold at every price level, regardless of how much capital is deployed.

Model — Constant-Depth Curve (CDC)

Up next is the mathematical formulation for the CD Curve. In essence, it is a function that maps the amounts to bid and ask at different price levels given a set of parameters, making it solely dependent on price, and ergo path-independent by nature. Similarly to the constant product invariant of the Uniswap protocol, this function has an invariant CC that represents liquidity density, which makes both a CFMM function too. However, it is in the choice of this invariant that the dynamics differ from one another: this CDC curve, unlike Uniswap, forces its liquidity depth to be constant instead of the constant product amounts, resulting in a flat liquidity pool that extends P[Pa,Pb]P \in [P_a, P_b].

Notation.

State variables

  • PP — current market price (USD per [TOKEN]).
  • y(P)y(P) — LP's USD reserves at price PP.
  • x(P)x(P) — LP's [TOKEN] token reserves at price PP.
  • V(P)=x(P)P+y(P)V(P) = x(P) \cdot P + y(P) — total LP portfolio value in USD at price PP.

Curve parameters

  • PaP_a — lower price bound. At PaP_a the LP holds only tokens (all USD spent).
  • PbP_b — upper price bound. At PbP_b the LP holds only USD (all tokens sold).
  • CC — depth scalar setting the curve's liquidity density.

Specifications

  • DD — compliance depth requirement (USD of resting depth on each side) — 25K.
  • ff — compliance band width (fractional distance from mid) — 2%.

Reference / derived

  • P0P_0 — deployment reference price.
  • Vstart=V(P0)V_{\mathrm{start}} = V(P_0) — initial notional.
  • PTP_T — price at a later time TT; r=PT/P0r = P_T / P_0 is the price return.

A bonding curve whose USD reserves grow linearly in log-price:

y(P)=Cln(PPa)y(P) = C \ln\left(\frac{P}{P_a}\right) x(P)=C(1P1Pb)x(P) = C \left(\frac{1}{P} - \frac{1}{P_b}\right) V(P)=x(P)P+y(P)V(P) = x(P) \cdot P + y(P)

with a single scalar CC. Compliance — providing at least DD USD of depth within ±f\pm f of mid — requires

CDln(1+f)C \geq \frac{D}{\ln(1 + f)}

For D=25,000D = 25{,}000 and f=0.02f = 0.02, the minimum is

C1,262,459C \geq 1{,}262{,}459

We deploy at this floor.

The invariant preserved along any trade sequence:

(x+CPb)ey/C=CPa\left(x + \frac{C}{P_b}\right) \cdot e^{y/C} = \frac{C}{P_a}

By construction, USD depth within ±f\pm f of any mid PP equals DD, uniformly across the operating range [Pa,Pb][P_a, P_b].

Path-independence

At any price P[Pa,Pb]P \in [P_a, P_b], the LP's reserves (x(P),y(P))(x(P), y(P)) are fully determined by PP. Two LPs arriving at the same PP via any sequence of market events hold identical inventory. Formally, the state map

Φ:P(x(P),y(P))\Phi : P \mapsto (x(P), y(P))

factors through PP alone; no history component.

The LP is therefore a deterministic function of the venue's price. The book at any moment is the analytically specified CDC curve at the venue's current mid.

The full derivation is published separately: Constant Depth Curve — mathematical proof.

Deployment — $300K client commitment with top-up on blow-through

The client commits $300K (50% USD + 50% [TOKEN]). At this size the band is necessarily narrower than the observed 11-month price range, so boundary blow-throughs are expected and the operational model is commit-and-top-up: on an upside blow-through we inject another $300K in [TOKEN] (extends PbP_b); on a downside blow-through we inject another $300K in USD (extends PaP_a).

Modeling stance. Bitfinex's mid is exogenous — set by the aggregate book, not by DAMM alone. Our $300K is a small slice of the total [TOKEN]/USD liquidity; the venue's mid is dominated by everyone else, and our grid levels are filled whenever the aggregate price crosses them.

Parameter Value Derivation
CC 1,262,459 D/ln(1.02)D / \ln(1.02) — compliance floor
Initial USD on book $150,000 50% of $300K commit
Initial [TOKEN] on book 13,018,432 ($150,000) 50% of $300K commit at P0=$0.01152P_0 = \$0.01152
PaP_a (initial) 0.01023 P0e150,000/CP_0 \cdot e^{-150{,}000/C} (−11.2% from P0P_0)
PbP_b (initial) 0.01308 1/(1/P0(150,000/P0)/C)1/(1/P_0 - (150{,}000/P_0)/C) (+13.5% from P0P_0)
Top-up tranche $300,000 full [TOKEN] on upside / full USD on downside
Initial notional $300,000 client's posted capital

Compliance — $25,000 depth on each side within 2% of mid, $50,000 across the book — is unaffected by capital size: CC is fixed, and the ladder density at any PP in the band is identical regardless of how wide the band is. Injections widen the band but do not change the depth per unit of log-distance from mid.

Bitfinex execution — discrete ladder, spread, and refill latency

The CDC is deployed as a discrete ladder of limit orders on Bitfinex's CLOB.

Grid. Log-uniform price levels

Pk=P0ekδ,kZP_k = P_0 \cdot e^{k\delta}, \qquad k \in \mathbb{Z}

with half-spread spacing δ\delta. The topmost bid sits at P1=P0eδP_{-1} = P_0 e^{-\delta} and the topmost ask at P+1=P0e+δP_{+1} = P_0 e^{+\delta}, so the bid-ask spread is

s=2δs = 2\delta

For target s=30s = 30 bps: δ=0.0015\delta = 0.0015 (15 bps per side). Each level carries nominal CδC \cdot \delta USD (ask side: Cδ/PkC\delta / P_k tokens; bid side: CδC\delta USD). Total level count over [Pa,Pb][P_a, P_b]: 1,679.

The discrete ladder across the band — uniform USD per level, log-spaced. Bids below the reference price, asks above.

Refill latency. A fill empties its level; the LP reposts after round-trip latency τ30\tau \approx 30 ms (WebSocket from a European VPS). During τ\tau the level is stale. A stale-grid event fires iff a trade arrives within τ\tau of the previous fill and in the opposite direction — same-direction flow walks outward into fresh levels.

Simulator. Drive the ladder with the tape's price series {Pi}\{P_i\}. On each tick, snap the target grid index to k=round(ln(Pi/P0)/δ)k^\ast = \mathrm{round}(\ln(P_i/P_0)/\delta). If kk^\ast is above the current mid level, walk asks upward, filling each non-reposting level at its posted price and marking it reposting for τ=30\tau = 30 ms; if below, walk bids downward analogously. Blow-through fires when the walk needs to cross PaP_a or PbP_b — inject $300K on the offending side, extend the band via the same closed-form CDC sizing equations, and resume. The LP state (tokens, cash) is maintained exactly; spread revenue accumulates per fill, and stale-grid hits are counted whenever a crossing intersects a still-reposting level.

Tape (2025-04-06 → 2026-03-03, 25,297 trades):

Metric Value
Tape price range (exogenous) [0.01000,0.03820][0.01000, 0.03820] (3.8×)
PminP_{\min} vs initial Pa=0.01023P_a = 0.01023 below — triggers 1 USD inject
PmaxP_{\max} vs inject-extended PbP_b sequence covered after the 4th [TOKEN] inject (Pb=0.03877P_b = 0.03877)
Consecutive trade pairs within τ=30\tau = 30 ms 10,352 (40.9%)

Results at C=1,262,459C = 1{,}262{,}459, initial Pa=0.01023P_a = 0.01023, initial Pb=0.01308P_b = 0.01308, s=30s = 30 bps, τ=30\tau = 30 ms:

Quantity Value
Total blow-throughs 5
[TOKEN] injects (upside, $300K each) 4
USD injects (downside, $300K each) 1
Total capital deployed $1,800,000 (6 tranches × $300K)
Final PaP_a / PbP_b after injects 0.00807 / 0.03874
Final VLPV_{\mathrm{LP}} $1,224,696
Fills (ask / bid) 26,320 / 26,591
Stale-grid hits 4,667 (8.82% of fills)

Path-independence: scope of validity. Given the coupled Bitfinex and CDC dynamics, path-independence is preserved as long as:

  • Price does not fall from the [Pa,Pb][P_a, P_b] range.
  • Consumed orders are duly refilled before another order arrives — i.e. price can move in one direction up to the range limit, but it should not bounce back before the bid/ask is refilled.
  • Grid granularity is infinitesimal.
  • Spread s=2δs = 2\delta is null.

Each violation of any of these conditions introduces path-dependent deviations proportional to the volume impacted by cumulation of each event. This is quantified over the 11-month backtest for a reference number.

Capital endurance — lifetime of one $300K tranche before the next top-up

This corresponds to the cases where the price would arrive at an edge of our position and hence the client should provide more capital, either USD or [TOKEN], to maintain/regain path-independence.

Metric Value
Mean lifetime 55.1 days
Median lifetime 28.5 days
Min lifetime 4.0 days (initial tranche → downside USD inject on 2025-04-10)
Max lifetime 211.1 days (final tranche after inject #5, no further blow-through on the tape)
Time to first inject 4.0 days (USD, downside)
Calendar-time average 55.1 days / tranche

Capital endurance — check-writing history (top) and Gantt-style tranche lifespans (bottom). The step line is cumulative capital deployed; the continuous line is live LP value.

11-month price trajectory with the active band. The lower bound drops once on the day-4 USD inject; the upper bound steps up on four [TOKEN] injects as the tape climbs from \$0.013 to ~\$0.038. The long flat tail after inject #5 shows zero further blow-throughs in the final 7 months.

Interpretation.

  • Two-sided stress on day 4. The tape's absolute minimum of $0.01000 dips below the initial Pa=0.01023P_a = 0.01023 only four days in, immediately forcing a USD inject and consuming the $150K USD cushion. The client must be ready to post full-USD tranches on short notice, not only [TOKEN].
  • Four [TOKEN] injects on a monthly cadence. Injects #2–#5 fire at 2025-05-09, 2025-06-11, 2025-07-09, 2025-08-04 — ~30 days apart each — as the tape climbs from $0.013 to $0.038.
  • Seven-month quiet tail. After inject #5 on 2025-08-04 the extended Pb=0.03874P_b = 0.03874 covers the tape's maximum and no further boundary contacts occur for the remaining 211 days. This dominates the mean tranche lifetime of 55 days.
  • Spread revenue is material. The ladder records ~53,000 fills across the tape's natural oscillations — 26,320 ask fills and 26,591 bid fills, each capturing the 30 bps spread on round trips. This is the primary revenue stream in the price-driven regime.
  • Stale-grid hits are non-trivial (4,667 ≈ 8.8% of fills). These are real costs — taker flow that passed a still-reposting level and took its 15 bps of spread elsewhere. Sub-10 ms refill latency would close most of this gap.
  • Path-independence of the curve is preserved between injects. Within each band the state map Φ:P(x(P),y(P))\Phi : P \mapsto (x(P), y(P)) factors through PP alone. Each inject introduces a small, bounded cash adjustment at the new PaP_a or PbP_b (grid-quantization premium); the curve itself remains closed-form.

It is worth mentioning that Bitfinex allows insolvency for 5% of a year, roughly 18 days. This gives the maker the chance to wait for some days for markets to cool down before risking more capital.

Contingency plan. DAMM's monitoring notifies both parties as price approaches an edge, and the response is pre-agreed rather than improvised. There are exactly two: the maker lets price run and absorbs insolvency for a few days until the market cools, or the client unlocks capital to extend the [Pa,Pb][P_a, P_b] range. The choice is situational — the 5% insolvency allowance is a card to be played against uncertainty, not a default.

Conclusion

Every parameter in this deployment is derived, not chosen:

  • One free parameter. C=D/ln(1+f)=1,262,459C = D / \ln(1 + f) = 1{,}262{,}459. Fixed by the contract.
  • Initial band derived from client capital. PaP_a and PbP_b follow directly from the $300K 50/50 commit via the closed-form CDC sizing equations; no calibration.
  • Top-up policy is mechanical. On boundary contact, inject $300K on the offending side and recompute PaP_a or PbP_b from the same sizing equations. Zero discretion.

Across the 11-month tape the MM fired four $300K [TOKEN] injects (upside) and one $300K USD inject (downside), deploying $1.8M cumulative capital across six tranches with a mean 55-day tranche lifetime. The final tranche survives untouched for 211 days after inject #5. Path-independence of the curve is preserved between injects; each inject introduces a bounded and accountable cash adjustment at the new PaP_a or PbP_b.

Spread revenue is the primary earnings stream: ~53,000 fills across the tape's natural up-down oscillations, 30 bps captured per round trip. Stale-grid hits (4,667, ≈8.8% of fills) are real costs from taker flow passing still-reposting levels; sub-10 ms refill latency would close most of this gap. Every captured basis point of spread flows to the LP with no maker-fee leakage.

Boundary contact resolves to one of two pre-agreed responses, and the tape forced that decision six times. Extending the [Pa,Pb][P_a, P_b] range with fresh capital on the scarce side is the only way to preserve path-independence. The alternative is to spend some of the 18 days a year of insolvency the venue allows, waiting for the market to cool — cheaper in capital, but path-independence is lost for that window. There is no third option.

The cost of the requirement. It bears restating in closing: this deployment ends at $1.8M of cumulative committed capital to service a $50,000 two-sided depth obligation. That ratio is the price of path-independence itself, not an artifact of this implementation — the CDC is already the most capital-efficient path-independent structure we were able to derive, roughly 3x better than a constant-product book over the same range, and the top-up policy funds new range only when the tape actually demands it. An inventory-skewed market maker meets the identical compliance obligation with a small fraction of that capital, because it reallocates against inventory and volatility rather than pre-funding every price level in advance. The trade being made here is explicit: deterministic, auditable, path-independent portfolio state, bought with a large multiple of capital. Where path-independence is not a hard requirement, this is not the structure we would recommend.

Explore our fundsDAMMstable →DAMMeth →