TL;DR
This paper derives a mathematical framework for setting optimal dynamic fees in Automated Market Makers (AMMs) to maximize revenue and protect liquidity providers. The authors identify a "dual-regime" strategy: charging high fees to block predatory arbitrageurs when prices are misaligned, and lowering fees (sometimes even to negative values) to attract "noise traders" and boost volume when prices are stable.
What Problem Does This Paper Address?
Liquidity providers (LPs) in decentralized finance (DeFi) face a persistent headache: Loss-Versus-Rebalancing (LVR) and Impermanent Loss (IL). Because AMMs like Uniswap often rely on "lazy" static fees (e.g., a fixed 0.3%), they are slow to react when the market price on a centralized exchange (like Binance) moves. This creates a "toxic" profit opportunity for arbitrageurs, who pick off the AMM’s stale prices at the expense of LPs.
While Uniswap v4 recently introduced "hooks" that allow for dynamic fees, the industry lacks a rigorous "gold standard" for how those fees should actually behave. This paper fills that gap by determining the optimal fee structure that balances the need to deter arbitrageurs while still encouraging healthy, revenue-generating trade volume.
Methods
The authors frame fee-setting as a stochastic control problem. They model the AMM as a Constant Function Market Maker (CFMM) and use the Hamilton-Jacobi-Bellman (HJB) equation to find the value function that maximizes total fees collected over a finite time horizon.
Because the full problem is mathematically "intractable" (too complex for a direct solution), they provide two clever approximations:
- Constant Oracle Price: Assuming the external market price stays steady to find a closed-form solution.
- Linear-Quadratic Expansion: Approximating the exponential terms in the HJB equation to handle a stochastic (moving) oracle price.
They model order flow using controlled point processes, where the intensity of buy/sell orders depends on the gap between the AMM’s internal price and an external "oracle" price.
Datasets
The paper does not use historical market datasets. Instead, it relies on numerical simulations and synthetic data.
- Price Dynamics: Modeled using Geometric Brownian Motion.
- Pool Parameters: Simulations use a Constant Product Market (like Uniswap v2) with a pool depth ($p^2$) of $10^8$ and an initial inventory of 1,000 units of the risky asset.
- Monte Carlo: They ran 100,000 simulations to compare their optimal dynamic strategy against standard constant-fee strategies.
Key Insights and Ideas
- The Two-Regime Strategy: The optimal fee isn't just a single number; it flips between two goals.
- Regime 1 (Defense): When the AMM price is far from the oracle price, fees spike to "penalize arbitrageurs."
- Regime 2 (Growth): When the AMM price is close to the oracle, fees drop to "increase volatility" and attract noise traders (retail users), who provide the "healthy" volume that LPs want.
- Negative Fees are Optimal: Surprisingly, the math suggests that sometimes the AMM should charge negative fees—essentially paying traders to rebalance the pool—to move the price back toward the oracle more quickly.
- Linearity is "Good Enough": The authors found that a simple linear fee structure (where the fee changes linearly based on the pool's inventory) is a remarkably close approximation to the complex theoretical optimum. This is a huge win for engineers looking to implement these "hooks" in production.
Key Results
- Outperformance: In simulations, the optimal dynamic fee policies consistently outperformed constant fee strategies by a significant margin.
- Revenue vs. Volume: Dynamic fees successfully balanced per-trade revenue with total trade count. By lowering fees during stable periods, the AMM attracted more noise traders, leading to higher cumulative revenue despite lower margins per trade.
- Robustness: The "First Approximation" (simpler math) and "Second Approximation" (more complex math) yielded nearly identical revenue outcomes, suggesting that the core logic of the model is highly robust to different market conditions.
Limitations and Future Work
- Static Liquidity: The model assumes a short enough time horizon that LPs aren't adding or removing liquidity (minting/burning). In the real world, LPs enter and exit based on performance, which would add another layer of complexity.
- Single Representative Trader: The model uses one "representative" liquidity taker rather than a diverse ecosystem of different types of traders (MEV bots, retail, institutional).
- Future Directions: The authors suggest applying Reinforcement Learning or "contextual bandits" to automate these fees in real-time. They also note that "competition between pools" (e.g., a Uniswap pool vs. a Curve pool for the same pair) is a vital next step for research.
Summary updated