---
# System prepended metadata

title: Balancer_wealth
tags: [AMM, Research]

---

# Wealth Growth and Optimization in G3Ms


## Introduction

### G3Ms in DeFi
*Decentralized Finance (DeFi)* has witnessed the emergence of *Automated Market Makers (AMMs)* as a cornerstone of its ecosystem. *Geometric Mean Market Makers (G3Ms)* represent a significant class of AMMs that utilize a constant geometric mean to determine the relative prices of assets within liquidity pools. These pools enable users to trade digital assets in a decentralized and permissionless manner, eliminating the need for traditional order books and intermediaries. G3Ms have revolutionized how assets are exchanged in DeFi, offering continuous liquidity and automated price discovery. Prominent examples of G3Ms include Uniswap, known for its simplicity and widespread adoption, and Balancer, distinguished by its flexibility in pool composition.


### Balancer as a Versatile AMM
While many early AMMs focused on pools with a fixed ratio of two assets, Balancer introduces a more versatile approach. Balancer allows for the creation of liquidity pools with up to eight different tokens and customizable weights. This flexibility enables users to construct pools that function as *decentralized, automated index funds*. In essence, a Balancer pool can be designed to mimic a traditional investment portfolio, automatically rebalancing its holdings based on the predefined weights. This positions Balancer, and G3Ms more broadly, as a key component of the emerging decentralized index infrastructure within DeFi, offering automated portfolio management and diversification tools.


### Overview of Open Problems
This note delves into the dynamics of G3Ms, with a particular focus on Balancer, and highlights several key open problems that present exciting avenues for research in mathematical finance and stochastic control. These problems include:

* **LP Wealth Growth:** Analyzing liquidity providers' (LPs) wealth growth and excess return, with the goal of developing a *"decentralized" stochastic portfolio theory (SPT)*.
* **Optimal Fee Tiers:** Determining the optimal transaction fee structure to maximize the wealth growth for liquidity providers while maintaining market efficiency.
* **Merton Portfolio Problem:** Applying the classical Merton portfolio problem to the context of G3Ms to find optimal asset allocation strategies for liquidity providers.

The goal of this note is to provide a concise overview of the mathematical models governing G3M behavior, to articulate the challenges in the field, and to stimulate further investigation into these important research directions within the context of decentralized financial infrastructure.



## G3M Trading Mechanisms


### Core Concepts and Notation
At the heart of G3Ms lies the concept of a *liquidity pool*, a collection of digital assets locked in a smart contract. These pools enable trading by automatically adjusting asset prices based on the pool's composition. The key components of a G3M include the quantities of each asset within the pool, the weights assigned to those assets, and the resulting prices. To analyze G3M dynamics effectively, we introduce the following notation:

* $x_i$: Represents the quantity of the $i$-th asset in the pool. Understanding how $x_i$ changes with trades is crucial for analyzing inventory risk and price impact.
* $w_i$: Denotes the weight assigned to the $i$-th asset in the pool. The weights determine the pool's asset allocation and significantly influence its rebalancing behavior.
* $P_i$: Represents the price of the $i$-th asset relative to a numeraire asset (e.g., a stablecoin). Tracking $P_i$ is essential for understanding price discovery and arbitrage opportunities.
* $\ell$: Represents the total liquidity in the pool. Changes in $\ell$ reflect the overall activity and capital within the pool, impacting its stability and trading capacity.


### Constant-Weight G3Ms
A *Constant-Weight* Geometric Mean Market Maker (G3M) is a type of AMM where the weights of the assets in the pool remain constant. The mechanism is defined by the following equation:

$$
\prod_{i=0}^n x_i^{w_i} = \ell
$$

where
* $x_i$ is the quantity of the $i$-th asset in the pool.
* $w_i$ is the weight assigned to the $i$-th asset.
* $\ell$ is the total liquidity in the pool.

The weights, denoted as $\mathbf{w} = (w_0,w_1,\dots, w_n)$, must satisfy the following constraints:

$$
\sum_{i=0}^n w_i = 1, \quad 0 < w_i < 1.
$$

These constraints ensure that the weights are positive and sum up to 1, representing the proportion of each asset's value in the total pool value.  The equation governs how the pool rebalances after trades.

#### Trading Mechanism
In a simplified scenario without transaction costs, a trade is considered feasible if it maintains the constant weighted geometric mean of the assets in the pool. This means that after a trade, the following equation holds:

