Geometric mean market makers (G3Ms), such as Uniswap and Balancer, comprise a popular class of automated market makers (AMMs) defined by the following rule: the reserves of the AMM before and after each trade must have the same (weighted) geometric mean. This paper extends several results known for constant-weight G3Ms to the general case of G3Ms with time-varying and potentially stochastic weights. These results include the returns and no-arbitrage prices of liquidity pool (LP) shares that investors receive for supplying liquidity to G3Ms. Using these expressions, we show how to create G3Ms whose LP shares replicate the payoffs of financial derivatives. The resulting hedges are model-independent and exact for derivative contracts whose payoff functions satisfy an elasticity constraint. These strategies allow LP shares to replicate various trading strategies and financial contracts, including standard options. G3Ms are thus shown to be capable of recreating a variety of active trading strategies through passive positions in LP shares.
Decentralized Finance (DeFi) consists of a set of protocols and applications that provide automated financial services through smart contracts. At the time of writing, it is estimated that over $1.5 billion USD  is being utilized by DeFi systems. DeFi applications often employ automated market makers (AMMs) to offer standard financial services such as trading  and lending , as well as less conventional products such as perpetual swaps  and flash loans .
Among AMM designs, geometric mean market makers (G3Ms) are most common to Decentralized Exchanges (DEXs) such as Uniswap  and Balancer . In G3Ms, liquidity providers deposit assets into the reserves of a smart contract. This contract permits third parties to submit trades against supplied reserves, executing a trade only if the weighted geometric mean of reserves after the trade is equal to the one before. In exchange for supplying reserves to the contract, liquidity providers are issued liquidity pool (LP) shares in proportion to their contributions. LP shares may be redeemed for a proportional share of the pool’s reserves at any time. The marginal prices offered by G3Ms are known to closely track prices on more liquid trading venues . This occurs because arbitrageurs are incentivized to respond to price fluctuations by submitting trades that rebalance reserves to target weights . This activity is akin to automated Exchange Traded Fund (ETF) rebalancing.
While a formal definition of G3Ms is provided in Section 2.1, it is instructive to examine a simple numerical example first. Consider two investors who each add 5 units of asset and 5 units of asset to a G3M that assigns weights to asset and to asset . The weighted geometric mean of reserves is then . If a trader sends 1 unit of asset to the smart contract and demands 5 units of asset in exchange, the trade will be rejected, as the post-trade weighted mean would be . However, a trade that adds 1 unit of asset in exchange for 0.466 units of asset will be accepted, as . Clearly, the price offered by the G3M in this trade is 1 unit of asset which is added to the LP, for 0.466 units of asset which is removed from the LP. This price depends only on the pre-trade reserves and the weights , . After the trade, each investor’s LP shares are redeemable for half of the reserves, namely 5.5 units of asset and 4.767 units of asset . We refer to the total value of reserves that the LP shares can be redeemed for as their “payoff."
The marginal price offered by the G3M is the amount of asset a trader receives in exchange for a small quantity of asset (and vice versa). When the marginal price offered by the G3M doesn’t reflect the true market price, an arbitrage opportunity results to adjust the reserves of the G3M. For example, consider again the case where the LP consists of 10 units of asset and 10 units of asset . If the price of asset is USD and the price of asset is USD, then the LP holds USD worth of assets, of which is held in asset and in asset . This allocation agrees with the respective weight of each asset, and . If the external price of asset drops to USD, then, to restore the allocation so that of the LP’s value is in asset and in asset , a trader sends units of asset to the smart contract. In exchange, the contract sends units of asset to the trader, maintaining the geometric mean of . The trader thus makes an arbitrage profit of . After the trade, the reserves are updated to in asset and in asset . The total value held in the LP is USD, of which is held in asset and in asset (again corresponding to the respective weights of the two assets). One can check that sending any amount of asset to the G3M other than results in lower arbitrage profits for the trader. For example, sending 2 units would yield a profit of 1.06, while sending 3 units would yield a profit of 1.08. This insight is formalized in , which show that adjusting the reserves so that of the LP’s value is held in asset and in asset B maximizes arbitrage profits for the trader. Traders are therefore incentivized to respond to price changes by rebalancing the reserves of the G3M to match the target weights.
The most well-studied examples of G3Ms are the Uniswap and Balancer protocols. Uniswap exclusively supports LPs consisting of two assets whose reserves are equally weighted. This simplifies the geometric mean to a “constant product rule" that allows traders to perform any trade that preserves the product of reserves. The simplicity and apparent effectiveness of Uniswap has spurred other applications to adopt the constant product rule .
Balancer generalizes the constant product formula by allowing pools of multiple assets as well as configurable weights. Balancer also supports dynamic weights that can be updated according to a set of rules . For example, this allows the LP to gradually decrease its exposure to an asset over time  or to adjust weights to favor assets that exhibit lower volatility .
As of this writing, Uniswap has nearly $60 million USD in reserves and facilitates over $15 million USD in daily trading volume, while Balancer has over $70 million USD in reserves and facilitates nearly $4 million USD in daily trading volume . Amid growing interest in G3Ms, DeFi lending platforms have started accepting LP shares as collateral for secured loans . As G3Ms are attracting larger amounts of capital and their LP shares are being used in increasingly complex financial transactions, there is a rising need for a unified framework to study the return and price characteristics of LP shares in G3Ms.
AMMs have been widely studied since the the introduction of the popular logarithmic market scoring rule . The present paper focuses on LP share returns in G3Ms, which are a popular class of AMMs pioneered by . The most relevant prior work in this context is that of . Specifically,  derives returns and prices of LP shares in Uniswap, which consists of two equally-weighted assets, while  derives an expression for LP share returns in constant-weight G3Ms consisting of more than two assets. For Uniswap,  replicates LP share payoffs with the spanning formula of  and demonstrates approximate hedging techniques using portfolios consisting of Uniswap LP shares and positions in futures contracts.
This paper studies LP share returns in generalized no-fee G3Ms. The static-weight payoff results in  and  are extended to G3Ms with dynamic weights. In a parametric setting, the no-arbitrage prices of LP shares are shown to follow directly from these payoff solutions. The resulting prices can be used to analyze certain properties of LP share returns, such as per-trade losses and value leakage from volatility. This paper also shows how to use LP shares to replicate target payoffs. We show that setting the weight of a G3M equal to the elasticity of a given payoff function ensures that the LP shares replicate the payoff. The elasticity of a derivative’s payoff is defined as the percent change in the derivative’s value per percent change in the price of the underlying asset it references. For differentiable payoff functions that have elasticity between zero and one, the resulting hedges are exact and do not depend on the model one uses for the underlying asset price. Replication is also studied under more general assumptions by utilizing parametric hedges. G3M LPs are therefore shown to recreate the payouts of dynamic trading strategies through passive positions in LP shares. Rather than using dynamic trading to replicate a desired payoff, a user may instead purchase and hold the corresponding LPs, while rebalancing is handled by an external group of arbitrage-seeking traders.
A Geometric Mean Market Maker (G3M) is an Automated Market Maker (AMM)  whose feasible trade set is determined by the weighted geometric mean of its reserves. Specifically, for a set of assets with corresponding weight vector and reserve vector with , a G3M enforces the geometric mean
for all . By assumption, the weight vector is satisfies
A feasible trade is one that results in an updated reserve vector for which
In this paper, we work with G3Ms with no fees. This allows us to greatly simplify the results, while providing a close approximation for many real-world G3Ms that charge traders a small fee. In this setting, let the feasible trades for a G3M be defined as the set of vectors of the form with that satisfy
with representing the amount of asset that a trader will deposit into the pool. (Negative values indicate amounts the trader removes from the pool.)
For a given weighted geometric mean, , the price offered by a G3M depends only on the size of the trade and the balances of reserves in the LP. Denote the prices of the assets in the reserve by the vector with . As shown in , no-arbitrage requires that for all ,
That is, if the weight-normalized ratio of reserves for two assets in the LP is equal to the ratio of their prices, then no arbitrage opportunity exists. We denote the payoff of the LP at time by . Since LP shares can be redeemed at any time for their underlying assets, their payoff is equal to the value of the underlying reserves:
From Equation 4 and Equation 5, we have for all
Note that Equation 6 is equivalent to . In other words, the no-arbitrage condition ensures that the value of the position in asset represents a proportion of the LP’s overall value. As shown in  and , should asset values in the LP deviate from the target weights, an arbitrage opportunity is created to restore Equation 6. To preclude arbitrage, the G3M LP is therefore continually rebalanced so that the proportion of value allocated to each asset matches its target weight, , akin to an ETF. Using Equation 4 and Equation 6, and noting the restriction Equation 2, one can derive the LP share payoff (total value of assets it can be redeemed for) as a function of the weighted geometric mean :
where in the second step we use . In the case where weights are constant, all trades will preserve the weighted geometric mean, so for all . Section 3 makes use of this fact to price G3Ms with constant weights using Equation 7. When is a more general adapted process, we must specify the evolution of , which may be a stochastic process. This problem is taken up in Section 4.
Let be a conventional filtered probability space . Assume frictionless markets, and consider a financial market that consists of risky assets and one money market (risk-free) asset. For pricing applications, assume further that there exists an equivalent probability measure such that the money market asset and risky assets have respective stochastic differentials
Here, is a standard Brownian motion under , is the riskless interest rate and the components of the volatility matrix, , are adapted processes. Allowing pairwise correlation between risky assets prices, we can rewrite Equation 9 as
where each is a Brownian motion (by Lévy’s theorem for characterizing a Brownian motion), and is the volatility of asset which we assume is never zero. Define
where is the instantaneous correlation between the Brownian motions and . It can be shown that .
In this section, the prices associated with the payoff in Equation 7 are derived in the case of constant-weight G3Ms. Working with G3Ms consisting of risky assets, we use the model of Section 2.2 and assume the volatility matrix and the interest rate price process are constant; we set and for all . Note when the weights are fixed, will be constant. The value of an -asset LP with constant weights is therefore given by the discounted time- expectation of Equation 7 under the risk-neutral probability measure, . Denote the value of the LP share at time by
where is the vector of time- prices for the reserve assets in the LP. This leads to the following Proposition.
Proposition 1: The price of the LP share with payoff found in Equation 7 and constant weights is given by the discounted expectation in Equation 11 and is equal to
From the general case addressed in Proposition 1, one can recover the result in  for the simpler Uniswap constant-product market.
Corollary 1.1 (Pricing Uniswap LP shares): Define Uniswap as a G3M with assets, and , and . Then the Uniswap LP has
In particular, we prove that is the volatility of the price ratio for the two assets in the LP.
To understand the content of in Equation 13 and Equation 14, recall the observation in Section 2.1 that no-arbitrage requires the G3M LP to continually rebalance its reserves to match the target weights. Should asset values in the LP deviate from the target weights, an arbitrage opportunity is created to restore Equation 6. By definition, arbitrage results in a greater value of assets exiting the LP than entering, which reduces the value of the LP shares. LP shares therefore incur rebalancing costs due to arbitrage in order to enforce a target portfolio composition. To understand the magnitude of these costs, contrast the LP share payoff in this situation with that resulting from continually rebalancing a portfolio to fixed weights under zero transaction costs. From , the stochastic differential for this portfolio is given by
In Appendix A.4, we show that this portfolio strategy has payoff
Contrasting Equation 18 with Equation 7 shows that represents the loss LP shares incur relative to a constant-mix portfolio with equivalent weights. This coincides with the well-documented result of volatility harvesting  which states that a continuously-rebalanced constant-mix portfolio has a greater growth rate than the weighted average of its component assets. The constant-mix portfolio in Equation 18 benefits from volatility through the term, while the no-fee LP in Equation 7 does not. This is the cause of the supermartingale behavior observed in Equation 13. One can therefore replicate the value of a fixed-weight G3M LP share with less initial capital by continuously rebalancing to the same target weights in a frictionless market. Informally, this occurs because the G3M lags the market during rebalancing. LP rebalancing occurs through arbitrage which results when LP reserves do not reflect updated market prices. LP shares therefore rebalance at suboptimal prices relative to conventional constant-mix portfolios.
Figure 1 plots using an example of a two-asset LP share with assets and . Note that Equation 15 is minimized in the Uniswap configuration, where ; this represents the maximum loss relative to the constant-mix portfolio. Meanwhile, is zero when and when ; in these cases the LP shares coincide with buy-and-hold portfolios, and there are no opportunities for trading against the assets of the pool (hence no arbitrage losses). The quantity is increasing with respect to the correlation coefficient . The higher the correlation coefficient, the smaller the price deviations are expected to be for the assets in the LP; thus, high values of limit arbitrage losses. Similarly, higher levels of volatility for one of the two assets in the LP produce greater volatility losses. In the case two-asset case, when and , is zero regardless of the choice of weight, as there is no expected trading (price moves are expected to have identical magnitude and direction).
Taking the first derivative of Equation 12 with respect to the stock price (“delta" in options terminology) yields , which is non-negative. Taking the second derivative (“gamma") gives , which, by the restrictions on , is non-positive. The constant-weight LP will therefore decrease its unit position in asset as its price increases (and conversely increase its unit position as price declines). The resulting payoff is concave in , an effect Uniswap traders refer to as “impermanent loss." Specifically, regardless of the direction of a price movement, the LP share will decrease in value relative to the buy-and-hold portfolio, which has a gamma of zero. Note that the constant-mix portfolio without rebalancing costs described above also exhibits a negative gamma, but, unlike the G3M LP share, it benefits from volatility in exchange (this is the content of Equation 18). The LP share’s gamma is minimized (impermanent loss is highest) when the weight of asset is , while it is zero when (LP holds only asset ) and when (no exposure to ). As noted in , this comes with a direct trade-off to the slippage offered to traders in the pool.
In this section, the payoffs for G3M LP shares are derived for the case where the weight vector is an -measurable process. From an initial weighted geometric mean , assume the process is generated by updating the weight vector at a sequence of re-weighting times . The weight vector is updated at the left endpoint of each interval and is then held constant until the next re-weighting time. This ensures that remains constant on each interval but is allowed to vary across intervals. Assume the initial weighted geometric mean is given by
By assumption, updating satisfies and . Since the weighted geometric mean is constant within each interval, at each we have
where and . Repeating this procedure starting from we get
Solving for in the no-arbitrage condition of Equation 6, we have
Again using ,
This provides the discrete-time formula for the weighted geometric mean at time :
Note that this discrete-time formulation is the most realistic setting for G3Ms deployed on public blockchains such as Ethereum that have positive-length time intervals between blocks. In this setting, each weight adjustment will present an arbitrage opportunity that results in some value loss for LP shares.
This section studies LP returns in the case where weights are allowed to vary continuously. The key result of this section is the following.
Proposition 2 (Payoff for dynamic-weight LPs): Assume each component weight function , is continuous and has bounded variation, and denote the length of the longest interval in Equation 19 by . Then taking the limit in Equation 19 as gives the weighted geometric mean for all
with corresponding payoff function
This is the payoff function we work with in the remaining sections.
LP prices computed by taking discounted risk-neutral expectations in Equation 20 will depend on the stochastic process chosen for the weight vector . However, if the weight vector is a deterministic function of time, the solution can be simplified. In this case, LP prices can be computed directly given the model in Section 2.2.
Proposition 3 (Pricing LPs with deterministic time-varying weights): If each component of is an -measurable deterministic function of , then the corresponding LP share price is given by the discounted expectation under the risk-neutral measure of Equation 20 and is equal to
These prices are relevant to applications that require G3M weights to be adjusted according to a fixed schedule. Typically, an LP will reduce the weight of one of its assets until some target weight is reached. This creates an arbitrage opportunity to remove units of the asset whose weight is declining in favor of the other reserve assets. This has been proposed as a mechanism for bootstrapping liquidity in nascent markets . Similarly, it may be desirable for an LP to decrease its exposure to assets with fixed maturities, such as options and bonds, as these near expiry.
This section shows how to select G3M weight functions to ensure that the resulting payoffs of the LP shares replicate the payoffs of derivative claims on the price of an asset. We work with a two-asset G3M that consists of a risky asset with weight and a position in the risk-free asset with weight , where is the price of the risky asset. Consider a contract with payoff given by the real-valued function .1 Rewriting Equation 20 as
we solve for the weight such that the LP and the derivative contract have the same payoff for all :2
Proposition 4 (Replicating weight function): Let be differentiable with respect to for . Then the solution for in Equation 24 with initial condition is given by
where is the partial derivative of with respect to . The payoff can be replicated by a G3M LP provided that is continuous in and
Equation 25 is the elasticity of a contingent claim, i.e., the percent change in the value of the derivative given a one-percent change in the price of the risky asset (it is also termed “lambda" or “omega" in derivatives parlance). The condition in Equation 26 is due to the restrictions Equation 2 and Equation 3 on the weights of the G3M. Note that if short-selling an LP share is possible, one can also replicate claims with . The condition Equation 26 states that the G3M cannot be used to gain leverage on its reserve assets. The maximum elasticity of a contingent claim with respect to the risky asset is therefore attained when when the pool consists exclusively of the risky asset. For differentiable claims where Equation 26 is satisfied, Equation 25 guarantees that holding an LP share provides an exact static hedge of the contingent claim regardless of the model one uses for the underlying asset price. In practice, continuous weight adjustments will not be possible in the discrete-time setting of public blockchains. Discrete weight adjustments will result in arbitrage opportunities that reduce the value of the pool. This implies that the LP share will in practice provide a sub-hedge for , though the introduction of fees can be used to offset all or part of these relative losses.
It will often be possible to relax the assumptions of Proposition 4 by instead replicating the value of the contract by replacing in Equation 25 with its discounted expectation under the risk-neutral measure. Such pricing formulae will typically require the use of a model such as that of Section 2.2 for the underlying price. The resulting LP share will provide a parametric hedge for the derivative asset, and the accuracy of the hedge will depend on the model chosen. For concreteness, we provide an example below.
Example (Protective put): A protective put  is a popular risk-management strategy wherein an investor buys an asset alongside a put option on the same asset. In exchange for the option premium, the strategy allows the investor to profit from price appreciation while being protected from losses. Given a model for the option price, we can show that a G3M LP can be programmed to synthetically replicate a protective put. For example, using the Black–Scholes formula  for the value of a put option, we have
where is the expiration, is the strike price, is the standard normal CDF, and
where is the volatility of the risky asset. It can be shown that the protective put claim has elasticity
Note that the numerator is equal to the price of the asset multiplied by one plus the “put delta," the first derivative of the put with respect to . This quantity is always non-negative, as and . The denominator is also non=negative, as the value of the option is given by the time- risk-neutral expectation of . Therefore . Furthermore,
We conclude that setting the G3M’s weight for the risky asset to Equation 27 replicates a protective put on the risky asset with strike and expiry . Using the same procedure, we can show that an LP can replicate a covered call, which consists of a long position in an asset alongside a short position in a call option written on the same asset. Figure 2 shows the weight function that replicates a protective put. As the price of the underlying asset increases, the weight tends to one, where the LP consists entirely of the risky asset. As price declines, the LP increases the weight of the money market (risk-free) asset. The relationship with time to maturity depends on whether the put option is “in the money" (above the strike price ). If the put is “at the money" (), then the G3M weight is regardless of time to maturity. If the put is near expiry and , then the G3M places a greater weight on the risky asset. If the put is near expiry and , then the G3M places a greater weight on the risk-free asset. The replicating weight of the protective put in the risky asset is therefore increasing with respect to the probability that the put will expire out of the money.
A number of interesting derivative contracts, such as pure (“naked") options, often exhibit elasticity far greater than one. There are two approaches to replicating such contracts. The first involves taking offsetting positions in addition to the LP. For example, holding an LP that replicates a protective put while also establishing a short position in the underlying asset will replicate the payoff of the put option. Using the approach of the proceeding example, it can be shown that a portfolio consisting of a call option plus a position worth in the money market satisfies Equation 26. Holding the replicating LP share of this portfolio in addition to an offseting short position of in the money market will replicate the pure call option. The offsetting positions in the risky or money market assets can be interpreted as borrowing the respective assets and placing them in the replicating LP. This could be facilitated by an existing lending protocol such as  that accepts LP shares as collateral for secured loans. For example, to replicate a naked put option, the investor would place an amount of capital equal to the initial price of the option in a G3M that replicates a protective put. At the same time, the lending protocol would supply one unit of the risky asset to the G3M, while taking the corresponding LP shares as collateral. Even if the option expires worthless, the lender can be assured that the replicating LP will be at least as valuable as the risky asset that was lent, ensuring repayment of the loan. At expiration, after repaying the borrowed asset to the lending protocol, the investor’s remaining position will have equal value to that of the pure put option (assuming the model used in constructing the hedge was correctly calibrated).
A second approach to replicating claims with elasticity greater than one involves adding derivatives to a G3M’s reserves. The use of levered assets can expand the range of derivatives that an LP share can be used to replicate. For example, in place of the risky asset one can include a derivative on the risky asset in the LP’s reserves with time- price . In this case Equation 23 becomes
and we have the following solution. For simplicity, we work with the single-variable payoff, .
Corollary 4.1 (Replication with derivative assets): Let and be differentiable on . Then the solution to when is given by Equation 28 and with initial condition is
Replication with a G3M LP requires that
G3Ms can therefore replicate any claim whose logarithmic derivative is no larger than that of its reserve asset price function. The logarithmic derivatives of the payoff and price determine their infinitesimal relative changes and can informally be thought of as a measure of leverage. When the target claim is no more levered than the reserve claim, replication will be possible through a static position in the LP.
This work studies the returns investors receive for contributing reserves to G3Ms. We derive explicit payoff and pricing functions for LP shares in G3Ms that utilize both static and dynamic weights. We show that LP share payoffs of G3Ms that do not charge fees are supermartingales under the risk-neutral probability measure, due to having higher rebalancing costs than constant-mix portfolios. Utilizing dynamic weights, we show that G3M LP shares can be used to provide exact static hedges for arbitrary financial contracts whose payoffs have elasticity between zero and one. In a parametric setting, we demonstrate how to use offsetting positions and external leverage to replicate more general financial contracts, such as standard options.
A question left open by this paper concerns fees. In practice, most G3Ms charge fees that introduce path dependencies in LP share payoffs . As fees may alter both the frequency and the cost of G3M rebalancing, it may be instructive to consider the corresponding constant-mix portfolio under rebalancing restrictions and transaction costs .
The author would like to thank Guillermo Angeris, Tarun Chitra, Alexandre Obadia and Assimakis Kattis for their feedback on this paper.
We establish a definition that will be useful in the proofs of Proposition 1 and Proposition 3. For , and given that the components of are square-integrable by the restrictions in Equation 2 and Equation 3, we can define
which we assume is non-zero. (As will be discussed in the proofs of Proposition 1 and Proposition 3, represents the volatility of the weighted geometric mean of the risky asset prices.) We can use these definitions to write
It is trivial to verify that has quadratic variation . Being the sum of continuous martingales, is therefore a Brownian motion by Lévy’s theorem.
The proof of Proposition 1 has two parts: first we prove Equation 13, and then we prove that the quantity defined in Equation 14 is at most zero.
i) The proof of Equation 13 will proceed as follows: the differential for the weighted geometric mean of the prices will give a geometric Brownian motion, from which Equation 13 follows immediately by taking expectations in Equation 11. Note that is given by
Applying Itô’s lemma results in the differential
which defines a geometric Brownian motion with mean and volatility . Note further that
As shown shown in Appendix A.1, we may define
which is a Brownian motion. We can then rewrite Equation 31 as
which is a geometric Brownian motion with mean and volatility . We obtain the result in Equation 13 by taking the expectation in Equation 11. The result in Equation 12 follows from noting that , which follows from Equation 7.
ii) Next, we show that (where is defined in Equation 14). Since , this is equivalent to showing that
Recall the restrictions Equation 2 and Equation 3 and the assumption that are positive constants. Since the second summand is positive and , it suffices to show that
The left-hand side can be rewritten as
where the second line follows from Equation 2. Relabeling indices in the first sum gives
The volatility will follow from the expression for the price ratio. The stochastic differential for the ratio of the prices of two assets is given by
note that is a Brownian motion. Therefore