Curve presets
A leg’s depth curve is not tuned per asset. It is one of a few presets written once at deploy, and the leg points at it with a curveId. This page covers what the curve does to a quote, what each installed preset looks like, and how to pick one. The spline mathematics, storage layout and gas are in Liquidity Shaping.
1. How shaping works
The mark comes from the oracle. The curve only answers one question: how far from the mark does the next unit of depth trade?
- x is cumulative depth, 0 to BPS bps of the leg’s depth. The mark sits near the midpoint.
- y(x) is the price offset at that depth, nondecreasing, stored in pbps. A trade walks x away from the mark and pays the mean of y over the depth it consumes (traversal).
- Density is dx/dy: depth per unit of price move. Where y is flat the book is deep and a trade barely moves the price. Where y is steep the book is thin.
- Scale is separate: a quote multiplies y by , with the live dispersion. Volatility rescales the curve and never reshapes it.
Two knobs follow, and only one of them is a preset:
| Knob | Sets | Changed by |
|---|---|---|
Preset (curveId) | Shape of the book and its reference scale | UPDATE_PROFILE, TUNING tier |
minDispersionPbps, vega | Width at quote time | Steward raise, or UPDATE_PROFILE for a cut |
Writing a new preset (UPDATE_CURVE, LISTING tier) is rare and immutable: an id is written once and never renumbered. Moving a leg between existing presets is the routine operation.
Fees and the coverage toll sit on top of the offset: Spread & Fees, Slippage & Price Impact.
2. Presets
The preset list in this section is generated from the deploy manifests by gen-curve-presets.ts in the content repo. Scale, knot and edge values are not reproduced here; read them live from the curve table on chain. Preset ids are per deployment: see pool composition for the ids a given pool carries.
Installed presets
One row per shape. Presets that share a shape differ only in reference scale, which is per deployment and read from the contract. Shape names are methodology; numeric parameters are not published on this page.
| Curve | Preset names | Shape |
|---|---|---|
| A | bell_100, bell_500 | bell: depth at the mark |
| B | asym3 | complement of the bell: depth in the wings |
| C | asym5 | complement of the bell: depth in the wings |
| D | bell_100_inv, bell_500_inv | complement of the bell: depth in the wings |
3. Choosing a preset
Pick by the leg’s measured trade density, not by its class label: Width selection has the rule.
3.1. Bell (curve A)
Depth peaks at the mark and thins toward the edge. Small trades pay almost nothing beyond the fee and the cost climbs as a trade eats into the shoulders. It is the right shape when flow clusters near the mark and tails are rare.
- Pegged legs and the hub take the narrow half-swing (
bell_100), where the book is tight and the edge is the dispersion itself. - Floating legs (volatile, metals, FX, equity) take the wider half-swing (
bell_500).
The two have the same shape. They differ in the scale they were fitted at, so point a leg at the one whose reference scale is nearer its dispersion: the scale factor stays near 1 and the integer-pbps truncation stays small against the offset. Never derive one from the other by rescaling (§4.3).
3.2. Complement (curve B)
The complement inverts the density: thin at the mark, deep in the wings. It is refitted from the bell as and constrained monotone to a small density error, which is why it carries 9 weights and 4 interior knots instead of 7 and 2. At the same dispersion both reach the same edge, but the complement’s mean cost stays above the bell’s at every trade size; only the marginal price in the last few percent of depth moves less, where its density is higher than the bell’s.
Assign it only when a leg’s measured density has its mass in the shoulders rather than at the mark. It is installed so the fit has somewhere to land, never chosen on intuition.
3.3. Rules of thumb
| Situation | Preset |
|---|---|
| Pegged leg or hub, flow at the mark | bell (bell_100) |
| Floating leg, flow at the mark | bell (bell_500) |
| Measured density has its mass in the shoulders | complement at the matching scale |
A wrong preset is cheap to fix: re-pointing is one TUNING op, and because the curve is anchor-free it can be tried against a leg’s live tape without touching the oracle or the reserves.
4. Reading the curve in the pool risk modal
The risk modal names a leg’s preset and its shape (segments, reference scale, wall). Read it with the tables above:
- Preset is the codebook entry the leg points at. Two legs on the same name have the same shape and can differ in width.
- Reference scale is the dispersion the preset was fitted at. The far edge sits at the curve’s edge multiple times the leg’s dispersion, so a bell at a given dispersion quotes at most about that dispersion off the mark before the fee and the coverage toll.
- Min fee is the leg’s path floor, not the one-way fee: the one-way fee is half the sum of the spoke’s and the hub’s (Spread & Fees).
5. Related documentation
- Liquidity Shaping: spline mathematics, storage, traversal
- Parametrization:
minDispersionPbps, vega and the fences - Spread & Fees: the fee on top of the offset
- Slippage & Price Impact: the full decomposition