$$
\prod_{i=0}^n x_i^{w_i} = \prod_{i=0}^n (x_i + \Delta_i)^{w_i}
$$

where $\Delta_i$ represents the change in the quantity of the $i$-th asset due to the trade. This equation dictates how the asset quantities must adjust to accommodate a trade while preserving the pool's fundamental invariant.

The relative price of asset $i$ with respect to asset $j$, denoted as $P_{ij}$, is calculated as:

$$
P_{ij} = \frac{P_i}{P_j} = \frac{x_j / w_j}{x_i / w_i}
$$

In particular, the price of asset i relative to the numeraire (asset 0) is:

$$
P_i = P_{i0} = \frac{x_0 / w_0}{x_i / w_i}
$$

These equations show that the relative price is determined by the ratio of the asset quantities adjusted by their respective weights. This mechanism ensures that the pool's prices reflect the relative supply and demand for the assets.

#### Continuous Trading Mechanism with Transaction Costs
In reality, trades incur transaction costs, which need to be incorporated into the model. Let $\Delta$ represent a feasible trade, and define the following sets:

* $I=\{i∣\Delta_i>0\}$: The set of assets being deposited into the pool.
* $J=\{i∣\Delta_i<0\}$: The set of assets being withdrawn from the pool.

The continuous trading dynamics with transaction costs can be described by maintaining the following quantity constant:

$$
\prod_{i \notin I} x_i^{w_i} \prod_{i \in I} x_i^{\gamma w_i}
$$

where $\gamma$ ($0 < \gamma < 1$) is the transaction cost parameter. This equation shows that the assets being deposited are effectively "discounted" by the transaction cost.

Differentiating both sides, we get:

$$
0 = d(\prod_{i \not\in I} x_i^{w_i} \prod_{i \in I} x_i^{\gamma w_i}).
$$

Hence,

$$
0 = \sum_{i \not\in I} w_i \frac{dx_i}{x_i} +  \sum_{i \in I} \gamma w_i \frac{dx_i}{x_i}.
$$

In a special case where a trader sells asset i to obtain asset j from the pool (meaning $I = \{i\}$ and $J = \{j\}$), the relation simplifies to:

$$
\gamma w_i \frac{dx_i}{x_i} + w_j \frac{dx_j}{x_j} = 0.
$$

##### Liquidity Dynamics
With transaction costs, liquidity changes with trading activity as follows:

$$
\frac{d \ell}{\ell} = \sum_{i=0}^n w_i \frac{dx_i}{x_i} = \sum_{i \in I} (1 - γ) w_i \frac{dx_i}{x_i}
$$

This indicates that trading increases the pool's liquidity, and the increase is proportional to the transaction costs.

##### Price Dynamics
The relative pool price, $P_{ij}$, changes with trades involving assets $i$ and $j$:

$$
\frac{dP_{ij}}{P_{ij}} 
= \frac{dx_j}{x_j} - \frac{dx_i}{x_i}
= - (1 + \gamma \frac{w_i}{w_j}) \frac{dx_i}{x_i}
$$

- If $dx_i > 0$, relative pool price $P_{ij}$ goes down.
- If $dx_j > 0$, relative pool price $P_{ij}$ goes up.

In either case, the trader's trading activity amplifies the movement (market impact) of the relative pool price.

#### Infinitesimal Exchange Rate
The infinitesimal exchange rate, denoted as $-\frac{dx_j}{dx_i}$, is given by:

$$
-\frac{dx_j}{dx_i} =  \gamma \frac{x_j/w_j}{x_i/w_i} = \gamma P_{ij},
$$

where $P_{ij}$ represents the relative price of asset $i$ in terms of asset $j$, adjusted by the transaction cost.

#### LP Value
For a liquidity provider, the value of their LP tokens, denoted by $V$, can be expressed as:

$$
V = \sum_{i=0}^n P_i x_i.
$$

The following properties hold true:

* $\frac{P_j}{P_i} = \frac{x_i/w_i}{x_j/w_j}$ for each $i \neq j$;
* $V = \frac{P_i x_i}{w_i}$ for each $i$.

It follows that

\begin{split}
V
&= \frac{P_j x_j}{w_j} \prod_{i=0}^n \left( \frac{x_i P_i / w_i}{x_j P_j / w_j} \right)^{w_i} \\
&= \prod_{j=0}^n \left( \frac{x_i P_i}{w_i} \right)^{w_i} \\
&= \ell  \prod_{j=0}^n \left( \frac{P_i}{w_i} \right)^{w_i}.
\end{split}

