Constant Power Root Market Makers
Abstract
The paper introduces a new type of constant function market maker, the constant power root market marker. We show that the constant sum (used by mStable), constant product (used by Uniswap and Balancer), constant reserve (HOLD-ing), and constant harmonic mean trading functions are special cases of the constant power root trading function. We derive the value function for liquidity providers, marginal price function, price impact function, impermanent loss function, and greeks for constant power root market markers. In particular, we find that as the power varies from the range of to , the power root function interpolates between the harmonic (), geometric (), and arithmetic () means. This provides a toggle that trades off between price slippage for traders and impermanent loss for liquidity providers. As the power approaches 1, slippage is low and impermanent loss is high. As approaches to -1, price slippage increases and impermanent loss decreases.
1 Preface
This paper is part of an exploration of alternative approaches to AMM curvature to incentivize trading and liquidity provision in specific use cases. The goal of an efficient market is to provide the most liquidity at the lowest price impact. In service of that goal, we had two initial hypotheses. First, there is low liquidity for long tail assets in existing automated market makers (AMMs) because it is unattractive for liquidity providers, absent liquidity incentives. We hypothesized that greater curvature than the constant product function could incentivize additional liquidity provision. Second, we reasoned that there could be an alternative AMM for stableswaps, providing more protection to LPs in edge cases, like the recent events of Terra. Flexing power could be a gas efficient approach to adjusting curvature but introduces issues such as reserve depletion and round-trip arbitrage. We explored these in follow up research. If you’d like to discuss these topics in more detail, please reach out.
2 Constant Function Market Makers
Constant function market makers (CFMMs) are a family of AMMs commonly used to parameterize asset exchange mechanisms on public blockchains. Critically, CFMMs rely on liquidity providers (LPs) who provide tokens to a supply of reserves for use by a smart contract. The contract contains code that executes swaps for traders. To preserve market stability, swaps must ensure a function of the reserves is constant. This function is known as the trading function, also called the scoring rule or the invariant.
For simplicity, we will assume the case of two tokens, although it should be straightforward to generalize to more than two. Let be an invariant, and be reserves. A reserve represents the amount of a token available for swaps in the contract pool. Let denote new values for the reserves after a trade. A trade is allowed if and only if for some constant value , hence the name constant function.
Three examples of trading rules are, borrowing the notation from [1]:
Constant reserve We begin with a trivial invariant for , which only allows trading if it keeps the reserves at fixed values . When evaluates to , trading is not permitted. This is also known as HODL-ing.
Constant sum Define , also called the “arithmetic mean”. This function is only usable for asset pairs where the price ratio is fixed (e.g. USDT-USDC or wBTC-renBTC). Technically, it has no slippage (since price is fixed) and no impermanent loss (since we can always freely swap one for one ), but no price adjustments as reserves fluctuate, meaning a reserve can be depleted entirely. For a real world example, mStable is a DEX for stablecoins that uses a constant sum trading function.
Constant product Define , also called a “geometric mean”. We can see that must grow exponentially large as nears zero, discouraging any traders from fully depleting reserves. (Similarly, the property holds if is the token nearing zero). The unfortunate consequence of this design is susceptibility to slippage. Uniswap [2, 3] and Balancer [4, 5] are instances of a constant product.
Curve [6] Define , an interpolation between the constant sum and product functions. As increases, this converges to the constant sum. As decreases, this converges to the constant product. In this paper, we explore another method to toggle between arithmetic and geometric means.
Constant harmonic mean Define . Like the geometric mean, there is no reserve depletion. To the best of our knowledge, this function has not been implemented in practice yet. One of the contributions of this paper is to explore the properties of this trading function and similar relatives.
In this paper, we will propose a new family of constant function market makers using a power root. Special cases of these power root functions (in particular, those with non-negative power) have been previously explored by Clipper [7] and Yieldspace [8].
2.1 Marginal Price and Impermanent Loss
We review the marginal price and impermanent loss for the constant sum and product functions, all well known results.
Lemma 2.1.
The marginal price for the constant sum function is . The marginal price for constant product function is .
Proof.
Consider . Solving for , we obtain . Then, . Next, consider, . Again, solving for , we get . So . ∎
In other words, the price ratio for the constant sum function is fixed. The price is independent of the token reserves. This is not true for the constant product function.
Lemma 2.2.
Let be a change in marginal price, . Ignoring trading fees, the impermanent loss function for constant product function is . For the constant sum function, since the price marginal ratio of and must be fixed.
Proof.
Let be the new reserves corresponding to . Define , the portfolio value at price . Then , the normalized amount the liquidity provider would have been better off by keeping tokens out of the pool.
Starting with constant sum, we have , and . So .
The constant product is slightly more intricate. Since , we have and so . Thus, and . Now, . Similarly, . So . ∎
3 Value Functions for Liquidity Providers
Given a trading function, a reasonable question to ask is what is the LP payoff function? Similarly, given a LP payoff function, what is the corresponding trading function? To answer these questions, prior work [1] formulates the trading and value functions as dual convex optimization problems. We summarize the findings below:
Let denote the true (external market) price of , respectively. Define a value function as a function that maps true prices to a payoff amount [9]. Then, prior work [9] has shown that
(1) |
Equation 1 shows that traders and LPs are at odds in a zero-sum game. That is, traders achieve maximum profit when LPs achieve minimum value, preserving the constant function. (The converse is also true.) This intuition leads to the foundational result that
(2) |
In other words, the trading and value functions are Fenchel conjugates of one another. This duality does not hold for all value functions . We require to be consistent, which is composed of four requirements: concavity, non-decreasing, non-negative, and 1-homogeneous.
We list the value function for popular trading functions, and defer to [1] for derivations. It is straightforward to verify all value functions listed below are consistent.
Constant reserve , the sum value function.
Constant sum , the minimum value function.
Constant product , the product value function.
While enlightening, this analysis so far leaves us wanting more. What is the relationship between these three value functions? Are there other value functions of the same family? Why does the constant product trading function map to a product value function but constant sum maps to a minimum function? Next, we take a step towards an answer.
4 Constant Power Root Market Makers
We structure the section as follows: first, we introduce a family of value functions that contain the constant reserve, sum, and product functions as special cases; second, we derive the corresponding trading function; third, we compute several properties of interest, such as marginal price and impermanent loss. Proofs are provided inline.

