PNK/USD market maker: model & path-independence validation

A non-custodial CEX market-making model built on a Constant-Depth Curve: path-independent by construction, one derived parameter, and an 11-month tape validation with 25,297 trades on Bitfinex.

By DAMM Capital · market-making · cex · bitfinex · kleros · pnk · cdc

The goal of this report is to explain in detail the model discussed between DAMM and Kleros during ETHCC for PNK decentralized market making on Bitfinex. We go through the different scenarios, the proposed approach, edge cases, and the reasoning behind why we arrived at this model.

The idea is to provide full transparency so the Kleros team can review and confirm they are comfortable with the model given their initial requirements.

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 PNK).
  • y(P)y(P) — LP's USD reserves at price PP.
  • x(P)x(P) — LP's PNK 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% PNK). 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 300KinPNK(extends300K in PNK (extendsP_b);onadownsideblowthroughweinjectanother); on a downside blow-through we inject another300K 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 PNK/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 PNK on book 13,018,432 ($150,000) 50% of 300Kcommitat300K commit atP_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 PNK on upside / full USD on downside
Initial notional $300,000 client's posted capital

Compliance — 25,000depthwithin±225,000 depth within ±2% — is unaffected by capital size:Cisfixed,andtheladderdensityatanyis fixed, and the ladder density at anyP$ 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 PNK 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
PNK 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 PNK, 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 PNK injects as the tape climbs from <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0.013</mn><mi>t</mi><mi>o</mi><mtext> </mtext></mrow><annotation encoding="application/x-tex">0.013 to ~</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.013</span><span class="mord mathnormal">t</span><span class="mord mathnormal">o</span><span class="mspace nobreak"> </span></span></span></span>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.01000dipsbelowtheinitial0.01000 dips below the initialP_a = 0.01023onlyfourdaysin,immediatelyforcingaUSDinjectandconsumingtheonly four days in, immediately forcing a USD inject and consuming the150K USD cushion. The client must be ready to post full-USD tranches on short notice, not only PNK.
  • Four PNK 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.013to0.013 to0.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. Through the monitoring services provided by DAMM Capital, both parties will be notified when price is close to an edge. An action plan must be decided for such events: either the maker can let the price fall and face insolvency for some days until the market cools down, or the client can unlock capital to extend the [Pa,Pb][P_a, P_b] range. The plan is strictly situational — the 5% insolvency margin from Bitfinex is a card to be used when facing uncertainty.

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 300Kontheoffendingsideandrecompute300K on the offending side and recomputeP_aororP_b$ from the same sizing equations. Zero discretion.

Across the 11-month tape the MM fired four $300K PNK 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.

For each insolvent situation, DAMM Capital and the client must have pre-agreed action scenarios for fast reactions. If price continues deviating, extending the [Pa,Pb][P_a, P_b] range for the scarce token is the sole alternative to preserve path-independence. However, there are 18 days of the year where the maker can afford insolvency — a valid alternative at the expense of losing path-independence for that time frame. Those are the sole two options when facing such events.