Therefore, the logarithm of the LP value can be expressed as

$$
\ln V = \ln \ell + \sum_{i=1}^n w_i \ln P_i - \sum_{i=0}^n w_i \ln w_i.
$$

This equation is crucial for analyzing the returns and risks faced by liquidity providers.


### Dynamic-Weight G3Ms
*Dynamic-Weight* Geometric Mean Market Makers (G3Ms) extend the concept of constant-weight G3Ms by allowing the weights assigned to assets in the pool to vary over time. This flexibility allows for more complex and adaptive trading strategies compared to constant-weight G3Ms. The dynamic weight adjustment can be managed through various mechanisms, including:

* **Predefined Rules:** Weights can be adjusted based on predefined rules, such as automatically rebalancing the portfolio based on market conditions or price volatility.
* **Algorithmic Adjustments:** Weights can be adjusted algorithmically based on real-time market data and other relevant factors.

This flexibility makes dynamic-weight G3Ms well-suited for implementing medium-frequency trading strategies and adapting to evolving market conditions.

#### Operational Procedure
In a dynamic-weight G3M without transaction costs, the pool's state is updated in two steps:

1. **Transaction Processing:** The initial step involves processing transactions based on the previous weights $w_i(t−)$ and the geometric mean rule:
$$
\ell(t^-) = \prod_{i=0}^n x_i(t^-)^{w_i(t^-)} = \prod_{i=0}^n x_i(t)^{w_i(t^-)}
$$
2. **Liquidity and Weight Update:** In the second step, the total liquidity and weights are updated:
$$
\ell(t) = \prod_{i=0}^n x_i(t)^{w_i(t)} = \ell(t^-) \prod_{i=0}^n x_i(t)^{\Delta w_i(t)}
$$

The relative price between assets i and j, denoted as $P_{ij}$, is updated as follows:

$$
\ln P_{ij}(t) = \left( \ln x_j(t) - \ln w_j(t) \right) - \left( \ln x_i(t) - \ln w_i(t) \right)
$$

Assuming continuous updates for both reserves and weights, the dynamics of the G3M can be represented by the following equations:

\begin{split}
0 &= \sum_{i=0}^n w_i \frac{dx_i}{x_i}, \\
\frac{d\ell}{\ell} &= \sum_{i=0}^n \ln x_i  dw_i, \\
\frac{dP_{ij}}{P_{ij}} &= \frac{dx_j}{x_j} - \frac{dx_i}{x_i} + \frac{dw_i}{w_i} - \frac{dw_j}{w_j}.
\end{split}

#### Incorporate Transaction Costs
When transaction costs are considered, the liquidity adjustment process in dynamic-weight G3Ms is modified as follows:

1. **Transaction Processing:** Transactions are processed using the following equation, which accounts for the transaction cost parameter $\gamma$: $$\prod_{i \notin I} x_i(t^-)^{w_i(t^-)} \prod_{i \in I} x_i(t^-)^{\gamma w_i(t^-)} = \prod_{i \notin I} x_i(t)^{w_i(t^-)} \prod_{i \in I} x_i(t)^{\gamma w_i(t^-)}$$ where $I=\{i∣\Delta x_i>0\}$ represents the set of assets being added to the pool.
3. **Liquidity and Weight Update:** The liquidity is then updated with the new reserves and weights: $$\ell(t) = \prod_{i=0}^n x_i(t)^{w_i(t)} = \ell(t^-) \prod_{i \in I} x_i(t^-)^{(1-\gamma)w_i(t^-)} \prod_{i=0}^n x_i(t)^{\Delta w_i}$$

Under the assumption of continuous updates, the G3M dynamics with transaction costs can be described by:

\begin{split}
0 &= \sum_{i \notin I} w_i \frac{dx_i}{x_i} + \sum_{i \in I} \gamma w_i \frac{dx_i}{x_i}, \\
\frac{d\ell}{\ell} &= \sum_{i \in I} (1-\gamma)w_i \frac{dx_i}{x_i} + \sum_{i=0}^n \ln x_i dw_i \\
\frac{dP_{ij}}{P_{ij}} &= \frac{dx_j}{x_j} - \frac{dx_i}{x_i} + \frac{dw_i}{w_i} - \frac{dw_j}{w_j}
\end{split}