4.1 Power Root Value Function
Define the power root value function as
(3) |
for a fixed constant . Note that does not have to be an integer. Equation 3 is equivalent to a -norm when . However, the two are not identical in properties, particularly in terms of concavity, as we will show in Section 4.2.
We claim that all the value functions corresponding to the constant reserve, sum, and product invariants are special cases of the power root value function. Consider:
Lemma 4.1.
Suppose . If , then . As , we have . As , we have .
Proof.
Begin with . We have .
Next, consider . Note that by definition of minimum. But also since . By squeeze theorem, we have .
Finally, consider . If , then:
∎
Economic Interpretation. We can view value functions as production functions in economic theory. For instance, is equivalent to the Cobb-Douglas production function, is equivalent to the perfect substitute (linear) production function, and is equivalent to the Leontief production function. Further, is equivalent to the constant elasticity of substitution, of which the perfect substitute, Leontief, and Cobb-Douglas are special cases of. This matches the result shown in Lemma 4.1.
4.2 Power Root Trading Function
Before we can apply Equation 2 to derive a trading function, we must verify that satisfies the four conditions for consistency [1].
Lemma 4.2.
for , is concave.
Proof.
We first show that is quasiconcave, then 1-homogenous, which implies concavity.
A function is quasiconcave if it is a monotonically increasing function of a concave function. Let . If , this is not concave. Then, if , set . Clearly is a monotonic function of . It remains to show that is concave. To see this, note that , and since . Similarly, . Thus, the Hessian of is a diagonal matrix with non-positive entries, and hence semidefinite. We conclude is concave. Next, suppose . Then is a monotonically decreasing function of . But then is a monotonically increasing function of . The Hessian of has entries which are again non-positive, making concave.
is also 1-homogeneous. To see this, note . Given quasiconcavity and homogeneity, we have concavity. ∎
Lemma 4.2 shows the power root is a concave function for .
As a corollary, we obtain our first theorem.
Theorem 4.3.
The value function is consistent.
Proof.
Lemma 4.2 shows concavity and homogeneity. For , it is true that for all so is non-negative. Finally, pick and . Then , showing that it is non-decreasing. ∎
Now that we have shown is consistent we are free to compute as in Equation 2. We claim the following:
Theorem 4.4.
where .
Proof.
We will show this in the more general case of tokens with prices . By definition, we have . Note that this is a convex objective as is affine and the negation of a concave function convex. Then:
where is the convex conjugate of . This can be written as the closed form where . Then . For two tokens, . ∎
Given the form of Theorem 4.4, we highlight a few special cases. If , then . If , then . If , then . This is consistent with what we know about constant reserve, sum, and product functions. The value function for the product invariant is also a product, which is shown by both converging to 0 (see Lemma 4.1). The value function for constant sum is a minimum function, which is captured by converging to 1 when converges to (again, recall Lemma 4.1).

