createSwapPathA and is
priced and protected in a single transaction with no market maker, no signed quote,
no validity clock, and no relayer. The counterparty is the dual-tranche
ConvexityVault, which locks USDC collateral equal to
MaxIL and is paid the premium for taking the risk.
This is Pillar 2 of the three pillars: the cvAMM is the
floor of liquidity. Because it always quotes a code-capped fair price with no MM
present, there is no cold-start problem — an LP can always be priced and protected.
Path B (the MM rail) is the ceiling of price; it can only ever
undercut this floor, never replace it.
Signature-free
No EIP-712 quote, no nonce, no
validUntil, no off-chain engine. Pure on-chain
call.Always available
The pool quotes for any in-range position in any enabled market — solves cold-start.
Code-capped price
The load stack is hard-clamped by invariant I10, then
capped at MaxIL. The pool cannot overcharge.
What createSwapPathA does
createSwapPathA is one of three entry points into a single settlement core (the
others are createSwap and
createSwapRouted). It shares the same view read prologue
(_prepareSwap) as the other two, prices the swap on the
pool’s own state, then locks, pays, and custodies in one Checks-Effects-Interactions
sweep.
1
Wiring & market gate
Requires the cvAMM is wired (
convexityVault != 0) and the market is both active
and cvammEnabled — Path A markets must be explicitly opted in via setCvammEnabled.
This is the on/off switch for the pool rail per market.2
Shared read prologue (in-range gate)
_prepareSwap verifies ownerOf(tokenId) == msg.sender, derives the marketId from
the live on-chain token0/token1/fee, reads [Pa, Pb] from the position ticks, pins
P0 to Chainlink on-chain (never caller-supplied), and enforces the convexity
gate Pa ≤ P0 ≤ Pb else PositionOutOfRange. It
computes MaxIL, snapshots the entry amounts (a0, a1), and the position value
V0. The liquidity L is captured here (g.liquidity) and
stored at execution — settlement uses the stored L, never a re-read
(I6).3
Fair value (one poke, one Φ-sum)
_fairPremium converts geometry to ratios
a = Pa/P0, b = Pb/P0, pokes the VolOracle to refresh
σ_ref (permissionless, no-op if too soon), and reads
FairValueOracle.fairPremium(...) → (FairPremium, fairRateWad, sigmaRefWad). This
is the exact closed-form Φ-sum — the production Stylus
pricer, never reimplemented off-chain.4
Price = FairPremium + the on-chain load stack
_pricePathA applies the I10-clamped
load stack on top of FairPremium, then caps the charged premium
at MaxIL.5
Dust guards & slippage
Like all three entry points, Path A enforces
MIN_POSITION_V0 = $100 and
MIN_PREMIUM = $1 (block dust swaps that grief capacity and close the integer-division
free-coverage edge), plus a final maxPremium LP slippage
guard.6
Execute — lock, pay, custody (CEI)
_executePathA performs all state changes and external
calls. See the next section.Execution: _executePathA
This is the only place Path-A state mutates. It follows strict Checks-Effects-Interactions
(CEI):
- Lock collateral.
convexityVault.lockCollateral(marketId, maxIL)— the pool checks thatfree ≥ maxIL(InsufficientFree) and that the senior tranche stays protected,totalLocked + maxIL ≤ juniorAssets(SeniorProtectionBreached). Collateral locked is exactly MaxIL (FULL mode). - Allocate the swap id.
nextSwapId++. - Write the record.
SwapRecord{ mm: address(convexityVault), collateral: maxIL, liquidity: g.liquidity (stored once — I6), ... }. The counterparty field is namedmmand is set to the vault address;settlelater infers the rail froms.mm == address(convexityVault). - Pull the premium in USDC from the LP.
- Take the NFT into the
ILVaultfor custody. - Split the premium (next section).
The on-chain load stack
Path A computes its load on-chain from the pool’s own state (Path B carries a singleloadBps instead). The premium is FairPremium scaled up by a load that is the sum of
three components, then hard-clamped:
The outer min(..., maxLoad) is the I10 clamp
(CvammPricing.totalLoadWad); the round-up is F-#8
(CvammPricing.premiumFromLoad). All quantities are
WAD-scaled — 1e18 = 1.0 = 100% load, 1 bps = 1e14 WAD.
util_skew(u) — capacity pricing, u = locked / total
util_skew(u) — capacity pricing, u = locked / total
Flat below a knee, convex above, capped —
CvammPricing.utilSkewWad.
It rises as the pool nears full commitment, pricing
marginal capacity up before over-commitment. This wires directly into the
run defense: the same locked/free accounting that prices capacity
also blocks a withdrawal run.disp_skew(h) — concentration pricing, h = coverage HHI
disp_skew(h) — concentration pricing, h = coverage HHI
The honest single-pair concentration analogue: many positions bunched at one range edge
all hit MaxIL together. Convex, capped —
CvammPricing.dispSkewWad.
The Herfindahl h is computed O(1) from an incremental
Σ lockedByMarket² accumulator (ConvexityVault.concentrationWad) — no loop over
positions.No primitive is hardcoded. The
baseLoad regimes, both skew curves
(knee / slope / power / cap), and maxLoadBps are read from the calibrated risk-parameter
set (cvAMM block) via LoadParams (set by the owner through
InflexionCore.setLoadParams). fairRate itself has no
calibrated coefficients — it is the exact closed form. Hardcoding any load / skew / σ
primitive is the exact failure the external audit flagged.The I10 cap is by construction
The premium split — 99% to the pool, 1% to the treasury
When the premium lands,_executePathA splits it:
The 99% pool cut is then split across tranches inside the vault by
accruePremium:
So the senior tranche behaves like a low-yield “convexity savings account” and the junior
tranche is the high-APY vol-seller. seniorPremiumShareBps is immutable, sourced from
the calibrated risk-parameter set. This tranche split is unique to
Path A — Path B’s split is a flat 99% to the MM / 1% to the treasury, with no tranche
allocation.
Signature-free, always available — the floor of liquidity
Path A is the answer to three cold-start failure modes that kill quote-driven markets:No price (cold-start)
A pure MM market has no price until an MM shows up. The cvAMM always quotes a
code-capped fair price for any in-range position in any enabled market.
Overcharge
A monopolist early MM could mark prices up. The pool’s price is clamped in code by
I10 — it cannot exceed
FairPremium · (1 + maxLoad).Liveness dependency
Path A needs no off-chain engine. The engine cannot censor Path A at all
because Path A does not use it — there is nothing to censor.
Depositor viability
The dual-tranche design gives depositors a choice: a senior “savings account” or a
junior vol-seller. See tranches.
createSwapRouted, an MM wins only by strictly beating the
pool, and a bad MM quote silently falls back to Path A without ever reverting.
Proven live
The 2026-06-05 redeploy ran a real create→settle on Path A against a 300s market:- Path A (swap #1): V0 $270,531.28, MaxIL $1,669.24, premium $9.70 (0.58% of
MaxIL), realized IL $148.64, payout $148.64 — locked and settled entirely from
the
ConvexityVault. The LP received the payout; the pool keptcollateral − payout(the residual MaxIL) as profit on top of the premium.
createSwapRouted (swap #2) compared premiumA_cvamm $13.80
against an MM’s premiumB_mm $8.93 and routed to the MM — the pool is the floor and the
MM the ceiling. See routing for that path.
The two separate claims
The settlement core enforces the LP-facing guarantee identically regardless of rail. On Path A the counterparty is the pool rather than a single MM, but the guarantee is the same: And the capital-at-risk disclosure applies to the pool’s depositors — both tranches:Structures ship from day one; the full DYNAMICS (pool-vs-MM spread as a forward-vol signal) mature with multiple competing MMs and volume. The dataset begins at the single redeploy; the off-chain telemetry halves begin at the first interaction logged.What Inflexion offers today is the architecture and the first public view into the microstructure of the DeFi LP volatility-risk premium — not yet a mature dataset:
- Structures are present day-one. All five non-circular behavioral signals are defined and queryable from launch.
- Dynamics mature with volume. The richer signal — the pool-vs-MM spread read as a forward-vol indicator — only sharpens once multiple market makers compete and real flow accumulates.
- The dataset begins at the single redeploy, and the off-chain telemetry halves begin at the first interaction logged. History is served live from the subgraph via the API; if a backing (subgraph URL / RPC / telemetry) is absent, surfaces degrade to a typed
pendingstate — never an error.
421614 · deploy block 274081134 (subgraph startBlock) · deployed 2026-06-05
Core protocol
Stylus & libraries
Oracles
Uniswap
Chainlink feeds
Demo tokens / pool / LP
Lifecycle swaps
Live create→settle lifecycle (2026-06-05, short 300s fee-500 market
0xb8bbd684f213d5833886ade7b531a6949d85522249881a2b5d46a5cc76e439c2):
- Path A (cvAMM convexity) — swapId 1, LP tokenId 3220 · V0 $270,531.28 · MaxIL $1,669.24 · premium $9.70 (0.58% of MaxIL) · settled payout $148.64 from ConvexityVault.
- Path B (MM routing) — swapId 2, LP tokenId 3221 · MM beat cvAMM ($8.93 vs $13.80) · MaxIL $3,215.65 · MM collateral locked $3,215.65 · settled payout $245.66 from MM collateral.
Where to go next
The ConvexityVault
Dual-tranche accounting, the senior-protection invariant, run defense, and premium
accrual.
The load stack
baseLoad, util_skew, disp_skew, and the I10 clamp — the full math.
Path B — the MM rail
Firm EIP-712 signed quotes, no last-look — the ceiling of price.
Routing
createSwapRouted: the cheaper of {pool, MM}, with non-reverting fallback to Path A.MaxIL — the unit of risk
Why MaxIL is both the load-bearing cap and the fungible collateral unit.
The full lifecycle
Create → active → settle, from
registerMarket to NFT return.