##### Value Process of Liquidity Provider
The value of a liquidity provider in a dynamic-weight G3M, denoted as $V(t)$, is given by:

$$
V(t) = \sum_{i=0}^n P_i(t) x_i(t) = \frac{P_i(t) x_i(t)}{w_i(t)}
$$

This value process has the following properties:

* $\frac{P_i(t) x_i(t)}{w_i(t)} = \frac{P_j(t) x_j(t)}{w_j(t)}$ for each $i \neq j$;
* $V(t) = \ell(t) \prod^n_{i=0} \left(\frac{P_i(t)}{w_i(t)} \right)^{w_i(t)}$.

Using these properties, the logarithm of the LP value can be expressed as:

$$
\ln V(t) = \ln \ell(t) + \sum_{i=0}^n w_i(t) \ln P_i(t) - \sum_{i=0}^n w_i(t) \ln w_i(t)
$$



## Modeling G3M dynamics
This section explores different approaches to modeling the dynamics of G3Ms, focusing on how factors like order flow and arbitrage influence their behavior.


### Mispricing-Driven Dynamics
This approach centers on how order flows, representing buying and selling pressure, drive G3M dynamics and create mispricing between the AMM's prices and external market prices. For simplicity, we assume $n=1$.

#### Continuous Order Flows
Continuous order flows represent a steady stream of trading activity. We model them using normalized order flows between the risky asset and the numeraire.

##### Modeling Continuous Order Flows
Continuous order flows are modeled as a continuous rate of buying and selling pressure. We represent the normalized order flow from the risky asset to the numeraire as $s(Z_t)$ and the normalized order flow from the numeraire to the risky asset as $b(Z_t)$, where $Z_t = \ln S_t - \ln P_t$ is the mispricing process. This normalization ensures consistent dynamics for the reserves.

##### Reserve Dynamics
The dynamics of the risky asset's reserve $x_t$ and the numeraire reserve $y_t$ are given by:

\begin{split}
\frac{dx_t}{x_t} &= \frac{1-w}{w + \gamma(1-w)} s(Z_t) dt - \frac{\gamma (1-w)}{\gamma w + (1-w)} b(Z_t) dt, \\
\frac{dy_t}{y_t} &= \frac{w}{\gamma w + (1-w)} b(Z_t) dt - \frac{\gamma w}{w + \gamma(1-w)} s(Z_t) dt,
\end{split}

where $w$ is the weight of the risky asset, and $\gamma$ is the transaction cost parameter. These equations show how order flow influences the changes in asset reserves within the pool.

##### Mispricing Process Dynamics
The mispricing process $Z$ between the external market price and the AMM price evolves as:

$$
dZ_t = d \ln S_t + \left( b(Z_t) - s(Z_t) \right) dt,
$$

where $S_t$ is the external market price. This equation captures how external price movements and the net order flow affect the difference between the external and internal prices.

##### Liquidity Growth
Continuous order flows increase liquidity in the pool:

$$
d \ln \ell_t
= (1-\gamma) \left\{ \frac{w(1-w)}{w + \gamma(1-w)} s(Z_t) + \frac{w(1-w)}{\gamma w + (1-w)} b(Z_t) \right\} dt.
$$

This equation shows that higher order flow leads to greater liquidity growth, influenced by the transaction costs.

##### Example: OU Order Flows
Consider the mispricing process $Z_t$ as an Ornstein-Uhlenbeck (OU) process:

$$
dZ_t = {\mu - ( \alpha + \beta Z_t ) }dt + \sigma dW_t,
$$

where $\mu$, $\alpha$, $\beta$, and $\sigma$ are constants, and $W_t$ is a Wiener process. The log price $B_t = \ln S_t$ follows $dB_t = \mu dt + \sigma dW_t$. We can define non-negative normalized order flows $s(Z)$ and $b(Z)$ such that $\alpha + \beta Z_t = s(Z_t) - b(Z_t)$.

**Open Questions:**
* Under what conditions does $Z_t$ have a stationary distribution? (This is crucial for analyzing long-term behavior.)
* Can we design a meaningful parameterized model for $s(Z)$ and $b(Z)$ in the OU context that aligns with market behavior? What are the exact values of the ergodic integrals for $s(Z)$ and $b(Z)$ in this framework?

#### Jump Order Flows
Jump order flows model individual trades as discrete events, using an Avellaneda-Stoikov type model.