Figure 2 visualizes the trading curve for a range of powers . We include (constant product), (constant sum), and (constant reserve, shown in dotted line) for comparisons. We observe that varying predictably controls the curvature of the trading function between two extreme functions.
4.3 Marginal Price Function
Given the constant power root trading function, we can derive an expression for the marginal price as a function of . The “marginal” price represents the price of one token in terms of the other assuming an infinitesimally small trade.
Begin with . Then . Dividing by , we obtain . Derive the marginal price using L’Hopital’s rule:
Since , we obtain the following expression
(4) |
A quick inspection of Equation 4 and Lemma 2.1 shows that for , we have , and . That is, the marginal price for the constant sum and product invariants are again, special cases of the constant power root.
Figure 4(a) plots the marginal price as a function of the reserve ratios between and . As , we see the marginal price converge to a constant function at 1. As , it approaches an exponentially increasing function. When , the price is linear.
4.4 Impermanent Loss Function
Using the result in Section 4.3, we show the following theorem:
Theorem 4.5.
Let be a change in marginal price . The impermanent loss for the constant power root trading function is
(5) |
Proof.
First, we wish to represent and in terms of the constant and the marginal price only. Recall from Equation 4 that . So . Since , we compute , and thus .
Second, we can compute value . Note . Let be the token reserves at the new marginal price . Then . Similarly, compute .
Now, use the definition that . To be pedantic, we obtain
Divide by the denominator to find the result. ∎
We aim to show special cases of this impermanent loss. As these require nontrivial work, we do so in the following corollaries.
Corollary 4.5.1.
.
Proof.
We compute the limit separately for the three pieces of .
-
1.
.
-
2.
.
Altogether, the limit evaluates to . Recall Lemma 2.2 to see this is equivalent to . ∎
Corollary 4.5.2.
.
Proof.
Consider only the first term in and apply exp-log to get separate limits. Let . Then,
Focusing on the expression inside the , we will study each of these in turn. First,
where the swaps between the limit and log follows by the continuity of log.
This limit is undefined but we can evaluate the left and right limits. If , then , leaving . If , we have , leaving .
Next, we can evaluate the second term:
where the second equality follows by L’Hopital’s rule.
Again, this limit doesn’t exist but we can evaluate the left and right limits. If , then , leaving . If , we have , leaving .
Now, we notice that for all cases of and coming from left or right. Note we cannot take the limit of as each is not defined.
Thus, we have . So , which is . ∎
Corollaries 4.5.1 and 4.5.2 show that like the marginal price, the constant sum and product impermanent loss functions are special cases of the constant power root.

We plot the impermanent loss as a function of in Figure 3, where the constant product (i.e. Uniswap) is shown in purple stars, constant reserve is shown in black hexagons, and the constant sum is shown with an orange cross (note this is only a single point as marginal price does not change for the constant sum invariant). Figure 3 shows a gradient of loss functions as varies. In particular, we see increased impermanent loss as approaches 1 and reduced impermanent loss as approaches . This is aligned with prior work [10] that suggests trading functions with flatter curvature have higher loss.
4.5 Price Impact
Next, we compute the price impact function [10], or the change to marginal price given a trade of size , as , the derivative of the price function. Equation 6 shows the price impact function for power roots.
(6) |
Refer to [10] for derivations for the constant sum and product functions. It is straightforward to show that those are special cases of Equation 6 by and . Figure 4(b) shows the price impact for constant power root market makers of varying . When , the price impact function approaches 0 slope, which makes sense given that the marginal price is constant when . When , the price impact function has a faster increasing slope, representing higher levels of price sensitivity.
Practically, we note that price impact function is closely related to slippage as a constant function market maker with high price impact will likely experience higher slippage rates. As a base example, when , there is zero slippage due to the constant marginal price, or equivalently, its price impact function having zero slope.


In summary, there is a trade-off between impermanent loss and price impact, which is perhaps not surprising. For large negative powers, the invariant has low loss for LPs but high price slippage for traders. For powers close to one, the opposite is true.
4.6 Value Derivatives
Since impermanent loss can be difficult to interpret, we also compute the value as well as derivatives with respect to price, such as delta and gamma . Continuing from Section 4.4, we can simplify the expression for value using only the liquidity amount and the marginal price , removing reserves from the equation:
(7) |
Taking first and second derivatives, we arrive at closed form expressions for the greeks:
(8) |
In the following figure, we visualize the greeks for a variety of powers .



