One-line mental model. MaxIL is pure geometry (the how much capital).
fairRate is pure stochastics (the how risky).
The load stack is pure inventory state (the how scarce). They
multiply:fairRate · MaxIL is the FairValue published on-chain;
(1 + load) is the underwriter’s charge over fair value, hard-capped by
invariant I10.The four layers, in stacking order
1 — The IL formula
The Uniswap v3 settle-path math:
V_hold (affine) vs V_lp (concave in range).
realized_IL = max(0, V_hold − V_lp). This is the quantity settle() actually pays.2 — MaxIL
The boundary IL —
max(IL(Pa), IL(Pb)). Pure geometry, frozen at creation.
It is both the load-bearing payout cap and the unit of risk.3 — FairValue
FairPremium = E_Q[min(IL, MaxIL)], an exact closed-form Φ-sum.
fairRate = FairPremium / MaxIL is the dimensionless S-curve in σ²·T.4 — The load stack
baseLoad + util_skew + dispersion_skew, clamped to maxLoad by invariant I10.
The underwriter’s charge over fair value, driven by inventory state.How the layers stack
Each layer carries exactly one kind of dependence — and only that kind. That is the whole design: it lets the protocol publish three prices for one position by moving a single dial.
Read top to bottom and the orthogonality is the point:
- MaxIL carries no vol and no time. It is pure geometry, frozen at creation,
and identical across the three durations (7/30/90d) for a given position. It is
also
L-independent in the fair-rate sense —fairRatedepends only on the ratios , , plus and , never onL. That is exactly what makes positions fungible to an underwriter: an MM quote is per-market (a load + an optional MaxIL-ratio band + capacity), never per-NFT. fairRatecarries all the vol/time dependence. It is the S-curve in — the fraction of MaxIL the claim is worth under the risk-neutral measure. So one position has one MaxIL but three FairPremiums (7/30/90d); onlyfairRatemoves between them.- The load carries only inventory state — vol regime, utilization,
concentration. It never touches
settle(), the MaxIL formula, or the no-bad-debt invariants. It is bounded by code (I10).
A worked walk-through of the multiply
One position priced end-to-end (from the load-stack worked example; full numbers on the worked-example page): a 50,000 USDC position, ±10% geometric range, ,baseLoad = +15%,
skews = 0.
Geometry first — one MaxIL for all three durations:
Then the S-curve does all the work — fairRate is the only thing that changes:
Over 90d the ±10% band is touched ~75% of the time versus ~24% over 7d — the S-curve
prices exactly that. The collateral (MaxIL) is constant; only the risk dial moves.
What’s exact, and the one residual assumption
Two of these layers are exact closed forms, not approximations:- MaxIL is exact geometry.
IL(P) = V_hold − V_lpis convex on (affine minus a strictly concave function), so its in-range max is always at an endpoint — proven for any entry , centered or not. See the MaxIL derivation. fairRateis an exact finite Φ-sum (≈6–10 Black–Scholes-class terms), evaluated live per quote. It has no calibrated coefficients, no Monte Carlo, no lookup table — the capped v3 payoff is piecewise-linear/convex in the terminal price, and each arm integrates to a standard lognormal interval moment in the normal CDF . See the Phi-sum page.
max_abs_err ≈ 5.1e-11, and the on-chain Stylus Φ-sum
matches 50-digit mpmath fixtures to ≤ 1e-12 on fairRate. The Stylus
erf is integer fixed-point and machine-precise precisely because Stylus bans WASM
floating point at activation, which is why the Stylus oracle is production and the
Solidity FairValueOracle is only a CI cross-check.
The two separate guarantees the math gives you
The math underwrites two distinct claims — and they must never be merged. The no-bad-debt structural core is three lines, and it is orthogonal to the premium and oracle-independent — it holds for any price path and any (even wrong) : The heavy Monte Carlo run confirmedmax_payout_frac = 1.000000 on every simulated path,
over a ±99% (and a widened −6…+6 log-move) grid, with zero exceptions. Full treatment on
the no-bad-debt math page.
The second claim is a different animal entirely — it is about the underwriter,
not the LP:
A wrong or too-low can make the pool under-charge load, so
premium income stops covering payouts and NAV compresses — junior absorbs it first,
senior in the tail. That can cost depositors money but can never create LP bad
debt in FULL: collateral = MaxIL ≥ payout regardless of what was. The vol
oracle is solvency-load-bearing for the I10 cap and depositor solvency only, not
for the FULL no-bad-debt invariant. Two separate guarantees, never merged.
Where to go next
The IL formula
V_hold vs V_lp, the three regimes, the guarded subtraction, and the Q64.96
fixed-point implementation.MaxIL derivation
The convexity proof, why the cap is load-bearing, the unit-of-risk argument, and
reference MaxIL/V₀ magnitudes.
The Phi-sum
The exact closed form: piecewise payoff, lognormal interval moments, cap-crossing
prices, and verification to machine precision.
σ_ref
The EWMA vol oracle:
max(σ_short, σ_long, floor), why the max is mandatory, and
its precise load-bearing scope.The load stack
baseLoad (the CVaR-gap envelope), util_skew, dispersion_skew, and the I10
clamp that makes overcharge impossible by code.No-bad-debt math
The three-line structural core, the I1–I10 invariants, and the dual-tranche
waterfall.
Worked example
One position, three prices, with the verified
[80, 100, 125] fixture numbers to
the wei.Theory anchors
Lipton–Lucic–Sepp (2025) static replication and Milionis–Moallemi–Roughgarden
(2022) LVR — why the claim is priceable.
Want the protocol-level picture instead of the formulas? Start at
the three pillars (published FairValue, the cvAMM pool,
MM competition), or see how the math plugs into a trade on
the pricing stack and
the lifecycle.