##### Modeling Jump Order Flows
Jump order flows are modeled as discrete events where trades occur in fixed increments. $N^b_t$ and $N^s_t$ represent the arrival of buy and sell orders, modeled as independent Poisson processes with intensity processes $\lambda^b_t = \Lambda^b(Z_t)$ and $\lambda^s_t = \Lambda^s(Z_t)$, respectively. Assets are traded in increments of $\Delta$.

##### Reserve Dynamics (Approximation)
The dynamics of the risky asset's reserve are *approximated* by:

$$
d \ln x_t
= \frac{1-w}{\gamma w + (1-w)} \Delta dN^s_t - \frac{\gamma (1-w)}{w + \gamma(1-w)} \Delta dN^b_t,
$$

where $dN^s_t$ and $dN^b_t$ represent the number of sell and buy orders, respectively. The numeraire reserve dynamics are:

$$
d \ln y_t
= \frac{w}{w + \gamma(1-w)} \Delta dN^b_t - \frac{\gamma w}{\gamma w + (1-w)} \Delta dN^a_t.
$$

##### Mispricing Process Dynamics
The mispricing process under discrete order flows is:

$$
dZ_t = d\ln S_t - \Delta dN^b_t + \Delta dN^s_t.
$$

##### Liquidity Growth
Discrete order flows also contribute to liquidity growth:

$$
d \ln \ell_t
= (1-\gamma) \left\{ \frac{w(1-w)}{w + \gamma(1-w)} \Delta dN^b_t + \frac{w(1-w)}{\gamma w + (1-w)} \Delta dN^s_t \right\}.
$$

**Open Questions:**
* Can we construct a parameterized model for $\Lambda_s$ and $\Lambda_b$ that ensures mean-reverting behavior for $Z_t$?
* What are the precise values of the ergodic behavior for $N^s_t$ and $N^b_t$? (These are essential for calculating the LP wealth growth rate.)


### Myopic Arbitrage-Driven Dynamics
This approach focuses on how arbitrageurs exploit price discrepancies between the G3M pool and an external market to drive G3M dynamics.

#### Trader's Arbitrage Opportunity
Let $S_{ij} = S_i/ S_j$ be the relative price of asset $i$ with respect to asset $j$ in the reference market.

##### Assumptions
1. The (external) reference market offers infinite liquidity and incurs no trading cost.
2. The market operates without the interference of noise traders.
3. Arbitrageurs maintain continuous surveillance of the market and act instantly upon spotting arbitrage opportunities.

##### Arbitrage Conditions and No-Arbitrage Region
* An arbitrage opportunity exists when $S_{ij} < \gamma P_{ij}$ or $S_{ij} > \frac 1 \gamma P_{ij}$.
* The AMM price $P_i$ remains constant if $\gamma S_{ij}  \leq P_{ij} \leq \frac 1 \gamma S_{ij}$ for all $i$. This price range is the no-arbitrage region.
* Arbitrage occurs only when $P_{ij} < \gamma S_{ij}$ (arbitrageurs buy the asset in the pool and sell it in the external market) or when $P_{ij} > \gamma^{-1} S_{ij}$ (arbitrageurs buy the asset in the external market and sell it in the pool).

**Open Question:** How to characterize optimal arbitrages involving more than two tokens?

#### Special Case: Single Risky Asset
Consider the case with one risky asset ($n=1$), using $y$ to represent the numeraire $x_0$ and $x$ for the risky asset $x_1$.

##### Mispricing Process and SDE
The mispricing process, $Z_t = \ln S_t − \ln P_t$, quantifies the difference between the logarithm of the price of the risky asset in the external market ($S_t$) and the logarithm of the pool price ($P_t$). Its dynamics are described by the following SDE:

$$
dZ_t = d \ln S_t + dL_t - dU_t
$$

where $dL_t$ and $dU_t$ are continuous, increasing processes reflecting arbitrage adjustments to keep the pool price within the no-arbitrage bounds.

##### Inventory Dynamics
The optimal arbitrage size is determined by the amount of trading required to bring the pool price back into the no-arbitrage range:

\begin{split}
d \ln x_t = \frac{1-w}{1-w + \gamma w} dL_t - \frac{\gamma(1-w)}{\gamma(1-w) + w} dU_t, \\
d \ln y_t = \frac{w}{\gamma(1-w) + w} dU_t - \frac{\gamma w}{1-w + \gamma w} dL_t.
\end{split}