In Figure 5, we vary the marginal price between 0 and 1 and study the effect on value, delta, and gamma. For each subplot, we normalize the y axis to be between 0 and 1 for visual comparison. As such, the reader should focus on the shape rather than the magnitudes. We make a few observations. First, in Figure 5(a), for positive powers, the larger the power, the less curvature in the value function. Interestingly, for larger negative powers, we observe a similar behavior, as and have similar shape. Recalling payoff functions from Figure 2, we note that Figure 5(a) shows the same plot in lower dimensions.
Second, we observe more diverse delta functions as spans between 0 and 1 in Figure 5(b). For smaller positive powers, we observe delta to increase exponentially as price goes to zero, whereas for larger positive powers, we observe delta to increase exponentially as price grows large. For powers close to , we observe near linear change in delta. Third, in Figure 5(c), we observe that subtle differences in value are exaggerated as gamma functions across powers differ in behavior. This large range in gamma functions may suggest power roots to play a role in structured products to achieve a desired gamma. We note that delta and gamma for negatives powers closely mimic those of constant product.
4.7 Reserve Depletion
A benefit of the Uniswap trading function () is a guarantee of no reserve depletion. For any value of token and any constant , we have a . In practice, this implies no trade can conduct a trade large enough to deplete resources. This property, however, does not hold for the sum invariant (), where the analogous expression suggests that , otherwise .
The power root invariant with guarantees no reserve depletion. However for powers it, like the sum, has the same point of reserve depletion, namely . One can see this from the equation , which implies is required. As , this constraint is removed, and power root collapses to product. However, for closer to 0, we observe more incentives to not deplete reserves due to price increases, though it is theoretically possible. For example, for close to 0, the marginal price is . If is near depleted (and near ), the price will be tending towards .

Figure 6 visualizes the relative price between two tokens as a function of trade size in token . Constant sum and product are shown with special markers. We make a few observations. First, the relative price decreases as trade size grows, which is expected given the concavity of the trading functions. Second, for , the plotted lines intersect the x-axis, representing points of depleted reserves (for , we have the point of depletion at ). For , the plotted lines never intersect the x-axis. Third, for , there are segments where the price is better than constant product, which suggests better conditions for traders assuming small trades. This is not the case for large trades. Clipper [7] formalized this approach by only allowing small trades. For , prices are bounded above by constant product (), meaning traders face a higher cost.
5 Summary
We proposed a new constant function market maker using the power root equation with the corresponding payoff (value) function for liquidity providers as with . Inspired by economic production functions, we showed this choice to be a generalization of the constant reserve, sum, and product. The constant power root function interpolates between the constant reserve, sum, and product functions in terms of marginal price, price impact, and impermanent loss. In our analysis, we observe a trade-off between low slippage and impermanent loss, and susceptibility to reserve depletion.
Acknowledgement
A special thanks must go to Guillaume Lambert, Alok Vasudev, Theo Diamandis, Dan Robinson, and Joey Santoro for their helpful feedback and discussion.
References
- [1] Guillermo Angeris, Alex Evans, and Tarun Chitra. Replicating market makers. arXiv preprint arXiv:2103.14769, 2021.
- [2] Guillermo Angeris, Hsien-Tang Kao, Rei Chiang, Charlie Noyes, and Tarun Chitra. An analysis of uniswap markets. arXiv preprint arXiv:1911.03380, 2019.
- [3] Hayden Adams, Noah Zinsmeister, Moody Salem, River Keefer, and Dan Robinson. Uniswap v3 core. Technical report, Technical report, 2021.
- [4] Fernando Martinelli and Nikolai Mushegian. A non-custodial portfolio manager, liquidity provider, and price sensor. URl: https://balancer. finance/whitepaper, 2019.
- [5] Alex Evans. Liquidity provider returns in geometric mean markets. arXiv preprint arXiv:2006.08806, 2020.
- [6] Michael Egorov. Stableswap-efficient mechanism for stablecoin liquidity. Retrieved Feb, 24:2021, 2019.
- [7] Abraham Othman. New invariants for automated market making. 2021.
- [8] Allan Niemerg, Dan Robinson, and Lev Livnev. Yieldspace: An automated liquidity provider for fixed yield tokens. 2020.
- [9] Guillermo Angeris and Tarun Chitra. Improved price oracles: Constant function market makers. In Proceedings of the 2nd ACM Conference on Advances in Financial Technologies, pages 80–91, 2020.
- [10] Guillermo Angeris, Alex Evans, and Tarun Chitra. When does the tail wag the dog? curvature and market making. arXiv preprint arXiv:2012.08040, 2020.