Adaptive AMM strategies that adjust curve parameters based on volatility metrics to enhance liquidity efficiency and minimize impermanent loss
A rolling volatility measures the standard deviation of recent price (or log return) data over a fixed window. For example, a 20-day rolling standard deviation of log returns gives an estimate of volatility using the last 20 days of data.
This method treats all observations in the window equally and then "drops" old data once it falls outside the window. A downside is that it can produce abrupt changes: when a large price move enters or exits the window, the measured volatility can jump or drop suddenly.
For instance, after a big price swing, rolling volatility spikes, then exactly 20 days later it may plummet as that event falls out of the window. This can make the volatility estimate noisy or slow to adapt to regime changes.
A time-weighted approach (often an Exponentially Weighted Moving Average, EWMA) assigns more weight to recent price changes and less to older data. It effectively "forgets" past volatility gradually rather than all-at-once.
The EWMA is updated recursively: for example, RiskMetrics uses a decay factor λ≈0.94 (for daily data) so that each day's contribution decays by 94% per day. A lower λ (e.g. 0.8) puts even more weight on recent moves, making the volatility estimate more reactive.
Time-weighted volatility tends to be smoother and more responsive: it doesn't exhibit the sharp drops that a fixed window can produce. In practice, the rolling-window method "weighs all observations equally and often understates the volatility" in rapidly changing markets. By contrast, an EWMA captures bursts of volatility quicker (older tranquil periods are down-weighted) while still smoothing noise.
For an AMM (Automated Market Maker) that needs a short-term volatility input (e.g. to adjust its curve shape or fees), a time-weighted volatility is generally preferable. It adapts to market changes more promptly and avoids the distortion of an arbitrary cutoff.
A rolling std dev might lag or give a false sense of low volatility until a sudden jump occurs once the window catches up. The EWMA provides a more stable estimate that reflects current conditions, which is crucial for an AMM tuning its parameters continuously.
In summary, a time-weighted EWMA approach is the better choice for short-term volatility measurement in an AMM, as it balances responsiveness with smoothness, ensuring the AMM reacts in a timely manner to volatility shifts without over-reacting to stale data.
To dynamically adjust the AMM's liquidity curve based on volatility, we define an exponent parameter \(n\) that controls the curve's shape (and thus price impact). We first establish plausible bounds for the standard log-volatility (realized volatility of log returns).
In a crypto context, short-term (e.g. daily) log volatility could range from near \(0\) (extremely stable pair or pegged assets) to very high values during turbulent markets. For concreteness, suppose the volatility \(\sigma\) (e.g. 1-day std. dev. of log returns) ranges roughly from 0 up to 0.5 (i.e. up to ~50% daily volatility in extreme cases). Low values (close to 0) represent very stable markets, while upper values represent highly volatile markets.
We map this \(\sigma\) to an exponent \(n\) that interpolates between a constant-sum like curve and a constant-product curve:
Use a high exponent \(n \to n_{\max}\) that yields a very flat liquidity curve around the current price (mimicking a constant-sum AMM's behavior of almost zero slippage).
In the extreme case of \(n_{\max}=1\), the invariant would behave like \(x + y = \text{constant}\), providing virtually no price movement for small trades (price stays at the peg) and minimal divergence loss for LPs when prices don't move.
In practice, we wouldn't set \(n\) exactly 1 (which is pure constant-sum and can be dangerous if price moves significantly), but something close to 1 to keep slippage very low in calm markets.
This corresponds to concentrating liquidity in a narrow price range when assets are strongly correlated (or volatility is low).
Use a low exponent \(n \to n_{\min}\) that yields a curve closer to constant-product. In the limit as \(n \to 0\), the invariant approaches the geometric mean form (Uniswap's \(x*y=k\)).
This allows the pool price to adjust freely with large trades, which is necessary in volatile markets to accommodate big price moves without depleting one side of the pool.
A smaller exponent means more "curve steepness", i.e. higher slippage, which actually protects the pool from being emptied too quickly. It essentially distributes liquidity more evenly across prices.
Thus for very high volatility, \(n\) should be near \(n_{\min}\) (yielding behavior akin to Uniswap V2/V3).
We choose \(n_{\max}\) close to 1 (e.g. 1 or 0.9) for the lowest volatility and \(n_{\min}\) as a small positive number (e.g. 0.1, or even approaching 0 in the limit) for the highest volatility. These bounds ensure the AMM never goes fully constant-sum or fully something non-convex, but spans a spectrum between nearly flat and standard constant-product.
In alternative terms, one can think of this as adjusting the weighting of the reserves – similar to Balancer's idea that highly correlated pairs can use a "tighter" curve with heavier weighting on the mean price.
To ensure smooth transitions in the liquidity curve as volatility changes, we use a continuous monotonic mapping \(n(\sigma)\). One convenient choice is a sigmoid (logistic) function mapping \(\sigma \in [\sigma_{\min}, \sigma_{\max}]\) to \([n_{\max}, n_{\min}]\):
Here \(k\) controls the steepness of the transition and \(\sigma_0\) is the midpoint volatility where \(n\) is halfway between its extrema. This smoothly interpolates – at very low \(\sigma\), \(n \approx n_{\max}\); at very high \(\sigma\), \(n \approx n_{\min}\); and for moderate volatility, \(n\) adjusts gradually.
Another simpler option is a linear mapping capped at the ends:
This linear map is continuous (though the derivative changes at the caps), while the logistic map is infinitely differentiable – either is acceptable as long as \(n\) updates continuously with \(\sigma\).
The key is that there are no abrupt jumps in \(n\) when volatility shifts – this prevents sudden liquidity repositioning that could disrupt traders or invite arbitrage.
By design, when volatility is low, the pool's curve flattens (higher \(n\)), concentrating liquidity around the current price; when volatility is high, the curve becomes more spread out (lower \(n\)), behaving more like a standard constant-product pool.
This approach is aligned with the intuition used by Exponent's time-dynamic AMM: "when paired assets' prices are strongly correlated, the price curve can be tighter, significantly reducing price divergence and, consequently, impermanent loss".
In other words, low volatility (high correlation) → tight curve; high volatility → looser curve.
To illustrate how a convex invariant curve (with exponent \(n\)) affects swap execution, consider a simple two-asset pool with a proposed invariant:
where \(C\) is a constant determined by initial reserves. (This \(f(x,y)\) is one example of a family of power-sum curves parameterized by \(n\); \(n\) adjusts the curve's convexity. Note: For \(n=0\) (interpreted in limit), this approaches constant-product, and for \(n=1\) it is constant-sum.)
Suppose initially the pool has \(x_0 = 100\) and \(y_0 = 100\) tokens, and we choose an exponent \(n=2\) for demonstration. The constant \(C\) is then \(100^2 + 100^2 = 2 \times 10,000 = 20,000\).
The pool's price for asset X in terms of Y (the marginal rate \(dy/dx\)) at any state can be derived by implicit differentiation of \(x^2+y^2=C\):
So the pool price (Y per X) is \(P_{\text{pool}} = \frac{Y_{\text{out}}}{X_{\text{in}}} \approx -\frac{dy}{dx} = \frac{x}{y}\) at the current reserves. Initially, \(P_{\text{pool}}=100/100=1\).
The curve is more convex than Uniswap's (which has price \(y/x\)). In fact, here adding X increases the price (because the curve equation differs; more X makes \(x/y\) larger). This reflects a flatter curve around the 1:1 point – the pool resists changes in the X:Y ratio by raising price as X is added.
Now a trader brings an input of \(\Delta x = +10\) X tokens to swap into the pool (expecting to receive Y tokens out). We need to find the output \(\Delta y\) such that the new reserves \((x_1,y_1) = (100+10,\;100-\Delta y)\) satisfy the invariant \(x_1^2 + y_1^2 = 20,000\).
The equation to solve is:
Expanding: \(12100 + (100 - \Delta y)^2 = 20000\), so \((100-\Delta y)^2 = 20000 - 12100 = 7900\). Then \(100 - \Delta y = \sqrt{7900} \approx 88.94\), thus \(\Delta y \approx 100 - 88.94 = 11.06\).
The trader receives about 11.06 Y tokens.
We solved this directly, but let's verify the same result using Newton's iterative method, treating \(y_1\) as the unknown root of \(f(y_1) = 110^2 + y_1^2 - 20000 = 0\):
Now \(f(88.88)\approx 0\) within small error. So \(y_1 \approx 88.88\).
The pool's new Y reserve is about 88.9, meaning \(\Delta y = 11.12\) was given to the trader (the slight difference from 11.06 is just rounding/iteration error). Newton's method converged in a few steps to the exact solution.
The trader got ~11.1 Y for 10 X. The effective price was ~1.11 Y per X – better for the trader than the initial price of 1. In other words, the price increased during the swap (from 1 to about 1.11).
This is a consequence of the convex curve (\(n=2\)) which concentrates liquidity around the equal ratio. Initially, the pool offers deep liquidity at price 1, so adding X causes relatively little drop in Y; in fact the pool "pushes back" by raising the price as reserves move away from 1:1.
By contrast, a constant-product AMM would have decreased the price when X is added. For comparison, if this were a Uniswap V2 pool starting at 100,100, a 10 X input would result in new reserves \((110,\, \frac{10000}{110})=(110,90.91)\) and \(\Delta y=9.09\).
The trader would get only 9.09 Y (price ~0.909 Y/X). Thus, the convex invariant (higher \(n\)) gave the trader significantly less slippage.
The flip side is that the pool's price is now higher (about 1.11 vs external 1, if external price hadn't moved). Such a pool can maintain a tighter price band – beneficial for regular traders – but it means arbitrageurs could intervene if the external market price remained at 1 (they would sell Y for X to the pool to arbitrage the price discrepancy).
Technical note: The chosen form \(x^n+y^n=C\) with \(n>1\) is strictly convex and in fact leads to the pool price moving in the same direction as the imbalance (here, more X caused higher price, not lower). In practice, an AMM might use a different functional form (e.g. Balancer's weighted constant-product or Curve's piecewise stable-swap invariant) to achieve similar "concentrated liquidity" effects without that inversion.
Nonetheless, Newton's method is applicable to any implicit invariant where we must solve for \(y_1\) given a trade \(\Delta x\). Many AMMs, such as Curve's StableSwap, have no closed-form solution for output and indeed rely on numerical methods (like Newton or binary search) to compute trade results. Our example shows how to perform such a root-find in practice for a given \(n\)-curve.
We now compare liquidity provider (LP) outcomes between the dynamic exponent AMM (our proposed invariant with volatility-adjusted \(n\)) and a standard Uniswap v3 pool (which for simplicity we treat as a 50/50 constant-product AMM across the whole price range, ignoring concentrated range positions).
Key factors in LP profitability are fees earned and impermanent (divergence) loss incurred. We examine these under different market scenarios.
Impermanent loss (IL) is the well-known effect where an LP's portfolio value under an AMM diverges from the value it would have if the LP simply held the assets, whenever the prices of the two assets change.
For a 50/50 constant-product AMM, the IL for a price ratio change from \(P_{\text{initial}}\) to \(P_{\text{final}}\) (in either direction) can be quantified by:
where \(r = P_{\text{final}}/P_{\text{initial}}\) (assuming initial equal values of assets). This formula gives the fractional loss relative to holding.
Price Change | Price Ratio (r) | Impermanent Loss |
---|---|---|
+100% (doubles) | 2.0 | 5.72% |
-50% (halves) | 0.5 | 5.72% |
+300% (4×) | 4.0 | 20.0% |
+900% (10×) | 10.0 | 43.6% |
This loss comes from arbitrageurs extracting value from the pool during price adjustment. In Uniswap v3, LPs can mitigate IL by concentrating liquidity into a narrower price range, effectively not providing liquidity beyond certain prices. But if the price exits their range, they hold one asset entirely and realize IL up to 100%.
The dynamic \(n\)-AMM aims to reduce IL by adjusting the curve shape with volatility:
In stable periods (high \(n\), near constant-sum), the pool price doesn't deviate much for small trades, so if the market price oscillates mildly around an equilibrium, the pool hardly diverges from the market.
In the ideal limit of \(n\to 1\) (constant sum), the pool price stays fixed and any arbitrage opportunity is immediately eliminated by the design (the pool price is always equal to market price by construction, if one assumes an oracle adjusting it).
In our design without an external oracle, \(n\) is high but not forcing price = market; still, for small fluctuations the pool will not create large arbitrage spreads.
This means almost zero divergence loss for LPs when volatility is low, since the pool doesn't let the price drift – it behaves a bit like a centralized exchange peg in the short term.
When price moves significantly and quickly, the dynamic AMM will switch to a lower \(n\) (more like constant-product) after volatility rises.
However, if a large sudden price jump occurs before \(n\) can adjust downward, a high-\(n\) pool is more vulnerable. In an extreme case, consider a pool in near-constant-sum mode (very high \(n\)) expecting stability, and then the market price jumps dramatically by, say, +100%.
A constant-sum pool would keep the price virtually fixed until it runs out of one asset, meaning an arbitrageur could drain one side entirely, extracting huge value.
The dynamic strategy is to avoid being caught at a high \(n\) in a high-volatility regime. The AMM would detect rising volatility (perhaps as the price starts trending) and lower \(n\) accordingly.
Thus, in practice, for a sustained trend, \(n\) will be sliding toward the Uniswap-like curve, capping the IL. The best-case scenario for the dynamic AMM is that it transitions early enough such that it behaves close to constant-product during the big move – then IL would be similar to Uniswap's. The worst-case scenario is a flash spike before \(n\) updates: the LP could momentarily suffer worse IL than Uniswap.
This highlights a risk of dynamic systems: if the volatility signal lags, LPs can be caught offside. However, since we use short-term volatility and time-weighting, the aim is to react quickly to regime changes, mitigating this risk.
Let's analyze two scenarios – one oscillatory (mean-reverting) and one trending – and see how each LP fares:
Here the price moves in a band (say ±5% around initial) with frequent swings. This means volatility as measured stays moderate. The dynamic AMM will keep \(n\) relatively high (though not maxed since there is some volatility).
As a result, the pool's curve is flatter around the mid-price. Traders enjoy low slippage, so trade volume might be higher, and the LP earns fees on each swing.
Importantly, if the price returns to the original level, the LP's impermanent loss net is zero (since the divergence was "impermanent"). In Uniswap (static 50/50), this is also true: if the price ends where it started, the LP hasn't lost value from IL (aside from any temporary dip).
However, the dynamic \(n\) pool had two advantages: (1) Higher fees – because the liquidity was more concentrated, traders likely did more volume through the pool (and possibly at slightly better prices), and (2) Lower interim divergence – throughout the oscillations, the pool stayed closer to market price, so at no point was a large arbitrage needed to re-align it.
Thus, in a choppy market that ultimately goes nowhere, the dynamic \(n\) invariant yields superior fee income with negligible lasting IL, outperforming a standard full-range LP.
Now consider the price steadily doubling over time (a large directional move). This will register as high volatility, pushing \(n\) toward low values. The dynamic pool progressively becomes similar to constant-product, meaning it allows more price impact and doesn't get completely emptied on one side.
The Uniswap LP also of course experiences IL as the price moves. At the end of a +100% move, a Uniswap LP is down ~5.7% versus hold (as noted).
What about the dynamic pool LP? If \(n\) was adjusting continuously, the IL would initially be small (when the move is small and \(n\) still high), but as the trend continues, \(n\) decreases, causing the pool to start behaving more like Uniswap.
Quantitatively, the LP might suffer a bit more IL early on (because initially it was offering a better price to arbitrageurs), but later in the move it protects itself. In practice, the total IL for the dynamic pool could end up comparable to or slightly worse than Uniswap's in a one-way trend.
However, there is a crucial difference: the dynamic pool likely earned more fees during the transition. Early in the trend, when \(n\) was higher, the pool's price was slower to move, so arbitrageurs traded larger volumes (each at near-market price) to adjust the pool. Those arbitrage trades generate fees for the LP.
To make this concrete, imagine an LP starts with \(100\) X and \(100\) Y (total $200) and the price of X doubles (Y is a stable asset for simplicity).
A Uniswap LP (50/50) ends up with about \(\approx 70.71\) X and \(\approx 141.4\) Y (we calculated this earlier), worth ~$282.8 (if no fees) versus $300 if held – a 5.72% IL.
A dynamic pool that was in a semi-stable mode might have had, say, \(n\) around 0.5–0.7 during the move. It would have rebalanced differently – perhaps ending with more X and less Y than Uniswap (because its curve favored holding onto X more).
For instance, if it ended with ~44.4 X and 177.8 Y (as we found for \(n=0.5\) in a sudden 2× move scenario), that's $266.7 value – a larger loss. But that was the extreme case with no \(n\) adjustment. If \(n\) had been dropping, the actual result would lie between $266.7 and $282.8.
Now factor in fees: arbitrage trading in the dynamic pool was larger (the pool was further off market initially), so suppose the pool collected a 0.3% fee on a series of trades totaling, say, $1000 volume during the price move. That's $3 added to the pool.
This extra fee could easily erase a few percent of IL. So the dynamic LP might end near $270 value, but +$3 fees = $273, versus Uniswap maybe $282 value + perhaps $1 fee = $283.
In this crude hypothetical, the Uniswap LP still did a bit better. But if the dynamic pool adjusted \(n\) faster (suffering less extreme IL) or if the volatility involved more oscillation on the way up (yielding more fee opportunities), the dynamic LP could come out ahead.
In conclusion, the proposed invariant with dynamic exponent \(n(\sigma)\) can improve LP profitability relative to a standard Uniswap v3 pool by minimizing impermanent loss in low-volatility conditions and capturing more fee revenue.
It creates a more favorable liquidity distribution: tight when prices are stable (yielding low divergence and high fee capture), and broader when prices are volatile (avoiding catastrophic loss).
While a Uniswap v3 LP must manually adjust positions or accept a compromise range, the dynamic invariant automates this process. The trade-offs are that if the model for volatility is wrong or lags, LPs can be exposed (momentarily) to greater loss; hence, choosing a robust, time-weighted volatility measure (as we did) and smoothing the \(n\)-transitions is crucial.
Overall, under a wide range of market conditions, a volatility-aware dynamic AMM should offer equal or better LP returns than a static AMM – with notably better performance in sideways markets and comparable performance in trending markets, especially after accounting for fee income.
Impermanent loss (%) for a 50/50 constant-product AMM as a function of the price ratio change (final vs initial). Even a ±10% price move causes about 0.5% loss, and a 2× move causes ~5.7% loss. Dynamic curvature seeks to reduce the area under this curve (loss) by adjusting the pool's response to price changes.