##### Liquidity Dynamics
Arbitrage increases liquidity in the pool:

$$
d \ln \ell_t= \frac{(1-\gamma)w(1-w)}{1-w+\gamma w} dL_t + \frac{(1 - \gamma)w(1-w)}{\gamma(1-w) + w} dU_t.
$$

This liquidity growth term corresponds to the excess growth rate in *Stochastic Portfolio Theory*.

##### LP Wealth Growth
The wealth process, $W_t$, of a liquidity provider is given by $W_t = S_t x_t + y_t$. Using the facts that $\frac{P_t x_t}{w} = \frac{y_t}{1-w}$ and $\gamma P_t \leq S_t \leq \frac1\gamma P_t$, we can derive bounds for the wealth ratio:

$$
1 - w(1-\gamma) \leq \frac{W_t}{V_t} \leq 1 + w(\frac1\gamma -1).
$$

The ergodic behavior of the log wealth growth is captured by:

\begin{split}
\lim_{T \rightarrow \infty} \frac{\mathbb{E}[\ln W_T]}{T}
&= \lim_{T \rightarrow \infty} \left( \frac{\mathbb{E} [\ln \ell_T]}{T} + w \frac{ \mathbb{E}[\ln P_T]}{T} \right) \\
&= \frac{(1-\gamma)w(1-w)}{1-w+\gamma w} \lim_{T \rightarrow \infty}  \frac{\mathbb{E}[L_t]}{T} + \frac{(1 - \gamma)w(1-w)}{\gamma(1-w) + w} \lim_{T \rightarrow \infty} \frac{\mathbb{E}[U_t]}{T} + w \lim_{T \rightarrow \infty} \frac{\mathbb{E}[\ln P_T]}{T}
\end{split}

##### GBM Market
When $S_t$ is a Geometric Brownian Motion (GBM) with $dS_t = \mu S_t dt + \sigma S_t dW_t$, the growth rate of $U_t$ and $L_t$ follows directly from the Feynman-Kac formula for reflected diffusions.

**Open Question:** Can this result be generalized to multiple assets?

#### General Case: Multiple Risky Assets
Now, let's extend the analysis to multiple risky assets.

##### Mispricing Process and SDE
The mispricing process, $Z_{ij} = \ln S_{ij} − \ln P_{ij}$, quantifies the difference between the logarithm of the relative price of asset i to asset j in the external market $S_{ij}$ and the logarithm of the relative pool price $P_{ij}$. Its dynamics are described by:

$$
dZ_{ij} = d \ln S_{ij} + \sum_{k \neq i} dL_{ik} - \sum_{k \neq j} dU_{kj}
$$

where $dL_{ik}$ and $dU_{kj}$ are continuous, increasing processes reflecting arbitrage adjustments. Note that $Z_{ij} = - Z_{ji}$.

##### Inventory Dynamics
The optimal arbitrage size is:

\begin{split}
dL_{ij} &= -\left(\frac{dx_{j}}{x_{j}} - \frac{dx_i}{x_i} \right)_+ = (1+ \gamma \frac{w_i}{w_j}) \left(\frac{dx_i}{x_i} \right)_+ \\
dU_{ij} &= \left(\frac{dx_j}{x_j} - \frac{dx_i}{x_i} \right)_+ = -(1+ \frac1\gamma\frac{w_i}{w_j}) \left( \frac{dx_i}{x_i} \right)_+
\end{split}

Also, $L_{ij} = U_{ji}$.

##### Liquidity Dynamics
Combining the above relations gives the dynamics of liquidity:

\begin{split}
\frac{d\ell}{\ell}
&= \sum_{i \in I} (1-\gamma) w_i \frac{dx_i}{x_i} \\
&= \sum_{i > j} \left\{ \frac{(1-\gamma)w_i w_j}{\gamma w_i + w_j} d L_{ij} + \frac{(1-\gamma)w_i w_j}{w_i + \gamma w_j} d U_{ij} \right\}.
\end{split}

##### LP Wealth Growth
The long-term growth rate of the liquidity provider's wealth is:

