FairValueOracle: a production contract that computes, live per quote, the fair value of a capped in-range IL claim and exposes it to both rails of the market.
This page is the conceptual tour. It explains what the fair value is, why it factorizes the way it does, and why it is an exact closed form rather than a fitted surface, a Monte-Carlo simulation, or a lookup table. The full term-by-term derivation lives in the Φ-sum derivation.
The headline identity
Everything reduces to one multiplication: Two factors, two completely separate jobs:MaxIL — pure geometry
The maximum in-range IL of the specific position, computable at creation from
(Pa, Pb, L, P0). Frozen at creation, identical across all three durations, and carries none of the vol/time dependence.fairRate — pure stochastics
The fraction of MaxIL the claim is worth under the risk-neutral measure. An S-curve in
σ²·T. It carries all of the vol/time dependence; geometry enters it only through the normalized range edges.fairRate is the how risky (stochastics); the load stack is the how scarce (inventory state). They multiply.
One position, three prices, one collateral. Because
fairRate carries all the time dependence and MaxIL carries none, a single Uniswap position prices to three different FairPremium values (7 / 30 / 90 days) — all backed by the same MaxIL. Only fairRate moves with duration. See the worked example below.fairRate: the S-curve in σ²·T
fairRate is defined as the risk-neutral expectation of the capped payoff, normalized by the cap:
It is dimensionless — the probability-weighted fraction of the cap you expect to be paid. As a function of total variance σ²·T, it traces a clean S-curve between two asymptotes:
- As
σ²·T → 0(calm and/or short):fairRate → 0. Price barely moves, almost never leaves the range, the cap is irrelevant — the claim is near-worthless. - As
σ²·T → ∞(violent and/or long):fairRate → 1. Price almost surely exits the range and the claim almost surely pays the full MaxIL — you are effectively pre-paying a near-certain loss.
Reference points (σ = 60%, risk-neutral)
These are the verified outputs of the reference IL ground truth, reproduced bycvamm.fair_rate. Read each row as the S-curve walking up σ²·T with duration:
A wide / short position (±20% / 7d) is worth only 18% of MaxIL — the cheapest fraction, and the most convexity value for the LP. A tight / long position (±5% / 90d) is worth 91% of MaxIL — effectively pre-paying a near-certain loss. The product carries the most convexity value for wide/short positions and the least for tight/long ones.
Why it is an EXACT closed form
This is the most important claim behind pricing IL on-chain. The answer:fairRate has no calibrated coefficients. It is not fit to data, not simulated, and not interpolated from a table. The only stochastic input is σ_ref (the volatility reference).
The mechanism, in one paragraph. The capped v3 payoff min(IL, MaxIL) is piecewise in the terminal price P_T — three arms, split by the range edges and the two cap-crossing prices:
- below
Pa— IL is linear and decreasing inP_T(the position has rotated fully into token0), capped flat at MaxIL once it crosses the lower cap price; - inside
[Pa, Pb]— IL is the convex armc₁·P − 2L·√P + c₀, and is never capped (a convex function on the range sits below its endpoint chord, which is ≤ MaxIL); - above
Pb— IL is linear and increasing inP_T(rotated fully into token1, while a hold grows), capped flat at MaxIL above the upper cap price.
P_T is lognormal, so each arm integrated against the density is a standard lognormal interval moment expressible in the normal CDF Φ. The building block is one closed expression:
The arms use only the moments p ∈ {0, ½, 1}, and the integration limits are the finite set K ∈ {0, Pa, Pb, PcapL, PcapR, +∞}. Summing the arms gives:
No Monte Carlo. No lookup table. No fitted coefficients. Evaluated live, per quote.
The Φ-sum is
L-independent. It runs in normalized units P0 = 1, L = 1, so it depends only on a = Pa/P0, b = Pb/P0, σ_ref, and T — not on the position’s liquidity. This L-independence in the fair-rate sense is exactly what makes positions fungible to an underwriter within a market, and why an MM quote is per-market, never per-NFT.Verified exact against the settle-path math
The closed form is checked equal to the reference IL implementation — which is itself verified equal to dense quadrature and to Monte Carlo — so the pricer can never drift from the settlement math:- Closed form vs reference quadrature / MC:
max_abs_err ≈ 5.1×10⁻¹¹. The heavy calibration run restates this as≡the reference IL implementation to3.3×10⁻⁹— both far inside any tolerance. - Stylus Φ-sum vs a 50-digit
mpmathreference: the production Rust matches the high-precision fixtures to ≤ 1×10⁻¹² onfairRate.
The Stylus FairValueOracle is production
A hard design rule: the Φ-sum is never reimplemented off-chain. The SDK reads the on-chainFairPremium and never approximates it. The on-chain pricer is the Stylus FairValueOracle — a Rust/WASM contract whose integer fixed-point erf is machine-precise precisely because Stylus bans WASM floating point at activation.
Production — Stylus FairValueOracle
Rust/WASM, machine-precise
Φ-sum (≤ 1×10⁻¹² on fairRate vs the 50-digit reference). The single source of fair value for both rails — the router pokes once and prices Path A and Path B off the same FairPremium. Address in the deployment registry.CI cross-check — Solidity oracle
The Solidity
FairValueOracle uses an Abramowitz–Stegun Φ (~1.5×10⁻⁷, ÷MaxIL-amplified at the tight tier). It is a revm-testable CI cross-check, not a second production oracle.FairValueOracle.fairPremium(oracleToken, a, b, durationSeconds, maxIL), which returns (premium, fairRateWad, sigmaRefWad). The same read feeds both the cvAMM load stack (Path A) and the MM loadBps derivation (Path B), so the routing compares two prices built from one fair value.
The only residual approximation
The Φ-sum is exact given the model. There is exactly one modeling assumption, and it is stated plainly: It is worth being precise about whatσ_ref is and is not load-bearing for. A wrong or too-low σ_ref makes the pool under-charge load, so premium income stops covering payouts and NAV compresses — junior absorbs it first, senior in the tail. It is not load-bearing for the FULL no-bad-debt invariant: in FULL, collateral = MaxIL ≥ payout regardless of what σ was, so a vol-oracle fault can cost depositors money but can never create LP bad debt. These are two separate guarantees and are never merged.
Worked example: one position, three prices
A 50,000 USDC position, ±10% geometric range,σ_ref = 60%, baseLoad = +15%, skews = 0. MaxIL = 1,280 USDC (2.56% of V0) — identical for all three durations. Only fairRate moves.
The collateral the underwriter posts (MaxIL = 1,280 USDC) is the same across the table; the S-curve does all the work. Over 90 days the ±10% band is touched ~75% of the time versus ~24% over 7 days — which is the
fairRate column, made concrete.
Live on-chain
The pricer priced live swaps on the Arbitrum Sepolia stack (2026-06-05):FairPremium; createSwapRouted gave the LP the cheaper of the two. The full address registry and lifecycle record live in the deployment reference.
Theory anchors — not the pricer
An important distinction: two academic results are the anchors for why the claim is priceable and hedgeable. They are not the on-chain pricer — the exact Φ-sum is. Do not conflate them.Lipton, Lucic & Sepp (2025) — static replication
Lipton, Lucic & Sepp (2025) — static replication
An IL-protection claim is statically replicable by a strip of vanilla options, so it has a model-light fair value and a concrete hedge. This is the theory anchor for why the claim is priceable and hedgeable. It is not the formula Inflexion evaluates on-chain. See theory anchors.
Milionis, Moallemi & Roughgarden (2022) — LVR
Milionis, Moallemi & Roughgarden (2022) — LVR
The AMM’s adverse-selection cost (loss-versus-rebalancing) has a closed form proportional to instantaneous variance — equivalently the theta of the replicating short-option position. A v3 LP is structurally short gamma (concave
V_lp), and IL is the realization of that short-gamma / LVR cost. Inflexion sells the LP the long-convexity leg that offsets it, capped at MaxIL. See the in-range convexity hedge.Where this sits in the stack
MaxIL — the cap and unit of risk
The geometry factor: why the cap is load-bearing and why it makes positions fungible.
The Φ-sum derivation [DEEP]
The full term-by-term derivation of the closed form deferred from this page.
σ_ref — the volatility oracle
The only stochastic input:
max(σ_short, σ_long, floor) and why the max is mandatory.The pricing stack
How both rails build their premium on top of the published FairPremium.