Manuscript Offprint
arXiv:2610.03262Asymptotic Analysis of Trading Fees in CFMM
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Peiyang Jin, Clouds, and Jing Qian
Abstract. As the dominant trading mechanism in decentralized finance, Automated Market Maker has been widely studied in research. However, limited research has been done with the trading fees taken into consideration. In this work, we study how much trading fee Liquidity Providers(LPs) can receive from arbitrage trading when the fee rate approaches zero. We give a closed-form formula for it and our result shows that the trading fees generated by arbitrage trading can fully offset the LVR loss when the price process is continuous. We further extend our conclusions to price processes with jumps and the theoretical analysis shows that jumps are the only cause of LP loss apart from market risks. Our results provide practical guidance for AMM designers as well as LPs.
1 Introduction and Related Work
In recent years, Decentralized finance (DeFi) has gained popularity in financial markets due to blockchain technology, which facilitates the trading of assets in a non-custodial manner. At the time of writing, the total value locked (TVL) in DeFi has exceeded $100 billion. Currently, the dominant trading mechanism in DeFi is the Automated Market Maker (AMM), which is commonly deployed as a Constant Function Market Maker (CFMM). The most famous examples of CFMMs include Uniswap, Curve, and Balancer. Unlike traditional market makers who use order books to execute trades, CFMMs rely on mathematical functions to determine prices and liquidity. In CFMMs, Liquidity Providers (LPs) deposit assets into the pool in exchange for a share of trading fees generated by the trades in the pool, and a trade is executed only if it preserves some function of reserves, known as "the invariant".
With the rapid development of CFMMs, an extensive body of work has focused on analyzing the Liquidity Provider (LP) returns. [1] derives explicit payoff and pricing functions for LP shares in Geometric mean market makers (G3Ms) with both static and dynamic weights. [7] quantifies general Constant Function Market Maker (CFMM) LP profits by Loss-Versus-Rebalancing (LVR). LVR evaluates the discrepancy between the returns of an CFMM LP position and the returns of the replicating rebalancing trading strategy, which maintains an exposure identical to the CFMM position but executes all rebalancing trades at centralized exchange (CEX) prices. [3] analyze the connections between LP Impermanent Loss in CFMMs and variance swaps, as well as gamma swaps.
Peiyang Jin, Clouds, and Jing Qian
However, a question left open by the above mentioned work concerns fees. Both [1] and [7] assume arbitrageurs do not pay trading fees, which is not the case in practice. In this work, we fill the gap by introducing trading fees into the model. More related to this work are [2] and [6]. [2] analyze optimal fees for G3Ms and show that LP loss is minimized as fees approach zero under the assumption of a quadratic tracking error. Instead of focusing on G3Ms, this article analyzes a broader family of AMMs, CFMMs, which include G3Ms as a subclass. Besides, this paper relaxes the geometric Brownian motion assumption to a semi-martingale process. [6] present a quantification of LP loss taking trading fees and discrete Poisson block generation times into consideration. More specifically, they focus on the expected instantaneous rate of arbitrage profit and derive a semi-closed-form expression for it. Unlike [6], this paper directly quantifies LP P&L (profit and loss) by calculating the trading fees received by LP and the LP loss incurred by arbitrage without the assumption of a discrete stochastic process.
To conclude, the main contributions of this work include:
– This work presents a more accurate model for LP returns, which takes trading fees into consideration.
– The price process in this work is extended to a general semi-martingale, which is more generalized than previous work.
– This model shows that the trading fee received by LP is not zero when the fee rate approximates zero, and we derive a closed formula for it.
– Our results naturally extend to price processes with jumps and we evaluate the impact of price jumps on trading fee and LP’s PnL.
A trade against the AMM pool means that the AMM pool receives the input asset (or ) and outputs a controlled amount of the other asset (or ). Here . In this work, a fixed portion of the input asset is collected as the trading fee and it is assumed to be a separate cash flow to LPs. More specifically, for a transaction exchanging asset A to asset B, the pool reserve changes from to and the trading fee would be asset A.
For a transaction exchanging asset B to asset A, the pool reserve changes from to and the trading fee is amount of asset B. Therefore, the value of the fee changes along with the price of asset B. To simplify the calculation, a reasonable choice is to use the average price of asset B during each transaction for the calculation. Under this assumption, the value of the collected fee is when the input asset is asset B.
Let be the total variation of a function on interval . The cumulative fee for a period of time is a portion of the total variation of :
CFMM is a specific class of AMM where the pool reserves before and after each trade follow the equation , where is a pre-defined function of a CFMM. In this work, we focus mainly on the CFMMs where , in which case there exists and only exists one continuous nonnegative orderbook density function such that and have the representation: , . Here has the practical meaning pool price.
Denoting the price of the risky asset in the pool as and the value of the pool , we have the following properties:
i. x and y are two monotonic functions of
ii.
iii. V is a twice differentiable function of
iv.
v.