\begin{split}
\lim_{T \to \infty} \frac{\mathbb{E}[\ln V(T)]}{T}
&= \lim_{T \to \infty} \frac{\mathbb{E}[\ln W(T)]}{T} \\
&= \lim_{T \to \infty} \left( \frac{\mathbb{E} [\ln \ell(T)]}{T} + \sum_{i=1}^n w_i \frac{ \mathbb{E} [\ln P_i(T)]}{T} \right) \\
&= \lim_{T \to \infty} \sum_{i \neq j} \frac{(1-\gamma)w_i w_j}{\gamma w_i + w_j} \left\{ \lim_{T \to \infty} \frac{\mathbb{E}[L_{ij}(T)]}{T} \right\} + \sum_{i=1}^n w_i \frac{ \mathbb{E} [\ln S_i(T)]}{T}.
\end{split}

**Open Question:** Is there an analogue of Harrison's results for the ergodic growth rate under a multi-dimensional GBM model?



## Control Problems in G3M
This section delves into control problems within the context of G3Ms, focusing on optimizing key parameters to enhance the performance and efficiency of these automated market makers.


### Optimal Fee Tiers for G3Ms
This part explores the optimization of fee tiers in G3Ms. The primary goal is to determine the fee tier, denoted as $\gamma_t$, that maximizes the long-term wealth growth of liquidity providers. This analysis builds upon the framework established in the "Jump Order Flows" section, inheriting its assumptions and notation.

#### Objective
The liquidity provider's objective is to maximize the long-run growth rate of their wealth:

$$
\max_{\gamma_t \in (0,1]} \lim_{T \to \infty} \frac{\ln W_T}{T}
$$

Often, this objective is simplified by focusing on maximizing the long-run growth rate of the pool's liquidity:

$$
\max_{\gamma_t \in (0,1]} \lim_{T \to \infty} \frac{\ln \ell_T}{T}
$$

Remark: This simplification requires careful justification. The equivalence between maximizing long-run wealth growth and liquidity growth is not universally valid and depends on specific conditions. To ensure this reduction is sound, the set of admissible control policies for $\gamma_t$ must be chosen such that the mispricing $Z_t$ remains bounded. This constraint is crucial to prevent unbounded divergence between the AMM's internal state and external market conditions, which could invalidate the liquidity-centric optimization.

#### AMM Dynamics Model
We model the AMM price dynamics as:

$$
d\ln P_t = \xi dN^+_t - \xi dN^-_t
$$

where:
* $N^+_t$ represents the number of buy trades that move the log price by a fixed scale $\xi$.
* $N^-_t$ represents the number of sell trades that move the log price by a fixed scale $\xi$.
* $N^\pm_t$ are Poisson processes with intensity $\lambda^\pm_t$, where
$$
\lambda_t^{\pm} = \max\{a_0, a_1 \pm a_2 (\ln P_t \mp \ln \gamma_t - \ln S_t)\}
$$

The intensity model captures the following:

* $a_0 > 0$ is a technical condition to ensure the intensity remains positive.
* $a_1$ represents the baseline trading intensity.
* $a_2$ reflects the sensitivity of trading intensity to the mispricing between the AMM price $P_t$ and the external market price $S_t$, adjusted by the fee tier $\gamma_t$.

#### Inventory Dynamics
The corresponding inventory dynamics are approximated by:

\begin{split}
d \ln x_t &= \frac{1-w}{\gamma_t w + 1-w} \xi dN^-_t - \frac{\gamma_t (1-w)}{w + \gamma_t(1-w)} \xi dN^+_t, \\
d \ln y_t &= \frac{w}{w + \gamma_t (1-w)}  \xi dN^+_t - \frac{\gamma_t w}{\gamma_t w + (1-w)} \xi dN^-_t.
\end{split}

Here, $x_t$ and $y_t$ represent the reserves of the risky asset and the numeraire, respectively, and $w$ is the weight of the risky asset.

#### Liquidity Dynamics
The liquidity growth is given by:

$$
d \ln \ell_t
= (1-\gamma) \left\{ \frac{w(1-w)}{w + \gamma_t (1-w)} \xi dN^+_t + \frac{w(1-w)}{\gamma_t w + (1-w)} \xi dN^-_t \right\}.
$$

This equation demonstrates how transaction fees (represented by $\gamma_t$) influence the growth of liquidity $\ell_t$.

**Open Question:** Is this control problem, with the necessary constraints on admissible control policies, well-posed and solvable? Specifically, does an optimal fee tier policy exist within these constraints, and can we characterize its properties?

#### Potential Extensions
If this problem is solvable, several extensions could be considered:

