← Back to Research

Volatility‑Aware AMM

An AMM whose pricing shape adapts to volatility to balance low slippage with resilience in fast markets.

Dynamic curve selection

Map short‑term volatility to curve parameters, flat when calm and product‑like when volatile to protect against depletion.

Volatility signal

EWMA of returns avoids window jumps and reacts quickly.

n(σ) mapping

Sigmoid mapping from σ to curve exponent creates smooth transitions.

Numerical execution

Robust Newton / binary‑search solvers compute swap outputs for convex invariants.

Volatility research & interactive demos

Short-horizon EWMA volatility, a smooth mapping \(n(\sigma)\) from volatility to curve shape, and numerical execution on convex invariants.

Rolling vs. time‑weighted volatility in AMMs

Rolling-window standard deviation reacts in step-changes as large moves enter/exit the window. A time‑weighted EWMA (e.g., RiskMetrics‑style with decay \(\lambda\)) downweights stale data and responds faster to new regimes—more suitable for on‑chain control loops.

Figure 1 — Volatility measurement comparison

Price (left axis), 20‑day rolling vol, and EWMA vol (right axis) on synthetic data with a shock; note the rolling “cliff‑drop”.

Mapping volatility \(\sigma\) → AMM curve exponent \(n\)

We interpolate between near constant‑sum (flat around mid) in calm regimes and product‑like in volatile regimes using a smooth, monotone map:

\[ n(\sigma) = n_{\min} + \frac{n_{\max} - n_{\min}}{1 + e^{-k(\sigma - \sigma_0)}} \]

Bounds \(n_{\max}\lesssim 1\) (flatter curve) and \(n_{\min}\to 0\) (product‑like) keep transitions continuous and arbitrage‑resistant.

Figure 2 — AMM curve shapes across \(n\)

Curves through the 1:1 point for \(n\approx 0.9, 0.5, 0.1\); a +10 X swap shows outputs under each.

Numerical execution on convex invariants

For an invariant like \(x^n + y^n = C\), solve trade outputs via Newton/binary search; many practical AMMs (e.g., stable‑swap forms) rely on such solvers.

LP profitability & impermanent loss

Dynamic \(n(\sigma)\) compresses slippage and IL in calm markets and relaxes toward constant‑product under stress—seeking fee capture in chop with resilience in trends.

Figure 3 — Impermanent loss (50/50 baseline)

IL vs. price ratio for a constant‑product AMM. Dynamic curvature aims to reduce realized IL in low‑vol regimes via flatter curves.