Fig. 1. An illustration of CEX price change and the AMM pool price change when trading fees are present. The x axis is time. The y axis is the price of the risky asset.
Due to the passive nature of CFMM liquidity provision, CFMMs lags the CEX market in price change, resulting in opportunities of arbitrage. Arbitrageurs
Peiyang Jin, Clouds, and Jing Qian
continuously monitor the price difference between the pool and the CEX and trade as long as the gap between the pool price and the CEX price becomes larger than the trading fee. These trades push the pool price close to the CEX price until the pool price reaches a “no-arbitrage interval”, where the trading fees are larger than the profits that arbitrageurs can get by exploiting the price deviation. Figure 1 illustrates how CEX price and AMM pool price change over time when trading fees are taking into consideration. In this work, we assume that there are only arbitrageurs trading against the pool. In other words, all the price changes in the CFMM pool result from arbitrage activities and there are no noise trades.
Let CEX price be a process and be the pool price process (respectively written as and for brevity in the following sections). The arbitrage opportunity exists when or . This indicates that the pool price changes only when . Since we assume that arbitrageurs immediately act on these opportunities and push the pool price back into the no-arbitrage interval, the pool price is a continuous adaptive process with minimal total variation that satisfies . In other words, is defined as a solution , which has
where .
3 Asymptotic Analysis of Fee
From [4], for a càdlàg function and , the truncated variation of on interval is defined as
and it has the following property:
Applying this property to and combining with equation 2 lead to the following proposition.
Proposition 1.
From [4], if is a continuous semi-martingale, a.s., and the convergence is uniform for . Combining it with proposition 1, we have
Proposition 2. If is a continuous semi-martingale,
The convergence is uniform for .
Theorem 1. For a continuous semi-martingale process of CEX price ,
The convergence is uniform for .
Proof. Let , we have .
According to Mean Value Theorem and equation 1, there exists between and such that
(3)
Let . is bounded and uniformly continuous on . Thus we can use step function to approximate uniformly. That is, , such that as long as , . Let and . Let and . Then we have on . Denote , and let on , we get the following result:
(4)
According to proposition 2, such that and , . Therefore, . Similarly, , leading to . Plugging these results into inequality 4,
Peiyang Jin, Clouds, and Jing Qian
Note that is a bounded and uniformly continuous function of on a closed interval. Since we have , there exists such that as long as , holds for all . Let , we have
Combining with 5,
are non-decreasing function on and attain their maximum at . Let , and then . We have
The convergence is uniform for .
Recall that , . Combining these results with equation 3, we have
Theorem 1 shows that when the fee rate approaches zero, the accumulated trading fee is only determined by the quadratic variation of the price process, which means that for a diffusion process , the fee is only determined by volatility .
Take Uniswap as a concrete example of Theorem 1. Given range and liquidity , the trading function is
when the price P is within this range. We can get
and
Applying Theorem 1 leads to the result
Uniswap V2 is a special case of V3 when we choose and . Under the assumption that the price process follows a geometric Brownian motion , we get
Since the pool value , the instantaneous fee ratio gets to , which is consistent with previous research [2] and [6].
4 Discussion
4.1 LP's P&L
Following the definition in [7], LP's PnL can be decomposed to accumulated fees plus the change in pool reserve value.
As the fee rate approaches zero, we have , and under the assumption of a continuous semi-martingale , we have
Combined with Theorem 1, we get
Proposition 3.
Peiyang Jin, Clouds, and Jing Qian
This proposition implies that when the fee rate approaches zero and only arbitraging tradings happen, LP's PnL is only affected by the market risk. If LPs perfectly hedge the market risk at CEXs, no matter which process the price is, they can certainly(not only by expectation) make profit from non-arbitraging trading activities.
4.2 Process with Jumps
In practice, AMMs are operated on blockchain networks characterized by fixed average block intervals, which impose discrete settlement intervals on AMM transactions. Consequently, even if CEX price changes continuously, AMMs price update step-wisely and exhibit 'jumpy' behavior. The longer the block time, the more pronounced these price discontinuities become. Furthermore, exogenous shocks such as breaking news and massive liquidations introduce extreme volatility, causing CEX prices to deviate sharply. To model such cases more precisely, we need to incorporate jump components into the underlying price process.
For a general semimartingale price process , jumps are written as where is the left limit of . We have the following conclusion:
Proposition 4.
We then prove this conclusion formally. Recall equation 6, LP's PnL can be decomposed to the sum of accumulated fees and value change of pool reserve . We calculate these two parts separately.
To calculate , from [5] we have
holds for all càdlàg semimartingales X. Here denotes the continuous part of the quadratic variation of X. Following the same proof in Section 3, we get the following corollary for the price process with jumps:
Corollary 1. For a general càdlàg semi-martingale process of CEX price ,
The convergence is uniform for .
To calculate , recall 7 and apply Ito's Lemma for jump-diffusion process, we have the following equation:
Combining the above two parts leads to 4.
We have a brief explanation why the second part is called arbitrage loss in 4. Intuitively, there is an instantaneous price gap between CEX price and the AMM pool price when jump happens. As the fee rate approaches zero, LP suffers from arbitrage loss without any fee for compensation. If we take a look at LP's PnL at each jump, assuming the CEX price changes from to , the arbitragers can make profit by pushing the pool price from to . The amount is calculated as follows:
This implies that when market risk is perfectly hedged, jumps are the main cause of LP's loss. The calculation above shows that larger price jumps, which can be caused by large block time or large price volatility, lead to more LP loss. This result is consistent with [6].
5 Conclusion
In this work, we study AMM with the presence of trading fees. We derive a closed-form formula when the fee rate approaches zero. Our work relaxes the assumption that the price process is a general semimartingale. Our result shows that when the price changes continuously, the trading fees can offset the LVR loss. However, when the price jumps, LPs suffer from the loss from arbitrage trading. These results indicate that AMM designers should take blockchain latency and price jumps into consideration. Once these two issues are addressed, designers can shift their focus to other performance metrics, such as reducing the variance of LVR, without the concern that the mechanism's design might inherently impose losses on LPs.
Peiyang Jin, Clouds, and Jing Qian
References
-
Evans, A.: Liquidity provider returns in geometric mean markets. arXiv preprint arXiv:2006.08806 (2020)
-
Evans, A., Angeris, G., Chitra, T.: Optimal fees for geometric mean market makers. In: Financial Cryptography and Data Security. FC 2021 International Workshops: CoDecFin, DeFi, VOTING, and WTSC, Virtual Event, March 5, 2021, Revised Selected Papers 25. pp. 65–79. Springer (2021)
-
Fukasawa, M., Maire, B., Wunsch, M.: Weighted variance swaps hedge against im-permanent loss. Quantitative Finance 23(6), 901–911 (2023)
-
Łochowski, R.M., Miloś, P.: On truncated variation, upward truncated variation and downward truncated variation for diffusions. Stochastic Processes and their Applications 123(2), 446–474 (2013)
-
Łochowski, R.M.: Quadratic variation of a càdlàg semimartingale as as limit of the normalized truncated variations. Stochastics 91(4), 629–642 (2019)
-
Milionis, J., Moallemi, C., Roughgarden, T.: Automated market making and arbitrage profits in the presence of fees. Financial Cryptography (2024)
-
Milionis, J., Moallemi, C.C., Roughgarden, T., Zhang, A.L.: Automated market making and loss-versus-rebalancing. arXiv preprint arXiv:2208.06046 (2022)