Companion to PNK/USD market maker: model & path-independence validation.
Setup
Consider a bonding curve on a CLOB with token holdings and USD holdings as functions of price , operating over a bounded range .
Uniform depth constraint: Define depth over a symmetric log-price band of half-width . At any price such that both and lie within , the USD available on each side must equal a constant :
The effective domain for the constraint is . Outside this interior band, the full symmetric log-band is no longer contained in , so the available depth on the truncated side is strictly less than .
Note: if the band is instead defined arithmetically as , the bid and ask sides involve different log-widths (), making exact two-sided uniformity impossible with a single curve. The log-price formulation avoids this asymmetry.
1. The functional equation
Substituting and , both constraints reduce to:
This is a finite-difference equation: has constant increments over equal steps in log-price space.
2. Solving the functional equation
The general smooth solution is:
where is any smooth -periodic function (), since:
To obtain a homogeneous curve with no oscillatory structure in log-price, we select the canonical non-oscillatory solution . This is the scale-invariant choice: the curve has constant USD depth per unit log-price, with no oscillatory structure or preferred frequencies in log-price space.
Note: monotonicity of alone is insufficient to force . A small-amplitude periodic (e.g., with ) preserves everywhere while introducing oscillatory microstructure. Such solutions are mathematically valid but economically unnatural — they would create a curve where the marginal selling rate oscillates with price, with no economic justification for the preferred frequency. We exclude them by construction.
Thus:
Substituting back and setting (boundary condition: all capital is in tokens at the lower bound):
where:
3. Deriving x(P)
Along a differentiable bonding curve with marginal price , trade accounting gives:
(When price rises by , the curve sells tokens at price , receiving in USD.)
From :
Therefore:
Integrating with boundary condition (all capital is in USD at the upper bound):
4. The invariant
From and :
And:
Combining:
This defines the state manifold of the curve. Infinitesimal trades respecting preserve this invariant.
5. Verification of uniform depth
Bid depth at price (USD spent as price falls from to ):
Ask depth at price (USD received as price rises from to ):
Both sides are exactly , for all in the effective domain .
6. Derived properties
Portfolio value:
Range boundaries from capital. Given tokens and USD at current price , with held fixed (i.e., target depth and band half-width fixed):
- USD sets the downside: , which is always positive.
- Tokens set the upside: . This requires for a finite positive . If , then . If , no finite or infinite positive upper bound exists within this curve family for that .
These are independent — adding USD extends the downside without affecting the upside, and vice versa.
CLOB grid order size. On a log-uniform grid with spacing , each order is approximately USD, uniform at every price level.
7. Relationship to arithmetic percentage bands
If the depth band is defined arithmetically as instead of , the bid and ask log-widths differ:
- Bid:
- Ask:
No single log-affine curve can produce exact constant depth on both sides simultaneously. The relative excess of bid depth over ask depth is:
At , bid depth exceeds ask depth by ~2%, which is negligible in practice. But exact two-sided uniformity under arithmetic bands is impossible with this curve family.