* **Multiple Assets:** Generalizing the model to include n risky assets with separate fee tiers $\gamma^\pm_{ij}$ for each trading pair. This extension is relevant to Balancer v3, which supports such flexibility through hooks.
* **Dynamic Weights:** Incorporating dynamic weight adjustments into the fee optimization problem. This would involve simultaneously optimizing both the asset weights $\mathbf{w}_t$ and the fee tiers $\pmb{\gamma}_t$.


### Merton Portfolio Problem for G3Ms
This part introduces the Merton portfolio problem within the context of G3Ms. The objective is to determine the optimal weights, $\mathbf{w}_t$, of the risky asset in the G3M pool that maximizes the expected utility of the liquidity provider's terminal wealth. We consider both a finite time horizon and a long-run (ergodic) setting.

#### Finite Time Horizon
For a finite time horizon, $T$, the optimization problem is:

$$
\max_{\mathbf{w}_t} \mathbb{E}[\ln W_T] 
= \max_{\mathbf{w}_t} \left\{ \mathbb{E}[\ln \ell(T) + \sum_{i=0}^{n} w_i(T)\ln P_i(T) - \sum_{i=0}^{n} w_i(T) \ln w_i(T)] \right\}
$$

This formulation seeks to maximize the expected logarithm of the terminal wealth, $W_T$, by adjusting the weight of the risky asset over time, subject to the constraints:

$$
\sum_{i=1}^n w_i(t) = 1, \quad 0 < w_i(t) < 1 \quad \forall t \in [0,T].
$$

#### Ergodic (Long-Run)
In the ergodic (long-run) setting, the optimization problem becomes:

$$
\max_{w_t} \lim_{T \to \infty} \frac{\mathbb{E}[\ln W_T]}{T} 
= \max_{w_t}  \lim_{T \to \infty}  \left\{\frac{\mathbb{E}[\ln \ell(T) + w_i(T) \ln P_i(T) ]}{T} \right\}
$$

This formulation aims to maximize the long-term growth rate of the expected logarithm of wealth by adjusting the weight of the risky asset, subject to the same constraints as in the finite-horizon case.

#### Challenges and Open Questions
Solving these optimization problems presents several challenges, including:

* The complex dynamics of the G3M, which depend on factors such as arbitrage, order flows, and transaction costs.
* The potential for intricate interactions between the weight adjustments and the G3M dynamics.

Addressing these challenges requires developing sophisticated stochastic control techniques and may involve numerical methods for finding approximate solutions.

**Open Questions:**
* What are the optimal weight adjustment strategies for different G3M models and market conditions?
* How do factors such as transaction costs and order flows affect the optimal strategies?
* Can we develop closed-form solutions or efficient numerical algorithms for solving these optimization problems?



## References
* Aqsha, A., Bergault, P., & Sánchez-Betancourt, L. (2025). Equilibrium Reward for Liquidity Providers in Automated Market Makers. *arXiv e-prints*. https://doi.org/10.48550/arXiv.2503.22502
* Chitra, T., Diamandis, T., Sheng, N., Sterle, L., & Yusubov, K. (2025). Perpetual Demand Lending Pools. *arXiv preprint arXiv:2502.06028*.
* Dai, M., & Dong, Y. (2024, June 20). Learning an optimal investment policy with transaction costs via a randomized Dynkin game. *SSRN*. http://dx.doi.org/10.2139/ssrn.4871712
* Dai, M., & Yi, F. (2009). Finite-horizon optimal investment with transaction costs: A parabolic double obstacle problem. *Journal of Differential Equations*, *246*(4), 1445-1469. https://doi.org/10.1016/j.jde.2008.11.003
* Evans, A. (2021). Liquidity Provider Returns in Geometric Mean Markets. *Cryptoeconomic Systems*, *1*(2). https://doi.org/10.21428/58320208.56ddae1b
* Guéant, O. (2017). Optimal market making. *Applied Mathematical Finance*, *24*(2), 112–154. https://doi.org/10.1080/1350486X.2017.1342552
* Harrison, J. M. (2013). *Brownian Models of Performance and Control*. Cambridge: Cambridge University Press.
* Lee, C. Y., Tung, S. N., & Wang, T. H. (2024). Growth rate of liquidity provider's wealth in G3Ms. *arXiv preprint arXiv:2403.18177*.
* Muthuraman, K., & Kumar, S. (2006). Multidimensional portfolio optimization with proportional transaction costs. *Mathematical Finance*, *16*(2), 301-335. https://doi.org/10.1111/j.1467-9965.2006.00273.x
