Skip to content
log(swap)

Notation

Every symbol used across these pages, in one register. The vocabulary is fixed in the specification's glossary; this is the public subset.

Core state

symbolmeaningunits
ppmarginal price of base in quotequote/base
xxlog⁡p\log p — the canonical price state—
RRbase holdingsbase
QQquote holdings, the bufferquote
VVposition value =Q+pR= Q + pRquote
LLexposure — the base-leg value in quote, pR≡LpR \equiv Lquote
LaL_a∑iLi\sum_i L_i over active positionsquote
pmin⁡p_{\min}floor pricequote/base
ξ\xilog-floor =log⁡pmin⁡= \log p_{\min}—
pmax⁡p_{\max}, μ\muposition cap, μ=log⁡pmax⁡\mu = \log p_{\max}—
ℓ\elldrawdown =Q/L=x−ξ≥0= Q/L = x - \xi \ge 0—
Γq\Gamma_q, λ\lambdaquote gamma =p2∣V′′(p)∣≡L= p^2\lvert V''(p)\rvert \equiv Lquote
Λ(L,ξ)\Lambda(L,\xi)a floored log position; Λ(L,ξ,μ)\Lambda(L,\xi,\mu) a capped one—

Bars denote liquidity-weighted averages. A single position uses x=log⁡px = \log p and ξ\xi; a multi-asset pool uses xˉ\bar x and ξˉ\bar\xi. Aggregating positions on one pair also uses ξˉ\bar\xi for their weighted average floor.

Identities worth memorising: R=L/pR = L/p, Q=LℓQ = L\ell, V=L(1+ℓ)V = L(1+\ell), pR≡LpR \equiv L.

Swaps

symbolmeaning
uusigned log displacement of a swap, u=Δxu = \Delta x; positive = quote in, price up
vvΔR/R\Delta R/R, signed base flow; R′=Re−u=R(1+v)R' = Re^{-u} = R(1+v)
g(u)g(u)average-price function u/(1−e−u)u/(1-e^{-u}); pˉ/p=g(u)\bar p/p = g(u)
δξ\delta_\xifloor-ladder spacing — deliberately coarse; two-class blending covers the gaps exactly
AAuser-specified swap amount in the four exact cases

Fees and volatility

symbolmeaning
ϕ\phifee rate, charged on the quote leg only, both directions
ϕeff\phi_{\text{eff}}effective dynamic fee =max⁡(ϕmin⁡, κσema2)= \max(\phi_{\min},\,\kappa\sqrt{\sigma^2_{\text{ema}}})
ϕmin⁡\phi_{\min}hard fee floor
κ\kappafee calibration gain; κ⋆=π/8≈0.6267\kappa^\star = \sqrt{\pi/8} \approx 0.6267
α\alphaEMA decay for σema2\sigma^2_{\text{ema}}; α=12\alpha = \tfrac12 by default
σ\sigmavolatility, annualised unless stated
Δt\Delta tblock time
FFfee accumulator, fee per unit LL; F=ϕ⋅TV(log⁡p)F = \phi\cdot\mathrm{TV}(\log p) plus mint-fee point masses
Σ\Sigmaquadratic-variation accumulator ∫(dx)2\int(dx)^2; realized LVR per unit LL is 12Σ\tfrac12\Sigma
TV\mathrm{TV}total variation

ΔF\Delta F is cumulative fee return on active liquidity, not an annualized rate; ΔF/(1+ℓ)\Delta F/(1+\ell) is return on starting capital for an active uncapped position; F−12ΣF - \tfrac12\Sigma is the model-free LP edge.

Capped positions

symbolmeaning
bb−L/pmax⁡-L/p_{\max} — the linear coefficient in V=Llog⁡p+bp+cV = L\log p + bp + c
mmp/pmax⁡p/p_{\max}
D\mathcal{D}dormant base — frozen holdings of legs whose tick has not been crossed

With a cap: pR=L(1−m)pR = L(1-m), V=L(1+ℓ−m)V = L(1+\ell-m). Uncapped is the m→0m \to 0 limit.

Multi-asset

symbolmeaning
nnnumber of base assets
pjp_j, xjx_j, RjR_j, LjL_jper-asset price, log-price, holdings, exposure
wjw_jweight =Lj/L= L_j/L
xˉ\bar xcomposite index =∑jwjxj= \sum_j w_j x_j, the log of the weighted geometric mean
ξˉ\bar\xipool floor on the xˉ\bar x axis; Q=L(xˉ−ξˉ)Q = L(\bar x - \bar\xi)
CCcovariance matrix of the base assets
σxˉ\sigma_{\bar x}index volatility =w′Cw= \sqrt{w'Cw}
DR\mathrm{DR}diversification ratio =w′σ/w′Cw≥1= w'\sigma/\sqrt{w'Cw} \ge 1
w⋆w^\starDR\mathrm{DR}-maximising weights, ∝C−1σ\propto C^{-1}\sigma

Code names

The mathematical notation and contract field names refer to the same quantities:

code namemathematical notation
logFloorξ\xi for one base; ξˉ\bar\xi for a multi-asset pool
refLogFloorreference floor ξ0\xi_0 or ξˉ0\bar\xi_0
compositeXxˉ=∑jwjxj\bar x = \sum_j w_j x_j; reduces to xx for one base

Vocabulary

termmeaning
F-poolfungible — one floor shared by every share, nn bases against one quote, no fee accounting
C-poolconcentrated — a floor and cap per LP, one base against one quote
position classthe fungible ERC-6909 unit, keyed by (pool, floor, cap)
positiona holder's share balance in a class
marketone PoolKey — the economic tuple — identified by its hash, the poolId
managerthe singleton contract holding every market of one shape
token claimthe other ERC-6909 receipt: an IOU on tokens held by the manager
ticka rung of the coarse ladder, index k=ξ/δξk = \xi/\delta_\xi, where LaL_a changes
dormantbelow its floor (or above its cap): holding one asset, frozen, earning nothing