# Decentralised Finance and Automated Market Making: Predictable Loss and
Optimal Liquidity Provision

Álvaro Cartea  Fayçal Drissi  Marcello Monga  Oxford-Man Institute of
Quantitative Finance, Oxford, UK  Mathematical Institute, University of
Oxford, Oxford, UK

###### Abstract

Constant product markets with concentrated liquidity (CL) are the most popular
type of automated market makers. In this paper, we characterise the
continuous-time wealth dynamics of strategic LPs who dynamically adjust their
range of liquidity provision in CL pools. Their wealth results from fee income
and the value of their holdings in the pool. Next, we derive a self-financing
and closed-form optimal liquidity provision strategy where the width of the
LP’s liquidity range is determined by the profitability of the pool (provision
fees minus gas fees), the predictable losses (PL) of the LP’s position, and
concentration risk. Concentration risk refers to the decrease in fee revenue
if the marginal exchange rate (akin to the midprice in a limit order book) in
the pool exits the LP’s range of liquidity. When the marginal rate is driven
by a stochastic drift, we show how to optimally skew the range of liquidity to
increase fee revenue and profit from the expected changes in the marginal
rate. Finally, we use Uniswap v3 data to show that, on average, LPs have
traded at a significant loss, and to show that the out-of-sample performance
of our strategy is superior to the historical performance of LPs in the pool
we consider.

###### keywords:

Decentralised finance, automated market making, concentrated liquidity,
algorithmic trading, market making, stochastic control, predictable loss,
impermanent loss, signals.

††journal: TBC

We are grateful to Tarek Abou Zeid, Álvaro Arroyo, Sam Cohen, Patrick Chang,
Mihai Cucuringu, Olivier Guéant, Anthony Ledford, Andre Rzym, and Leandro
Sánchez-Betancourt, for insightful comments. The authors thank the Fintech
Dauphine Chair, in partnership with Mazars and Crédit Agricole CIB, for their
financial support. We are also grateful to seminar participants at Oxford, the
OMI, the Oxford Victoria Seminar, and the DeFi Research Group. FD is grateful
to the Oxford-Man Institute’s generosity and hospitality. MM acknowledges
financial support from the EPSRC Centre for Doctoral Training in Mathematics
of Random Systems: Analysis, Modelling and Simulation (EP/S023925/1).

##  1 Introduction

Traditional electronic exchanges are organised around LOBs to clear demand and
supply of liquidity. In contrast, the takers and providers of liquidity in
constant function markets (CFMs) interact in liquidity pools; liquidity
providers (LPs) deposit their assets in the liquidity pool and liquidity
takers (LTs) exchange assets directly with the pool. At present, constant
product markets (CPMs) with concentrated liquidity (CL) are the most popular
type of CFM, with Uniswap v3 as a prime example; see Adams et al. (2021). In
CPMs with CL, LPs specify the rate intervals (i.e., tick ranges) over which
they deposit their assets, and this liquidity is counterparty to trades of LTs
when the marginal exchange rate of the pool is within the liquidity range of
the LPs. When LPs deposit liquidity, fees paid by LTs accrue and are paid to
LPs when they withdraw their assets from the pool. The amount of fees accrued
to LPs is proportional to the share of liquidity they hold in the pool.

Existing research characterises the losses of LPs, but does not offer tools
for strategic liquidity provision. In this paper, we study strategic liquidity
provision in CPMs with CL. We derive the continuous-time dynamics of the
wealth of LPs which consists of the position they hold in the pool (position
value) and fee income. The width of the range where the assets are deposited
affects the value of the LP’s position in the pool; specifically, we show that
the predictable loss (PL) incurred by LPs increases as the width of the
liquidity range decreases. PL measures the unhedgeable losses of LPs stemming
from the depreciation of their holdings in the pool and from the opportunity
costs from locking their assets in the pool; see Cartea et al. (2023). Also,
we show that fee income is subject to a tradeoff between the width of the LP’s
liquidity range and the volatility of the marginal rate in the pool. More
precisely, CL increases fee revenue when the rate is in the range of the LP,
but also increases concentration risk. Concentration risk refers to the risk
that the LP faces when her position is concentrated in narrow ranges; the LP
stops collecting fees when the rate exits the range of her position.

We derive an optimal dynamic strategy to provide liquidity in a CPM with CL.
In our model, the LP maximises the expected utility of her terminal wealth,
which consists of the accumulated trading fees and the gains and losses from
the market making strategy. The dynamic strategy controls the width and the
skew of liquidity that targets the marginal exchange rate. For the particular
case of log-utility, we obtain the strategy in closed-form and show how the
solution balances the opposing effects between PL and fee collection. When
volatility increases, PL increases, so there is an incentive for the LP to
widen the range of liquidity provision to reduce the strategy’s exposure to
PL. In particular, in the extreme case of very high volatility, the LP must
withdraw from the pool because the exposure to PL is too high. Also, when
there is an increase in the potential provision fees that the LP may collect
because of higher liquidity taking activity, the strategy balances two
opposing forces. One, there is an incentive to increase fee collection by
concentrating the liquidity of the LP in a tight range around the exchange
rate of the pool. Two, there is a limit to how concentrated is the liquidity
posted by the LP in the pool because the LP does not collect fees if the
exchange rate exits the LP’s liquidity range. Finally, when the dynamics of
the marginal exchange rate are driven by a stochastic drift (e.g., a
predictive signal), the strategy skews the range of liquidity to increase fee
revenue by capturing the LT trading flow and to increase the position value by
profiting from the excepted changes in the marginal rate.

Finally, we use Uniswap v3 data to motivate our model and to test the
performance of the strategy we derive. The LP and LT data are from the pool
ETH/USDC (Ethereum and USD coin) between the inception of the pool on $5$ May
$2021$ and $18$ August $2022$. To illustrate the performance of the strategy
we use in-sample data to estimate model parameters and out-of-sample data to
test the strategy. Our analysis of the historical transactions in Uniswap v3
shows that LPs have traded at a significant loss, on average, in the ETH/USDC
pool. We show that the out-of-sample performance of our strategy is
considerably superior to the average LP performance we observe in the ETH/USDC
pool.

Early works on AMMs are in Chiu and Koeppl (2019), Angeris et al. (2021),
Lipton and Treccani (2021). Some works in the literature study strategic
liquidity provision in CFMs and CPMs with CL. Fan et al. (2023) propose a
liquidity provision strategy in pools with CL, Heimbach et al. (2022) discuss
the tradeoff between risks and returns that LPs face in Uniswap v3, Cartea et
al. (2023) study the predictable losses of LPs in a continuous-time setup,
Milionis et al. (2023) study the impact of fees on the profits of arbitrageurs
in CFMs, and Fukasawa et al. (2023) study the hedging of the impermanent
losses of LPs.

Our work is related to the algorithmic trading and optimal market making
literature. Early works on liquidity provision in traditional markets are Ho
and Stoll (1983) and Avellaneda and Stoikov (2008), with extensions in many
directions; see Cartea et al. (2014, 2017), Guéant (2017), Bergault et al.
(2021), Drissi (2022). We refer the reader to Cartea et al. (2015) and Guéant
(2016) for a comprehensive review of algorithmic trading models for takers and
makers of liquidity in traditional markets. Also, our work is related to those
by Cartea et al. (2018), Barger and Lorig (2019), Cartea and Wang (2020),
Donnelly and Lorig (2020), Forde et al. (2022), Bergault et al. (2022) who
implement market signals in algorithmic trading strategies.

The remainder of the paper proceeds as follows. Section 2 describes CL pools.
Section 3 studies the continuous-time dynamics of the wealth of LPs as a
result of the position value in Subsection 3.1 and the fee revenue in
Subsection 3.2. In particular, we use Uniswap v3 data to study the fee revenue
component of the LP’s wealth and our results motivate the assumptions we make
in our model. Section 4 introduces our liquidity provision model and uses
stochastic control to derive a closed-form optimal strategy. Next, we study
how the strategy controls the width and the skew of the liquidity range as a
function of the pool’s profitability, PL, concentration risk, and the drift in
the marginal rate. Finally, Section 5 uses Uniswap v3 data to test the
performance of the strategy and showcases its superior performance.

##  2 Concentrated liquidity

Consider a reference asset $X$ and a risky asset $Y$ which is valued in units
of $X.$ Assume there is a pool that makes liquidity for the pair of assets $X$
and $Y$, and denote by $Z$ the marginal exchange rate of asset $Y$ in units of
asset $X$ in the pool. In a traditional CPM such as Uniswap v2, the trading
function, which links the state of the pool before and after a trade is
executed, is $f\left(q^{X},q^{Y}\right)=q^{X}\times q^{Y}=\kappa^{2}$ where
$q^{X}$ and $q^{Y}$ are the quantities of asset $X$ and $Y$ that constitute
the _reserves_ in the pool, and $\kappa$ is the depth of the pool. The
marginal exchange rate is $Z=q^{X}/q^{Y},$ and the execution rate for a
quantity $y$ is $\tilde{Z}\left(y\right)=Z-Z^{3/2}\,y\big{/}\kappa.$ In
traditional CPMs, liquidity provision operations do not impact the marginal
rate of the pool, so when an LP deposits the quantities $x$ and $y$ of assets
$X$ and $Y$, the condition $q^{X}/q^{Y}=(q^{X}+x)/(q^{Y}+y)$ must be
satisfied; see Cartea et al. (2022).

Figure 1 illustrates the geometry of a CPM. The level function
$\varphi(q^{Y})=\kappa^{2}/q^{Y}$ indicates the various combinations of
quantity $q^{X}$ and quantity $q^{Y}$ that lead to the same pool depth. Assume
the reserves in the pool are the coordinates of point $B$ in Figure 1. The
marginal rate $Z$ is the absolute value of the slope of the tangent
$q^{X}/q^{Y}=\kappa^{2}/\left(q^{Y}\right)^{2}$ at point $B$; equivalently,
$Z$ is the slope of the ray $0B.$ When LTs trade, the reserves in the pool
move along the level curve (e.g., from $B$ to $C$ or from $B$ to $A$), and
when LPs provide liquidity, the level curve moves up along the ray $(0B)$.

Figure 1: Geometry of CPMs: level function
$x=\varphi\left(y\right)=\kappa^{2}/y$ for two values of the pool depth
$\kappa$.

In CPMs with CL, LPs specify a range of rates $(Z^{\ell},Z^{u}]$ in which
their assets can be counterparty to liquidity taking trades. Here, $Z^{\ell}$
and $Z^{u}$ take values in a finite set $\\{Z^{1},\dots,Z^{N}\\}$, the
elements of the set are called ticks, and the range $(Z^{i},Z^{i+1}]$ between
two consecutive ticks is a _tick range_ which represents the smallest possible
liquidity range; see Drissi (2023) for a description of the mechanics of
CL.111In LOBs, a tick is the smallest price increment.

The assets that the LP deposits in a range $(Z^{\ell},Z^{u}]$ provide the
liquidity that supports marginal rate movements between $Z^{\ell}$ and
$Z^{u}$. The quantities $x$ and $y$ that the LP provides verify the key
formulae

$\displaystyle\begin{cases}x=0\quad\quad\quad\quad\quad\ \ \
\,\quad\quad\quad\quad\textrm{and}\quad
y=\tilde{\kappa}\left(\left(Z^{\ell}\right)^{-1/2}-\left(Z^{u}\right)^{-1/2}\right)&\textrm{if}\
\ Z\leq Z^{\ell},\\\
x=\tilde{\kappa}\left(Z^{1/2}-\left(Z^{\ell}\right)^{1/2}\right)\quad\ \ \ \
\,\textrm{and}\quad
y=\tilde{\kappa}\left(Z^{-1/2}-\left(Z^{u}\right)^{-1/2}\right)&\textrm{if}\ \
Z^{\ell}<Z\leq Z^{u},\\\
x=\tilde{\kappa}\left(\left(Z^{u}\right)^{1/2}-\left(Z^{\ell}\right)^{1/2}\right)\
\ \ \,\textrm{and}\quad y=0&\textrm{if}\ \ Z>Z^{u}\,,\end{cases}$ (1)

where $\tilde{\kappa}$ is the depth of the LP’s liquidity in the pool. The
depth $\tilde{\kappa}$ remains constant unless the LP provides additional
liquidity or withdraws her liquidity. When the rate $Z$ changes, the equations
in (1) and the prevailing marginal rate $Z$ determine the holdings of the LP
in the pool, in particular, they determine the quantities of each asset
received by the LP when she withdraws her liquidity.

Within each tick range, the constant product formula determines the dynamics
of the marginal rate, where the depth $\kappa$ is the total depth of liquidity
in that tick range. To obtain the total depth in a tick range, one sums the
depths of the individual liquidity positions in the same tick range. When a
liquidity taking trade is large, so the marginal rate crosses the boundary of
a tick range, the pool executes two separate trades with potentially different
depths for the constant product formula. Figure 2 depicts the geometry of
CPMMs with CL for two adjacent tick ranges, each with a different value of the
depth $\kappa$. In CPMMs without CL, the level function is a hyperbola, and in
CPMMs with CL, it is a series of adjacent segments of hyperbolas, each
corresponding to a given value of the depth.

Figure 2: Geometry of CPMMs with CL: two adjacent tick ranges $(Z^{B},Z^{C}]$
and $(Z^{A},Z^{B}]$ with different liquidity depth.

If an LP’s liquidity position with depth $\tilde{\kappa}$ is in a tick range
where the total depth of liquidity is $\kappa$, then for every liquidity
taking trade that pays an amount $p$ of fees, the LP earns the amount

$\displaystyle\tilde{p}=\frac{\tilde{\kappa}}{\kappa}\,p\,\mathbb{1}_{Z^{\ell}<Z\leq
Z^{u}}\,.$ (2)

Thus, the larger the position depth $\tilde{\kappa}$, the higher is the
proportion of fees that the LP earns; e.g., if the LP is the only provider of
liquidity in the range $(Z^{\ell},Z^{u}]$ then $\kappa=\tilde{\kappa}$, so the
LP collects all the fees in that range. The equations in (1) imply that for
equal wealth, narrow liquidity ranges increase the value of $\tilde{\kappa}.$
However, LPs that maximise fee revenue in a tick range face concentration
risk.

To illustrate concentration risk, consider the following example. Two LPs have
the same initial wealth $\tilde{x}$. One LP provides liquidity over the one-
tick range $(Z^{i},Z^{i+1}]$ with depth $\kappa_{1}$, and the other LP
provides liquidity with depth $\kappa_{2}$ over a range $(Z^{i},Z^{i+2}]$ that
consists of two tick ranges. The equations in (1) show that the depth of the
position of the LP who concentrates her liquidity over one tick range is
approximately twice the depth of the liquidity held by the second LP; see
Cartea et al. (2022, 2023) for more details. However, when the rate $Z$ is in
the tick range $(Z^{i+1},Z^{i+2}]$, the first LP’s liquidity is inactive and
does not earn fees, and only the second LP’s liquidity facilitates trades.
Figure 3 shows the position depth of an LP who uses the same wealth to provide
liquidity over ranges of $1$, $3$, and $5$ ticks.

Figure 3: Position depth for three LP ranges. The first is concentrated over a
range of one tick, the second over a range of three ticks, and the last over a
range of five ticks.

##  3 The wealth of liquidity providers in CL pools

In this section, we consider a strategic LP who dynamically tracks the
marginal rate $Z$. In our model, the LP’s position is self-financed, so she
does not deposit nor withdraw additional assets throughout a investment window
$[0,T].$ Throughout the investment window, the LP repeatedly withdraws her
liquidity and collects the accumulated fees, then uses her wealth, i.e., the
collected fees and the assets she withdraws, to deposit liquidity in a new
range. In the remainder of this work, we work in a filtered probability space
$\left(\Omega,\mathcal{F},\mathbbm{P};\mathbbm{F}=(\mathcal{F}_{t})_{t\in[0,T]}\right)$
that satisfies the usual conditions, where $\mathbbm{F}$ is the natural
filtration generated by the collection of observable stochastic processes that
we define below.

We assume that the marginal exchange rate in the pool
$\left(Z_{t}\right)_{t\in[0,T]}$ is driven by a stochastic drift
$\left(\mu_{t}\right)_{t\in[0,T]}$ and we write

$\displaystyle\mathrm{d}Z_{t}=\mu_{t}\,Z_{t}\,\mathrm{d}t+\sigma\,Z_{t}\,\mathrm{d}W_{t}\,,$
(3)

where the volatility parameter $\sigma$ is a nonnegative constant and
$(W_{t})_{t\in[0,T]}$ is a standard Brownian motion independent of $\mu$. We
assume that $\mu$ is càdlàg with finite second moment, i.e.,
$\mathbbm{E}\left[\mu_{s}^{2}\right]<\infty$ for $t\leq s\leq T$.

Consider an LP with initial wealth $\tilde{x}_{0},$ in units of $X,$ and an
investment horizon $[0,T],$ with $T>0.$ At time $t=0\,,$ she deposits
quantities $\left(x_{0},y_{0}\right)$ in the range
$\left(Z^{\ell},Z^{u}\right]$ so the initial depth of her position is
$\tilde{\kappa}_{0},$ and the value of her initial position, marked-to-market
in units of $X$, is $\tilde{x}_{0}=x_{0}+y_{0}\,Z_{0}.$ The dynamics of the
LP’s wealth consist of the position value and fee revenue. We introduce the
wealth process $(\tilde{x}_{t}=\alpha_{t}+p_{t})_{t\in[0,T]}$, which we mark-
to-market in units of the reference asset $X$, with $\tilde{x}_{0}>0$ known
and recall that $\left(\alpha_{t}\right)_{t\in[0,T]}$ is the value of the LP’s
holdings in the pool and $\left(p_{t}\right)_{t\in[0,T]}$ is the fee revenue.
At any time $t,$ the LP uses her wealth $\tilde{x}_{t}$ to provide liquidity.
Next, Subsection 3.1 studies the dynamics of the LP’s position in the pool and
Subsection 3.2 studies the dynamics of the LP’s fee revenue.

###  3.1 Position value

In this section, we focus our analysis on the position value $\alpha$.
Throughout the investment window $[0,T]$, the holdings
$\left(x_{t},y_{t}\right)_{t\in[0,T]}$ of the LP change because the marginal
rate $Z$ changes and because she continuously adjusts her liquidity range
around $Z$. More precisely, to make markets optimally, the LP controls the
values of $\left(\delta_{t}^{\ell}\right)_{t\in[0,T]}$ and
$\left(\delta_{t}^{u}\right)_{t\in[0,T]}$ which determine the dynamic
liquidity provision boundaries $\left(Z_{t}^{\ell}\right)_{t\in[0,T]}$ and
$\left(Z_{t}^{u}\right)_{t\in[0,T]}$ as follows:

$\displaystyle\begin{cases}\left(Z_{t}^{u}\right)^{1/2}=&Z_{t}^{1/2}/\left(1-\delta_{t}^{u}/2\right),\\\
\left(Z_{t}^{\ell}\right)^{1/2}=&Z_{t}^{1/2}\left(1-\delta_{t}^{\ell}/2\right),\end{cases}$
(4)

where $\delta^{\ell}\in\left(-\infty,2\right]$,
$\delta^{u}\in\left[-\infty,2\right)$, and
$\delta^{\ell}\,\delta^{u}/2<\delta^{\ell}+\delta^{u}$ because $0\leq
Z^{\ell}<Z^{u}<\infty.$ Below, our liquidity provision model requires that
$Z_{t}\in(Z^{\ell}_{t},Z^{u}_{t}]$ so $\delta^{\ell}\in\left(0,2\right]$,
$\delta^{u}\in\left[0,2\right)$, and
$\delta^{\ell}\,\delta^{u}/2<\delta^{\ell}+\delta^{u}$.

Recall that in practice, $Z^{\ell}$ and $Z^{u}$ take values in a finite set of
ticks, so $\delta^{\ell}$ and $\delta^{u}$ also take values in a finite set.
In the liquidity provision problem of Section 4, we use stochastic control
techniques to derive an optimal strategy where the controls $\delta^{\ell}$
and $\delta^{u}$ are continuous, so we round the values of $Z^{\ell}$ and
$Z^{u}$ to the nearest ticks in the performance analysis of Section 5.

In the remainder of this paper we define the _spread_ $\delta_{t}$ of the LP’s
position as

$\displaystyle\delta_{t}=\delta_{t}^{u}+\delta_{t}^{\ell}\,,$ (5)

and for small position spreads, we use the approximation

$\left(Z_{t}^{u}-Z^{\ell}_{t}\right)\Big{/}Z_{t}=\left(1-\delta_{t}^{u}/2\right)^{-2}-(1-\delta_{t}^{\ell}/2)^{2}\approx\delta_{t}.$

We assume that the marginal rate process $\left(Z_{t}\right)_{t\in[0,T]}$
follows the dynamics (3). Cartea et al. (2023) show that the holdings in
assets $X$ and $Y$ in the pool for an LP who follows an arbitrary strategy
$\left(Z_{t}^{\ell},Z_{t}^{u}\right)$ are given by

$x_{t}=\frac{\delta_{t}^{\ell}}{\delta_{t}^{\ell}+\delta_{t}^{u}}\,\alpha_{t}\quad\text{and}\quad
y_{t}=\frac{\delta_{t}^{u}}{Z_{t}\left(\delta_{t}^{\ell}+\delta_{t}^{u}\right)}\,\alpha_{t}\,,$
(6)

so the value $\left(\alpha_{t}\right)_{t\in[0,T]}$ of her position follows the
dynamics

$\displaystyle\mathrm{d}\alpha_{t}=$
$\displaystyle\,\,\tilde{x}_{t}\,\left(\frac{1}{\delta_{t}^{\ell}+\delta_{t}^{u\,}}\right)\left(-\frac{\sigma^{2}}{2}\,\mathrm{d}t+\mu_{t}\,\delta_{t}^{u}\,\mathrm{d}t+\sigma\,\delta_{t}^{u}\,\mathrm{d}W_{t}\right)$
$\displaystyle=$
$\displaystyle\,\,\mathrm{d}\text{PL}_{t}+\tilde{x}_{t}\,\left(\frac{1}{\delta_{t}^{\ell}+\delta_{t}^{u\,}}\right)\left(\mu_{t}\,\delta_{t}^{u}\,\mathrm{d}t+\sigma\,\delta_{t}^{u}\,\mathrm{d}W_{t}\right)\,,$
(7)

where the predictable and negative component
$\text{PL}_{t}=-\frac{\sigma^{2}}{2}\,\int_{0}^{t}\frac{\tilde{x}_{s}}{\delta_{s}}\,\mathrm{d}s$
is the PL of the LP’s position which scales with the volatility of the
marginal rate. The dynamics in (3.1) also show that a larger position spread
$\delta$ reduces PL and the overall risk of the LP’s position in the pool; see
Cartea et al. (2023).

For a fixed value of the spread $\delta_{t}=\delta^{\ell}_{t}+\delta^{u}_{t}$,
the dynamics in (3.1) show that if $\mu_{t}\geq 0$, then the LP increases her
expected wealth by increasing the value $\delta^{u}$, i.e., by skewing her
range of liquidity to the right. However, note that the quadratic variation of
the LP’s position value is
$\mathrm{d}\langle\alpha,\alpha\rangle_{t}=\tilde{x}_{t}^{2}\,\sigma^{2}\left(\frac{\delta_{t}^{u}}{\delta_{t}}\right)^{2}\,\mathrm{d}t\,,$
so skewing the range to the right also increases the variance of the LP’s
position. On the other hand, if $\mu\leq 0$, then the LP reduces her losses by
decreasing the value $\delta^{u}$ or equivalently increasing the value of
$\delta^{\ell}$, i.e., by skewing her range of liquidity to the left. Thus,
the LP uses the expected changes in the marginal rate to skew the range of
liquidity and to increase her terminal wealth.

###  3.2 Fee income

In this section, we first show that fee income is subject to a tradeoff
between the spread $\delta$ of the LP’s position and PL, which scales with the
volatility of $Z.$ Next, we show how the LP uses the expected changes in the
marginal rate given by the stochastic drift $\mu$ to skew her liquidity around
$Z$. Finally, we propose dynamics for the LP’s fee income that we use in our
model.

####  3.2.1 Fee income: spread, concentration risk, and pool fee rate

In the three cases of (1), increasing the spread of the LP’s position reduces
the depth $\tilde{\kappa}$ of the LP’s position in the pool. Recall that the
LP fee income is proportional to $\tilde{\kappa}/\kappa,$ where $\kappa$ is
the pool depth. Thus, decreasing the value of $\tilde{\kappa}$ potentially
reduces LP fee income because the LP holdings represent a smaller portion of
the pool depth around the rate $Z$. Figure 4 shows the value of
$\tilde{\kappa}$ as a function of the spread $\delta.$

Figure 4: Value of the depth $\tilde{\kappa}$ of the LP’s position in the pool
as a function of the spread $\delta.$ The spread is in percentage of the
marginal exchange rate; recall that
$\left(Z_{t}^{u}-Z^{\ell}_{t}\right)/Z_{t}\approx\delta_{t}.$

However, although narrow ranges increase the potential fee income, they also
increase concentration risk; a wide spread (i.e., a lower value of the depth
$\tilde{\kappa}$) decreases fee income per LT transaction but reaps earnings
from a larger number of LT transactions because the position is active for
longer periods of time (i.e., it takes longer, on average, for $Z$ to exit the
LP’s range). Thus, the LP must strike a balance between maximising the depth
$\tilde{\kappa}$ around the rate and minimising the concentration risk, which
depends on the volatility of the rate $Z.$

The dynamics of the fee income in our model of Section 4 uses a fixed depth
$\kappa$ and assumes that the pool generates fee income for all LPs at an
instantaneous _pool fee rate_ $\pi$; clearly, these fees are paid by LTs who
interact with the pool. The value of $\pi$ represents the instantaneous
profitability of the pool, akin to the size of market orders and their arrival
rate in LOBs.

To analyse the dynamics of the pool fee rate $\pi,$ we use historical LT
transactions in Uniswap v3 as a measure of activity and to estimate the total
fee income generated by the pool; A describes the data and Table 4 provides
descriptive statistics. Figure 5 shows the estimated fee rate $\pi$ in the
ETH/USDC pool. For any time $t,$ we use

$\pi_{t}=0.05\%\,\frac{V_{t}}{2\,\kappa\,Z_{t}^{1/2}}\,,$

where $V_{t}$ is the volume of LT transactions the day before $t,$
$2\,\kappa\,Z_{t}^{1/2}$ is the pool value in terms of asset $X$ at time $t,$
and $0.05\%$ is the fixed fee of the pool.222The value of a CPM pool is given
by the active pool depth. In particular, the size of a pool with quantity $x$
of asset $X$ and quantity $y$ of asset $Y$ is $x+Z\,y=2\,x=2\,\kappa\,Z^{1/2}$
units of $X$ because $x\,y=\kappa^{2}\ \text{and}\ Z=x/y\ \implies
x^{2}=\kappa^{2}\,Z.$ Figure 5 suggests that the pool fee rate $\pi$ generated
by liquidity taking activity in the pool is stochastic and mean reverting.
Here, we assume that $\pi$ is independent of the rate $Z$ over the time scales
we consider; see Table 1.

Figure 5: Estimated pool fee rate from February to August 2022 in the ETH/USDC pool. For any time $t,$ the pool fee rate is the total fee income, as a percentage of the total pool size, paid by LTs on the period $[t-1\text{ day},t].$ The pool size at time $t$ is $2\,\kappa\,Z_{t}^{1/2}$ in terms of asset $X$, where $Z_{t}$ is the active rate in the pool at time $t.$ |  $\Delta t=1$ minute |  $\Delta t=5$ minutes |  $\Delta t=1$ hour |  $\Delta t=1$ day
---|---|---|---|---
Correlation | $-2.1\%$ | $-2.4\%$ | $-2.6\%$ | $-10.9\%$
Table 1: Correlation of the returns of the rate $Z$ and the fee rate $\pi$,
i.e., $\left(Z_{t+\Delta t}-Z_{t}\right)/Z_{t}$ and $\left(Z_{t+\Delta
t}-Z_{t}\right)/Z_{t}$ for $\Delta t=1$ minute, five minutes, one hour, and
one day, using data of the ETH/USDC pool between 5 May 2021 and 18 August
2022.

In our model, the LP continuously adjusts her position around the current rate
$Z,$ so we write the continuous-time dynamics of (2), conditional on the rate
not exiting the LP’s range, as

$\displaystyle\mathrm{d}p_{t}=\underbrace{\left(\tilde{\kappa}_{t}\,/\,\kappa\right)}_{\text{Position
depth}}\ \underbrace{\pi_{t}}_{\text{Fee rate}}\
\underbrace{\,2\,\kappa\,Z_{t}^{1/2}}_{\text{Pool size}}\,\mathrm{d}t\,,$ (8)

where $(\tilde{\kappa}_{t})_{t\in[0,T]}$ models the depth of the LP’s position
and $p$ is the LP’s fee income for providing liquidity with depth
$\tilde{\kappa}$ in the pool. The fee income is proportional to the pool size,
i.e., proportional to $2\,\kappa\,Z_{t}^{1/2}.$ Next, use the second equation
in (1) and equations (6)–(4) to write the dynamics of the LP’s position depth
$\tilde{\kappa}_{t}$ as

$\displaystyle\tilde{\kappa}_{t}=2\,\tilde{x}_{t}\,\left(\frac{1}{\delta_{t}^{\ell}+\delta_{t}^{u}}\right)\,Z_{t}^{-1/2}\,,$
(9)

so the dynamics in (10) become

$\displaystyle\mathrm{d}p_{t}=\left(\frac{4}{\delta_{t}^{\ell}+\delta_{t}^{u}}\right)\,\pi_{t}\,\tilde{x}_{t}\,\mathrm{d}t\,.$
(10)

In practice, the LP chooses how often to reposition her liquidity. Thus, the
LP faces the risk that the rate exits the spread around $Z$ in between the
times the LP repositions her liquidity. Clearly, the continuous-time dynamics
in (10) do not take into account concentration risk. In practice, narrow
spreads generate less fee income because the rate $Z$ may exit the range of
the LP’s liquidity, especially in volatile markets. Thus, we introduce a
concentration cost to reduce the fees collected by the LP. The concentration
costs increase (decrease) when the spread narrows (widens), so we modify the
dynamics of the fees collected by the LP in (10) to account for the
concentration cost and write

$\displaystyle\mathrm{d}p_{t}=\left(\frac{4}{\delta_{t}^{\ell}+\delta_{t}^{u}}\right)\,\pi_{t}\,\tilde{x}_{t}\,\mathrm{d}t\,-\gamma\,\left(\frac{1}{\delta_{t}^{\ell}+\delta_{t}^{u}}\right)^{2}\,\tilde{x}_{t}\,\mathrm{d}t\,,$
(11)

where $\gamma>0$ is the concentration cost parameter and $\tilde{x}_{t}$ is
the wealth invested by the LP in the pool at time $t.$

Figure 6 compares the fee income from (10) and from (11), which includes the
concentration cost, as a function of the spread of the LP’s position. We
simulate a driftless rate $Z$ with $\sigma=1\%$ and $\sigma=3\%$ and assume
that the LP adjusts her liquidity with a frequency of $\Delta t=1$ minute. The
fee income corresponding to every level of the spread is normalised by the
maximum ex-post fee income (the normalised maximum fee revenue is $1$). The
figure shows that the concentration cost term in (11) captures the loss in fee
revenue because of concentration risk. In addition, LPs should adapt the
concentration cost parameter $\gamma$ to the volatility of the rate $Z$. The
LP can also choose the value of $\gamma$ based on her beliefs about the future
realised volatility.

Figure 6: Fee income based on the dynamics in (10), without concentration cost
(i.e., $\gamma=0$), and in (11), with concentration cost $\gamma>0$. We use
simulations of the rate $Z$ in (3) and assume $\pi$ follows the mean-reverting
process
$\mathrm{d}\pi_{t}=a\left(b-\pi_{t}\right)\,\mathrm{d}t+c\,\mathrm{d}B_{t}$,
where $B_{t}$ is a standard Brownian motion independent of $W$. For the rate
$Z,$ we use $\mu=0,$ and $\sigma=1\,\%$ and $3\,\%.$ The parameters of the
pool fee rate $\pi,$ are obtained with maximum likelihood estimation from the
fee rate of the ETH/USDC pool in Figure 5. We obtain $a=2.71,$ $b=0.22\%,$ and
$c=0.18.$ For every spread value, we use (2) to obtain individual fee incomes
and use (10) to obtain the expected terminal fee income.

In the remainder of this work, we assume that the pool fee rate process
$\left(\pi\right)_{t\in[0,T]}$ follows the Cox–Ingersoll–Ross-type dynamics

$\displaystyle\mathrm{d}(\pi_{t}-\eta_{t})$
$\displaystyle=\Gamma\,\left(\overline{\pi}+\eta_{t}-\pi_{t}\right)\mathrm{d}t+\psi\,\sqrt{\pi_{t}-\eta_{t}}\,\mathrm{d}B_{t}\,.$
(12)

where $\left(\eta_{t}\right)_{t\in[0,T]}$ is a predictable process that we
define below, $\Gamma>0$ denotes the mean reversion speed, $\overline{\pi}>0$
is the long-term mean of $\left(\pi_{t}-\eta_{t}\right)_{t\in[0,T]}$, $\psi>0$
is a non-negative volatility parameter, $\left(B_{t}\right)_{t\in[0,T]}$ is a
Brownian motion independent of $\left(W_{t}\right)_{t\in[0,T]},$ and
$\pi_{0}-\eta_{0}>0$ is known. In our model, we set

$\eta_{t}=\frac{\sigma^{2}}{8}-\frac{\mu_{t}}{4}\left(\mu_{t}-\frac{\sigma^{2}}{2}\right)+\frac{\varepsilon}{4}\,.$
(13)

From (12) it follows that

$\displaystyle\pi_{t}-\eta_{t}\geq 0\implies
4\,\pi_{t}-\frac{\sigma^{2}}{2}+\mu_{t}\left(\mu_{t}-\frac{\sigma^{2}}{2}\right)\geq\varepsilon>0\,,\quad\forall
t\in[0,T]\,,$ (14)

which is a profitability condition that ensures that the spread $\delta$ of
the optimal strategy derived below in Section 4 is well defined. Financially,
the inequality in (14) guarantees that fee income is greater than the PL faced
by the LP, adjusted by the drift in the marginal rate. The profitability
condition (14) is further discussed in Section 4.3.

####  3.2.2 Fee income: drift and asymmetry

The stochastic drift $\mu$ indicates the future expected changes of the
marginal exchange rate in the pool. In practice, the LP may use a predictive
signal so $\mu$ represents the belief that the LP holds over the future
marginal exchange rate in the pool. For an LP who maximises fee revenue, it is
natural to consider asymmetric liquidity positions that capture the liquidity
taking flow. We define the _asymmetry_ of a position as

$\displaystyle\rho_{t}=\delta^{u}_{t}/\left(\delta^{u}_{t}+\delta^{\ell}_{t}\right)=\delta^{u}_{t}/\delta_{t}\,,$
(15)

where $\delta^{u}_{t}$ and $\delta^{\ell}_{t}$ are defined in (4). In one
extreme, when the asymmetry $\rho\to 0,$ then $Z^{u}\to Z$ and the position
consists of only asset $X,$ and in the other extreme, when $\rho\to 1,$ then
$Z^{\ell}\to Z$ and the position consists of only asset $Y.$

In this section, we use Uniswap v3 data to study how the asymmetry and the
width of the LP’s range of liquidity relate to fee revenue. First, we estimate
the realised drift $\mu$ in the pool ETH/USDC over a rolling window of $T=5$
minutes.333The values of the drift in this section are normalised to reflect
daily estimates. In particular, we use $\mu=\tilde{\mu}\,/\,\Delta t$ where
$\tilde{\mu}$ is the average of the observed log returns and $\Delta t$ is the
observed average LT trading frequency. Next, for any time $t$, the fee income
for different positions of the LP’s liquidity range is computed for various
values of the spread $\delta$ and for various values of the asymmetry $\rho.$
For each value of the realised drift $\mu$ during the investment horizon, and
for each fixed value of the spread $\delta,$ we record the asymmetry that
maximises fee income. Figure 7 shows the optimal (on average) asymmetry $\rho$
as a function of the spread $\delta$ of the position for multiple values of
the realised drift $\mu.$

Figure 7: Optimal position asymmetry $\rho^{\star}$ in (15) as a function of
the spread $\delta$ of the position, for multiple values of the drift $\mu.$
The asymmetry $\rho^{\star}$ is the value of $\rho$ that maximises fee income
for observed values of $\left(\delta,\mu\right).$

Figure 7 suggests that there exists a preferred asymmetry of the position for
a given value of the spread $\delta$ and a given value of the drift $\mu.$
First, for all values of the spread $\delta$, the LP skews her position to the
right when the drift is positive ($\rho^{\star}>0.5$) and she skews her
position to the left when the drift is negative ($\rho^{\star}<0.5$). Second,
for narrow spreads, the liquidity position requires more asymmetry than for
large spreads when the drift is not zero. Clearly, an optimal liquidity
provision model should take into account the drift $\mu$ and the spread of the
position to adjust the asymmetry $\rho$.

In our liquidity provision model of Section 4, the LP holds a belief over the
future exchange rate throughout the investment window and controls the spread
$\delta=\delta^{u}+\delta^{\ell}$ of her position. Thus, she strategically
chooses the asymmetry of her position as a function of $\delta$ and $\mu.$ We
approximate the relationship exhibited in Figure 7 with the asymmetry function

$\displaystyle\rho_{t}=\rho\left(\delta_{t},\mu_{t}\right)=\frac{1}{2}+\frac{\mu_{t}}{\delta_{t}}=\frac{1}{2}+\frac{\mu_{t}}{\delta_{t}^{u}+\delta_{t}^{\ell}}\,,\quad\forall
t\in[0,T]\,.$ (16)

In the next section, we derive an optimal liquidity provision strategy, and
prove that the profitability of liquidity provision is subject to a tradeoff
between fee revenue, PL, and concentration risk.

##  4 Optimal liquidity provision in CL pools

###  4.1 The problem

Consider an LP who wants to provide liquidity in a CPM with CL throughout the
investment window $[0,T]$. The LP implements a self-financing strategy that
constantly repositions liquidity in a range $(Z^{\ell}_{t},Z^{u}_{t}]$ around
the active rate $Z_{t}$, which requires depositing and withdrawing liquidity
continuously in the pool. The two ends of the spread,
$(\delta^{\ell}_{t})_{t\in[0,T]}$ and $(\delta^{u}_{t})_{t\in[0,T]}$, are
given in (4). The LP marks-to-market her holdings in terms of asset $X.$
Throughout the trading window, the LP’s wealth changes when the value of her
holdings in the pool change. Her positions in the pool accumulate earnings
from fees that she collects every time she withdraws her liquidity throughout
the trading horizon.

We work on the filtered probability space
$\left(\Omega,\mathcal{F},\mathbbm{P};\mathbbm{F}=(\mathcal{F}_{t})_{t\in[0,T]}\right)$
where $\mathcal{F}_{t}$ is the natural filtration generated by the collection
$\left(Z,\mu,\pi\right)$ and $[0,T]$ is the investment window. From the
dynamics in (3) and (12), the LP also observes $W$ and $B$, and $\eta$ is
determined by $\mu$, so the LP observes all the stochastic processes of this
problem.

The dynamics of the LP’s wealth consist of the fees earned and the position
value, i.e., the value of the LP’s holdings in the pool. Similar to Section
3.1, we denote the wealth process of the LP by
$(\tilde{x}_{t}=\alpha_{t}+p_{t})_{t\in[0,T]},$ with $\tilde{x}_{0}>0$ known,
and recall that $\left(\alpha_{t}\right)_{t\in[0,T]}$ is the value of the LP’s
position and $\left(p_{t}\right)_{t\in[0,T]}$ is the fee revenue. At any time
$t,$ the LP uses her wealth $\tilde{x}_{t}$ to provide liquidity, so the
dynamics of the LP’s position value are

$\displaystyle\mathrm{d}\alpha_{t}=$
$\displaystyle\,\,\tilde{x}_{t}\left(\frac{1}{\delta_{t}^{\ell}+\delta_{t}^{u}}\right)\left(-\frac{\sigma^{2}}{2}\,\mathrm{d}t+\mu_{t}\,\delta_{t}^{u}\,\mathrm{d}t+\sigma\,\delta_{t}^{u}\,\mathrm{d}W_{t}\right)\,.$
(17)

Throughout the investment window, we consider that the depth $\kappa$ of the
pool is constant and that liquidity taking activity in the pool generates fee
income that is proportional to the pool size, i.e., proportional to
$2\,\kappa\,Z_{t}^{1/2}.$ The proportion of the pool that is generated as
fees, which we denote as the pool fee rate, is given by the process
$\left(\pi_{t}\right)_{t\in[0,T]};$ see (11). Thus, the pool generates a
quantity $2\,\kappa\,Z_{t}^{1/2}\,\pi_{t}\,\mathrm{d}t$ in terms of asset $X$
over an infinitesimal time step, which is distributed among LPs proportionally
to the liquidity $\tilde{\kappa}_{t}$ they hold in the pool. The fee income of
the agent evolves as

$\displaystyle\mathrm{d}p_{t}$
$\displaystyle=\,\left(\frac{4}{\delta_{t}^{\ell}+\delta_{t}^{u}}\right)\,\pi_{t}\,\tilde{x}_{t}\,\mathrm{d}t-\gamma\,\left(\frac{1}{\delta^{\ell}+\delta^{u}}\right)^{2}\,\tilde{x}_{t}\,\mathrm{d}t\,,$
(18)

and recall that $\gamma\geq 0$ is the concentration cost parameter; see
Subsection 3.2. Thus, the dynamics of the LP’s wealth $\tilde{x}=\alpha+p$ are
given by

$\displaystyle\mathrm{d}\tilde{x}_{t}$
$\displaystyle=\tilde{x}_{t}\,\left(\frac{1}{\delta^{\ell}_{t}+\delta^{u}_{t}}\right)\,\left[-\frac{\sigma^{2}}{2}\,\mathrm{d}t+\mu_{t}\,\delta_{t}^{u}\,\mathrm{d}t+4\,\pi_{t}\,\mathrm{d}t+\sigma\,\delta_{t}^{u}\,\mathrm{d}W_{t}\right]-\gamma\,\left(\frac{1}{\delta^{\ell}_{t}+\delta^{u}_{t}}\right)^{2}\,\tilde{x}\,\mathrm{d}t\,,$
(19)

where $\pi$ follows the dynamics in (12).

As discussed in Section 3.2, the LP uses the stochastic drift $\mu$ to improve
trading performance so she adjusts the asymmetry
$\delta^{u}_{t}\,/\,\delta_{t}$ as a function of $\mu_{t}$ and the spread
$\delta_{t}$ of her position, and we write
$\rho_{t}=\rho\left(\mu_{t},\delta_{t}\right)$ where
$\rho\in\mathcal{C}^{1}\left(\mathbbm{R}\times\mathbbm{R},\mathbbm{R}\right)$
is a deterministic function; see Subsection 3.2. Next, use
$\delta_{t}=\delta^{u}_{t}+\delta_{t}^{\ell}$ and
$\delta^{u}_{t}\,/\,\delta_{t}=\rho\left(\mu_{t},\delta_{t}\right)$ in (19) to
write the dynamics of the LP’s wealth as

$\displaystyle\mathrm{d}\tilde{x}_{t}$
$\displaystyle=\frac{1}{\delta_{t}}\,\left(4\,\pi_{t}-\frac{\sigma^{2}}{2}\right)\,\tilde{x}_{t}\,\mathrm{d}t+\mu_{t}\,\rho\left(\delta_{t},\mu_{t}\right)\,\tilde{x}_{t}\,\mathrm{d}t+\sigma\,\rho\left(\delta_{t},\mu_{t}\right)\,\tilde{x}_{t}\,\mathrm{d}W_{t}-\frac{\gamma}{\delta_{t}^{2}}\,\tilde{x}_{t}\,\mathrm{d}t\,.$
(20)

###  4.2 The optimal strategy

The LP controls the spread $\delta$ of her position to maximise the expected
utility of her terminal wealth in units of $X$, and the set of admissible
strategies is

$\displaystyle\mathcal{A}_{t}=\left\\{(\delta_{s})_{s\in[t,T]},\
\mathbbm{R}\textrm{-valued},\ \mathbbm{F}\textrm{-adapted, and
}\int_{t}^{T}|\delta_{s}|^{2}\,\mathrm{d}s<+\infty\
\mathbb{P}\textrm{--a.s.}\right\\}\,$ (21)

with $\mathcal{A}:=\mathcal{A}_{0}.$

Let $\delta\in\mathcal{A}$. The performance criterion of the LP is a function
$u^{\delta}\colon[0,T]\times\mathbbm{R}^{4}\rightarrow\mathbbm{R}$ given by

$\displaystyle
u^{\delta}(t,\tilde{x},z,\pi,\mu)=\mathbbm{E}_{t,\tilde{x},z,\pi,\mu}\left[U\left(\tilde{x}_{T}^{\delta}\right)\right]\,,$
(22)

where $U$ is a concave utility function, and the value function
$u:[0,T]\times\mathbbm{R}^{4}\rightarrow\mathbbm{R}$ of the LP is

$u(t,\tilde{x},z,\pi,\mu)=\underset{\delta\in\mathcal{A}}{\sup}\,u^{\delta}(t,\tilde{x},z,\pi,\mu)\,.$
(23)

The following results solve the optimal liquidity provision model when the LP
assumes a general stochastic drift $\mu$ and adopts a logarithmic utility.

###### Proposition 1

Assume the asymmetry function $\rho$ is as in (16) and that $U(x)=\log(x).$
Then the function $w$ given by

$\displaystyle w\left(t,\tilde{x},z,\pi,\mu\right)=$
$\displaystyle\log\left(\tilde{x}\right)+\left(\pi-\eta\right)^{2}\int_{t}^{T}\mathbbm{E}_{t,\mu}\left[\frac{8}{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}\right]\exp\left(-2\,\Gamma\left(s-t\right)\right)\,\mathrm{d}s$
(24)
$\displaystyle+\left(\pi-\eta\right)\left(2\,\Gamma\,\overline{\pi}+\psi^{2}\right)\int_{t}^{T}\mathbbm{E}_{t,\mu}\left[C\left(s,\mu_{s}\right)\right]\exp\left(-\Gamma\left(s-t\right)\right)\,\mathrm{d}s$
(25)
$\displaystyle-\left(\pi-\eta\right)\int_{t}^{T}\mathbbm{E}_{t,\mu}\left[\frac{4\,\varepsilon}{2\,\gamma+\sigma^{2}\,\mu_{s}^{2}}\right]\exp\left(-\Gamma\left(s-t\right)\right)\,\mathrm{d}s$
(26)
$\displaystyle+\int_{t}^{T}\left(\Gamma\,\overline{\pi}\,\mathbbm{E}_{t,\mu}\left[E\left(s,\mu_{s}\right)\right]+\psi^{2}\,\mathbbm{E}_{t,\mu}\left[\eta_{s}\,C\left(s,\mu_{s}\right)\right]\right)\mathrm{d}s$
(27)
$\displaystyle-\int_{t}^{T}\left(\mathbbm{E}_{t,\mu}\left[\frac{1}{2}\frac{\varepsilon^{2}}{2\,\gamma+\sigma^{2}\,\mu_{s}^{2}}+\frac{\mu_{s}}{2}\right]\right)\mathrm{d}s-\pi\frac{\sigma^{2}}{8}\left(T-t\right)\,,$
(28)

where
$\eta_{s}=\frac{\sigma^{2}}{8}-\frac{\mu_{s}}{4}\left(\mu_{s}-\frac{\sigma^{2}}{2}\right)+\frac{\varepsilon}{4}\,,$
$\eta=\frac{\sigma^{2}}{8}-\frac{\mu}{4}\left(\mu-\frac{\sigma^{2}}{2}\right)+\frac{\varepsilon}{4}\,,$
$\mathbbm{E}_{t,\mu}$ represents expectation conditioned on $\mu_{t}=\mu$ (or
$\eta_{t}=\eta$), and

$C\left(t,\mu\right)=\mathbbm{E}_{t,\mu}\left[\,\int_{t}^{T}\frac{8}{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}\exp\left(-2\,\Gamma\left(s-t\right)\right)\,\mathrm{d}s\right]\,,$

and

$E\left(t,\mu\right)=\mathbbm{E}_{t,\mu}\left[\,\int_{t}^{T}\left(\left(2\,\Gamma\,\overline{\pi}+\psi^{2}\right)C\left(s,\mu\right)+\frac{4\,\varepsilon}{2\,\gamma+\sigma^{2}\,\mu_{s}^{2}}\right)\exp\left(-\Gamma\left(s-t\right)\right)\,\mathrm{d}s\right]\,,$

solves the HJB equation associated with problem (23).

For a proof, see B.1.

###### Theorem 1

Assume the asymmetry function $\rho$ is as in (16) and that $U(x)=\log(x).$
Then, the solution in Proposition 1 is the unique solution to the optimal
control problem (23), and the optimal spread
$\left(\delta_{s}\right)_{s\in[t,T]}\in\mathcal{A}_{t}$ is given by

$\displaystyle\delta_{s}^{\star}=\frac{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}{4\,\pi_{s}-\frac{\sigma^{2}}{2}+\mu_{s}\left(\mu_{s}-\frac{\sigma^{2}}{2}\right)}=\frac{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}{4\left(\pi_{s}-\eta_{s}\right)+\varepsilon}\,,$
(29)

where
$\eta_{s}=\frac{\sigma^{2}}{8}-\frac{\mu_{s}}{4}\left(\mu_{s}-\frac{\sigma^{2}}{2}\right)+\frac{\varepsilon}{4}\,.$

For a proof, see B.2.

###  4.3 Discussion: profitability, PL, and concentration risk

In this section, we study how the strategy depends on various model parameters
(volatility $\sigma$ of the pool’s marginal rate, fees paid to the LP, and
terminal date $T$) when $\mu\equiv 0\,.$ When the LP does not assume a
stochastic drift, the position is symmetric so $\rho=1/2$ and
$\delta^{u}_{t}=\delta^{\ell}_{t}=\delta_{t}/2$,444The position range is
approximately symmetric around the position rate $Z$ because
$\delta^{u}_{t}=\delta^{\ell}_{t}$ does not imply that $Z-Z^{\ell}=Z^{u}-Z;$
see (4). However, for small values of $\delta^{\ell}$ and $\delta^{u},$ one
can write the approximation $Z-Z^{\ell}\approx Z^{u}-Z$, in which case the
position is symmetric around the rate $Z$. so the optimal spread (29) becomes

$\displaystyle\delta_{t}^{\ell\,\star}=\delta_{t}^{u\,\star}=\frac{2\,\gamma}{8\,\pi_{s}-\sigma^{2}}\,\quad\implies\quad\delta_{t}^{\star}=\frac{4\,\gamma}{8\,\pi_{s}-\sigma^{2}}$
(30)

and the inequality in (14) becomes

$\displaystyle 4\,\pi_{t}-\frac{\sigma^{2}}{2}\geq\varepsilon>0\,,\quad\forall
t\in[0,T]\,.$ (31)

The inequality in (31) guarantees that the optimal control (30) does not
explode, and ensures that fee income is large enough for LP activity to be
profitable. In particular, it ensures that $\pi>\sigma^{2}/8+\varepsilon.$
Note that when $\varepsilon\to 0$, i.e., when $\sigma^{2}/4\to\pi,$ the spread
$\delta\to+\infty\,.$ However, we require that the spread
$\delta=\delta^{u}+\delta^{\ell}\leq 4.$ Note that $\delta=4$ when
$\delta^{\ell}=\delta^{u}=2,$ so the conditions $\delta^{\ell}\leq 2$ and
$\delta^{u}\leq 2$ become

$\displaystyle\frac{\gamma}{4\,\pi-\frac{\sigma^{2}}{2}}\leq
2\implies\pi-\frac{\gamma}{8}\geq\frac{\sigma^{2}}{8}\,.$ (32)

When $\delta^{\ell}=\delta^{u}=2,$ the LP provides liquidity in the maximum
range $(0\,,+\infty),$ so the depth of her liquidity position $\tilde{\kappa}$
is minimal, the PL is minimal, and the LP’s position is equivalent to
providing liquidity in CPMs without CL; see Cartea et al. (2023) for more
details. In that case, the dynamics of PL in (3.1) are

$\mathrm{d}\text{PL}_{t}=-\frac{\sigma^{2}}{8}\,\alpha_{t}\,\mathrm{d}t\,,$

so $\sigma^{2}/8$ is the lowest rate at which the LP’s assets can depreciate
due to PL.

On the other hand, when $\delta\leq 4$, the depreciation rate of the LP’s
position value in (3.1) is higher. In particular, if
$\delta=\delta^{\text{tick}}$, where $\delta^{\text{tick}}$ is the spread of a
liquidity position concentrated within a single tick range, then the depth of
the LP’s liquidity position $\tilde{\kappa}$ is maximal and the PL is maximal.
In that case, the dynamics of PL in (3.1) are

$\mathrm{d}\text{PL}_{t}=-\frac{\sigma^{2}}{2\,\delta^{\text{tick}}}\,\alpha_{t}\,\mathrm{d}t\,,$

so $\sigma^{2}/2\,\delta^{\text{tick}}$ is the highest rate at which the LP’s
assets can depreciate due to PL.

LPs should track the profitability of the pools they consider and check if the
expected fee revenue covers PL before considering depositing their assets in
the pool. When $\mu=0,$ we propose that LPs use $\sigma^{2}/8$ as a rule-of-
thumb threshold for the pool’s rate of profitability because $\sigma^{2}/8$ is
the lowest rate of depreciation of their wealth in the pool.

The condition in (32) ensures that the profitability $\pi-\gamma/8,$ which is
the pool fee rate adjusted by the concentration cost, is higher than the
depreciation rate of the LP’s assets in the pool. Thus, the condition imposes
a minimum profitability level of the pool, so LP activity is viable. An
optimal control $\delta^{\star}>4$ indicates non-viable LP activity because
fees are not enough to compensate for the PL borne by the LP. Figure 8 shows
the estimated pool fee rate and the estimated depreciation rate in the
ETH/USDC pool (from January to August 2022). In particular, the CIR model
captures the dynamics of $\pi_{t}-\sigma^{2}/8.$

Figure 8: Estimated pool fee rate from February to August 2022 in the ETH/USDC
pool. For any time $t$, the pool fee rate is the total fee income, as a
percentage of the total pool size, paid by LTs in the period $[t-1\text{
day},t].$ The pool size at time $t$ is $2\,\kappa\,Z_{t}^{1/2}$ where $Z_{t}$
is the active rate in the pool at time $t.$

Next, we study the dependence of the optimal spread on the value of the
concentration cost coefficient $\gamma,$ the fee rate $\pi,$ and the
volatility $\sigma$. The concentration cost coefficient $\gamma$ scales the
spread linearly in (30). Recall that the cost term penalises small spreads
because there is a risk that the rate will exit the LP’s range. Thus, large
values of $\gamma$ generate large values of the spread. Figure 9 shows the
optimal spread as a function of the pool fee rate $\pi$. Large potential fee
income pushes the strategy towards targeting more closely the marginal rate
$Z$ to profit from fees. Finally, Figure 10 shows that the optimal spread
increases as the volatility of the rate $Z$ increases.

Figure 9: Optimal LP position range $\left(Z^{\ell},Z^{u}\right]$ as a
function of the pool fee rate $\pi$ for different values of the concentration
cost parameter $\gamma,$ when $Z=100,$ $\sigma=0.02,$ and $\mu=0.$
Figure 10: Optimal LP position range $\left(Z^{\ell},Z^{u}\right]$ as a
function of the volatility $\sigma$ for different values of the concentration
cost parameter $\gamma,$ when $Z=100,$ $\pi=0.02,$ and $\mu=0.$

Finally, the optimal spread does not depend on time or the terminal date $T.$
Note that the LP marks-to-market her wealth in units of $X,$ but does not
penalise her holdings in asset $Y$. In particular, the LP’s performance
criterion does not include a running penalty or a final liquidation penalty
(to turn assets into cash or into the reference asset). For example, if at the
end of the trading window the holdings in asset $Y$ must be exchanged for $X$,
then the optimal strategy would skew, throughout the trading horizon, the
liquidity range to convert holdings in $Y$ into $X$ through LT activity.555In
LOBs, one usually assumes that final inventory is liquidated with adverse
price impact and that there is a running inventory penalty, thus market making
strategies in LOBs depend on the terminal date $T$.

###  4.4 Discussion: drift and position skew

In this section, we study how the strategy depends on the stochastic drift
$\mu$. Use $\delta_{t}=\delta^{\ell}_{t}+\delta^{u}_{t}$ and
$\rho\left(\delta_{t},\mu_{t}\right)=\delta^{u}_{t}/\delta_{t}$ to write the
two ends of the optimal spread as

$\displaystyle\delta_{t}^{u\,\star}=\frac{2\,\gamma+\mu_{t}^{2}\,\sigma^{2}}{8\,\pi_{t}-\sigma^{2}+2\,\mu_{t}\left(\mu_{t}-\frac{\sigma^{2}}{2}\right)}+\mu_{t}\quad\text{and}\quad\delta_{t}^{\ell\,\star}=\frac{2\,\gamma+\mu_{t}^{2}\,\sigma^{2}}{8\,\pi_{t}-\sigma^{2}+2\,\mu_{t}\left(\mu_{t}-\frac{\sigma^{2}}{2}\right)}-\mu_{t}\,.$
(33)

The inequality in (14) guarantees that the optimal control in (33) does not
explode and ensures that fee income is large enough for LP activity to be
profitable. The profitability condition in (32) becomes

$\pi_{t}-\frac{\gamma}{8}\geq\frac{\sigma^{2}}{8}\left(\frac{\mu_{t}^{2}\,}{2}+1\right)-\frac{\mu_{t}}{4}\left(\mu_{t}-\frac{\sigma^{2}}{2}\right)\,,$
(34)

so LPs that assume a stochastic drift in the dynamics of the exchange rate $Z$
should use this simplified measure of the depreciation rate due to PL as a
rule-of-thumb before considering depositing their assets in the pool.

Next, we study the dependence of the optimal spread on the value of the drift
$\mu$. First, recall that the controls in (33) must obey the
inequalities666The admissible set of controls is not restricted to these
ranges. However, values outside these range cannot be implemented in practice.

$0<\delta^{\ell}_{t}\leq 2\quad\text{and}\quad 0\leq\delta^{u}_{t}<2\,,$

because $0\leq Z^{\ell}<Z^{u}<\infty$ and $Z_{t}\in(Z^{\ell}_{t},Z^{u}_{t}]$,
which together with (5) implies $0\leq\delta_{t}\leq 4$. Next, the asymmetry
function satisfies

$0<\rho\left(\delta_{t},\mu\right)=\frac{\delta^{u}_{t}}{\delta_{t}}<1\,,$
(35)

which implies

$0\leq\rho\left(\delta_{t},\mu\right)\,\delta_{t}<2\quad\text{and}\quad
0\leq\left(1-\rho\left(\delta_{t},\mu\right)\right)\,\delta_{t}<2\,.$ (36)

Now, use (16) and (36) to write

$0\leq\left(\frac{1}{2}+\frac{\mu}{\delta_{t}}\right)\,\delta_{t}<2\quad\text{and}\quad
0\leq\left(\frac{1}{2}-\frac{\mu}{\delta_{t}}\right)\,\delta_{t}<2\,.$ (37)

Finally, use (35) and (37) to obtain the inequalities

$\displaystyle 2\,\left|\mu\right|\leq\delta_{t}\leq 4-2\,\left|\mu\right|\,,$
(38)

so $\mu$ must be in the range $\left[-1,1\right]$ for the LP to provide
liquidity. If $\mu$ is outside this range, concentration risk is too high so
the LP must withdraw her holdings from the pool. Recall that the dynamics of
$Z$ are geometric and $\mu$ is a percentage drift, so values of $\mu$ outside
the range $\left[-1,1\right]$ are unlikely. Moreover, when $\mu=-1,$ the drift
of the exchange rate $Z$ is large and negative so the optimal range is
$(0,Z],$ i.e., the largest possible range to the left of $Z.$ When $\mu=1,$
the drift of the exchange rate $Z$ is large and positive so the optimal range
is $(Z,+\infty),$ which is the largest possible range to the right of $Z.$
Condition (38) is always verified when we study the performance of the
strategy in the ETH/USDC pool. Figure 11 shows how the optimal spread adjusts
to the value of the drift $\mu$. Finally, note that

$\frac{\partial\delta^{u\,\star}}{\partial\sigma}=\frac{\partial\delta^{\ell\,\star}}{\partial\sigma}=\frac{2\,\mu^{2}\,\sigma\left(4\,\pi-4\,\eta+\varepsilon\right)+4\,\sigma\left(1+\mu\right)\left(2\,\gamma+\mu^{2}\,\sigma^{2}\right)}{\left(4\,\pi-4\,\eta+\varepsilon\right)^{2}}>0\,,\qquad\forall\mu\in[-1,1]\,,$
(39)

shows that the optimal range is strictly increasing in the volatility $\sigma$
of the rate $Z,$ which one expects as increased activity that exposes the
position value to more PL, and increases the concentration risk.

Figure 11: Optimal LP position range $\left(Z^{\ell},Z^{u}\right]$ as a
function of the drift $\mu$ for different values of the concentration cost
parameter $\gamma,$ when $Z=100,$ $\pi=0.02,$ and $\sigma=0.02.$

##  5 Performance of strategy

###  5.1 Methodology

In this section, we use Uniswap v3 data between 1 January and 18 August 2022
(see data description in A) to study the performance of the strategy of
Section 4. We consider execution costs and discuss how gas fees and liquidity
taking activity in the pool affect the performance of the strategy.777In
practice, LPs pay gas fees when using the Ethereum network to deposit
liquidity, withdraw liquidity, and adjust their holdings. Gas is paid in
Ether, the native currency of the Ethereum network, and measures the
computational effort of the LP operation; see Cartea et al. (2022).

Our strategy in Section 4 is solved in continuous time. In our performance
study, we discretise the trading window in one-minute periods and the optimal
spread is fixed at the beginning of each time-step. That is, let $t_{i}$ be
the times where the LP interacts with the pool, where $i\in\\{1,\dots,N\\}$
and $t_{i+1}-t_{i}=1$ minute. For each time $t_{i},$ the LP uses the optimal
strategy in (33) based on information available at time $t_{i},$ and she fixes
the optimal spread of her position throughout the period $[t_{i},t_{i+1});$
recall that the optimal spread is not a function of time.

To determine the optimal spread (33) of the LP’s position at time $t_{i},$ we
use in-sample data $[t_{i}-\text{1 day},t_{i}]$ to estimate the parameters.
The volatility $\sigma$ of the rate $Z$ is given by the standard deviation of
one-minute log returns of the rate $Z,$ which is multiplied by $\sqrt{1440}$
to obtain a daily estimate. The pool fee rate $\pi_{t}$ is given by the total
fee income generated by the pool during the in-sample period, divided by the
pool size $2\,\kappa\,Z_{t}^{1/2}$ observed at time $t,$ where $\kappa$ is the
observed active depth at time $t.$ The concentration cost is $\gamma=5\times
10^{-7}$ and it penalises small spreads as shown in Figure 12. Finally,
prediction of the future marginal rate $Z$ is out of the scope of this work,
thus we set $\mu=0$ and $\rho=0.5.$

Figure 12: Concentration cost term $\gamma/\delta^{2}$ as a function of the
position spread when $\gamma=5\times 10^{-7}\,,$ where
$\delta=\delta^{u}+\delta^{\ell}\,.$ The spread is in percentage of the
marginal exchange rate; recall that
$\left(Z_{t}^{u}-Z^{\ell}_{t}\right)/Z_{t}\approx\delta_{t}.$

To compute the LP’s performance as a result of changes in the value of her
holdings in the pool (position value), and as a result of fee income, we use
out-of-sample data $[t_{i},t_{i+1}].$ For the position value, we use equation
(17) to determine the one-minute out-of-sample period. For fee income, we use
LT transactions in the pool at rates included in the range
$\left(Z_{t}^{\ell},Z_{t}^{u}\right]$ and equation (2). The income from fees
accumulates in a separate account in units of $X$ with zero risk-free
rate.888In practice, fees accumulate in both assets $X$ and $Y.$ At the end of
the out-of-sample window, the LP withdraws her liquidity and earns the
accumulated fees, and we repeat the in-sample estimation and out-of-sample
liquidity provision described above. Thus, at times $t_{i},$ where
$i\in\\{1,\dots,N-1\\},$ the LP consecutively withdraws and deposits liquidity
in different ranges. Between two consecutive operations (i.e., reposition
liquidity provision), the LP may need to take liquidity in the pool to adjust
her holdings in asset $X$ and $Y.$ In that case, we use results in Cartea et
al. (2022) to compute execution costs.999The authors in Cartea et al. (2022)
show that execution costs in the pool are a closed-form function of the rate
$Z,$ the pool depth $\kappa,$ and the transaction size. In particular, we
consider execution costs when the LP trades asset $Y$ in the pool to adjust
her holdings between two consecutive operations. More precisely, we consider
that for every quantity $y$ of asset $Y$ bought or sold in the pool, a
transaction cost $y\,Z_{t}^{3/2}/\kappa$ is incurred. We assume that the LP’s
taking activity does not impact the dynamics of the pool. Finally, we obtain
331,858 individual LP operations from 1 January to 18 August 2022.

###  5.2 Benchmark

We compare the performance of our strategy with the performance of LPs in the
pool we consider. We select operation pairs that consist of first providing
and then withdrawing the same depth of liquidity $\tilde{\kappa}$ at two
different points in time by the same LP.101010In blockchain data, every
transaction is associated to a unique wallet address. The operations that we
select represent approximately $66\%$ of all LP operations. Figure 13 shows
the distribution of key variables that describe how LPs provide liquidity. The
figure shows the distribution of the number of operations per LP, the changes
in the position value, the length of time the position is held in the pool,
and the position spread.

Figure 13: From left to right: distribution of the number of operations per
LP, changes in the holdings value as a percentage of initial wealth, position
hold time, and position spread. ETH/USDC pool with selected operations from
5,156 LPs between 5 May 2021 and 18 August 2022.

Finally, Table 2 shows the average and standard deviation of the distributions
in Figure 13. Notice that the bulk of liquidity is deposited in small ranges,
and positions are held for short periods of time; $20\%$ of LP positions are
held for less than five minutes and $30\%$ for less than one hour. Table 2
also shows that, on average, the performance of the LP operations in the pool
and the period we consider is $-1.49\,\%$ per operation.

| Average | Standard deviation
---|---|---
Number of |  |
transactions per LP | $11.5$ | $40.2$
Position value performance |  |
($\alpha_{T}/\tilde{x}_{0}-1$) | $-1.64\%$ | $7.5\%$
Fee income |  |
($p_{T}/\tilde{x}_{0}-1$) | $0.155\%$ | $0.274\%$
Hold time |  $6.1$ days |  $22.4$ days
Spread | $18.7\%$ | $43.2\%$
Table 2: LP operations statistics in the ETH/USDC pool using operation data of
5,156 different LPs between 5 May 2021 and 18 August 2022. Performance
includes transaction fees and excludes gas fees. The position value
performance and the fee income are not normalised by the hold time.

###  5.3 Performance results

This subsection focuses on the performance of our strategy when gas fees are
zero — at the end of the section we discuss the profitability of the strategy
when gas fees are included. Figure 14 shows the distribution of the optimal
spread (30) posted by the LP. The bulk of liquidity is deposited in ranges
with a spread $\delta$ below $1\%$. Table 2 compares the average performance
of the components of the optimal strategy with the performance of LP
operations observed in the ETH/USDC pool.111111In particular, performance is
given for the selected operations shown in Figure 13. Table 3 suggests that
the position of the LP loses value in the pool (on average) because of PL;
however, the fee income would cover the loss, on average, if one assumes that
gas fees are zero. Finally, the results show that our optimal strategy
significantly improves the PnL of LP activity in the pool and the performance
of the assets themselves.

Figure 14: Distribution of the position spread $\delta.$ | Position value performance | Fee income | Total performance
---|---|---|---
| per operation | per operation | per operation
|  |  | (with transaction costs,
|  |  | without gas fees)
Optimal strategy | $-0.015\%$ | $0.0197\%$ | $0.0047\%$
| $(0.0951\%)$ | $(0.005\%)$ | $(0.02\%)$
Market | $-0.0024\%$ | $0.0017\%$ | $-0.00067\%$
| $(0.02\%)$ | $(0.005\%)$ | $(0.02\%)$
Hold | n.a. | n.a. | $-0.00016\%$
|  |  | $(0.08\%)$
Table 3: Optimal strategy: Mean and standard deviation of the one-minute
performance of the LP strategy (30) and its components. Market: Mean and
standard deviation of one-minute performance of LP activity in the ETH/USDC
pool using data between 1 January and 18 August 2022. Hold: Mean and standard
deviation of the one-minute performance of holding the assets. In all cases,
the performance includes transaction costs (pool fee and execution cost), but
does not include gas fees.

The results in Table 3 do not consider gas fees. Gas cost is a flat fee, so it
does not depend on the position spread or size of transaction. If the activity
of the LP does not affect the pool and if the fees collected scale with the
wealth that the LP deposits in the pool, then the LP should consider an
initial amount of $X$ and $Y$ that would yield fees enough to cover the flat
gas fees. An estimate of the average gas cost gives an estimate of the minimum
amount of initial wealth for a self-financing strategy to be profitable.
Recall that, at any point in time $t,$ the LP withdraws her liquidity, adjusts
her holdings, and then deposits new liquidity. In the data we consider, the
average gas fee is $30.7\,$ USD to provide liquidity, $24.5\,$ USD to withdraw
liquidity, and $29.6\,$ USD to take liquidity. Average gas costs are obtained
from blockchain data which record the gas used for every transaction, and from
historical gas prices. The LP pays a flat fee of $84.8$ USD per operation when
implementing the strategy in the pool we consider, so the LP strategy is
profitable, on average, if the initial wealth deposited in the pool is greater
than $1.8\times 10^{6}$ USD.

Fee income of the LP strategy is limited by the volume of liquidity taking
activity in the pool, so one should not only consider increasing the initial
wealth to make the strategy more profitable. There are $4.7$ LT transactions
per minute and the average volume of LT transactions is $477,275$ USD per
minute, so if the LP were to own $100\%$ of the available liquidity, the
average fee income per operation would be 1,431 USD.

Finally, our analysis did not take into account the impact of liquidity
provision on liquidity taking activity, however, we expect liquidity provision
in CPMs with CL to be profitable in pools where the volatility of the marginal
rate is low, where liquidity taking activity is high, and when the gas fee
cost to interact with the liquidity pools is low. These conditions ensure that
the fees paid to LPs in the pool, adjusted by gas fees and concentration cost,
exceed PL so liquidity provision is viable.

##  6 Conclusions

We studied the dynamics of the wealth of an LP in a CPM with CL who implements
a self-financing strategy that dynamically adjusts the range of liquidity. The
wealth of the LP consists of the position value and fee revenue. We showed
that the position value depreciates due to PL and the LP widens her liquidity
range to minimise her exposure to PL. On the other hand, the fee revenue is
higher for narrow ranges, but narrow ranges also increase concentration risk.

We derived the optimal strategy to provide liquidity in a CPM with CL when the
LP maximises expected utility of terminal wealth. This strategy is found in
closed-form for log-utility of wealth, and it shows that liquidity provision
is subject to a profitability condition. In particular, the potential gains
from fees, net of gas fees and concentration costs, must exceed PL. Our model
shows that the LP strategically adjusts the spread of her position around the
reference exchange rate; the spread depends on various market features
including tthe volatility of the rate, the liquidity taking activity in the
pool, and the drift of the rate.

##  Appendix A Uniswap v3 ETH/USDC pool data statistics

ETH represents _Ether_ , the Ethereum blockchain native currency. USDC
represents _USD coin_ , a currency fully backed by U.S. Dollars (USD). The
fees paid by LTs is $0.05\%$ of trade size; the fee is deducted from the
quantity paid into the pool by the LT and distributed among LPs; see equation
(2).

Uniswap v3 pools can be created with different values of the LT trading fee,
e.g., $0.01\%,$ $0.05\%,$ $0.30\%,$ or $1\%,$ called fee tiers. Additionally,
different pools with the same asset pair may coexist if they have different
fee tiers. Once a pool is created, its fee tier does not change.

| LT | LP
---|---|---
Number of instructions | 2,654,347 | 68,434
Average daily number |  |
of instructions | 4,720 | 471
Total USD volume |  $\approx$ $ 262$\times 10^{9}$ |  $\approx$ $ 232 $\times 10^{9}$
Average daily USD volume | $ 554,624,500 | $ 863,285
Average LT transaction |  |
or LP operation size | $ 98,624 | $ 3,611,197
Average interaction frequency | 13 seconds | 590 seconds
Table 4: LT and LP activity in the ETH/USDC pool between 5 May 2021 and 18
August 2022: Total and average daily count of LT transactions and LP
operations in the pool, total and average daily size of LT transactions and LP
operations in the pool in USD, average LT transaction size and average LP
operation size in USD dollars, and average liquidity taking and provision
frequency.

##  Appendix B Proofs

###  B.1 Proof of Proposition 1

To solve the problem (23), we introduce an equivalent control problem. First,
define the process
$\left(\tilde{\pi}_{t}\right)_{t\in[0,T]}=\left(\pi_{t}-\eta_{t}\right)_{t\in[0,T]}$
with dynamics

$d\tilde{\pi}_{t}=\Gamma\,\left(\overline{\pi}-\tilde{\pi}_{t}\right)\mathrm{d}t+\psi\,\sqrt{\tilde{\pi}_{t}}\,\mathrm{d}B_{t}\,,$

where $\tilde{\pi}_{0}=\pi_{0}-\eta_{0}$ and $\eta$ is in (13).

We introduce the performance criterion
$\tilde{u}^{\delta}\colon[0,T]\times\mathbbm{R}^{4}\rightarrow\mathbbm{R}$
given by

$\displaystyle\tilde{u}^{\delta}(t,\tilde{x},z,\pi,\mu)=\mathbbm{E}_{t,\tilde{x},z,\tilde{\pi},\mu}\left[\log\left(\tilde{x}_{T}^{\delta}\right)\right]\,,$
(40)

and the value function
$\tilde{u}:[0,T]\times\mathbbm{R}^{4}\rightarrow\mathbbm{R}$ given by

$\tilde{u}(t,\tilde{x},z,\tilde{\pi},\mu)=\underset{\delta\in\mathcal{A}}{\sup}\,u^{\delta}(t,\tilde{x},z,\pi,\mu)\,.$
(41)

Clearly, the problems (41) and (23) are equivalent, and the value functions
satisfy $u(t,\tilde{x},z,\pi,\mu)=\tilde{u}(t,\tilde{x},z,\tilde{\pi},\mu)$
for all
$\left(t,\tilde{x},z,\pi,\mu\right)\in\colon[0,T]\times\mathbbm{R}^{4}$ and
for all $\tilde{\pi}=\pi-\eta\in\mathbbm{R}$, where
$\eta=\frac{\sigma^{2}}{8}-\frac{\mu}{4}\left(\mu-\frac{\sigma^{2}}{2}\right)+\frac{\varepsilon}{4}\,.$

The value function in (41) admits the dynamic programming principle, so it
satisfies the HJB equation

$\displaystyle 0=$
$\displaystyle\,\partial_{t}w+\frac{1}{2}\sigma^{2}\,z^{2}\,\partial_{zz}w+\mu\,Z\,\partial_{z}w+\Gamma\left(\overline{\pi}-\tilde{\pi}\right)\partial_{\tilde{\pi}}w+\frac{1}{2}\,\psi^{2}\tilde{\pi}\partial_{\tilde{\pi}\tilde{\pi}}w+\mathcal{L}^{\mu}w$
(42)
$\displaystyle+\underset{\delta\in\mathbb{R}^{+}}{\sup}\Bigg{(}\frac{1}{\delta}\left(4\,\tilde{\pi}+4\,\eta-\frac{\sigma^{2}}{2}\right)\tilde{x}\,\partial_{\tilde{x}}w+\mu\,\rho\left(\delta,\mu\right)\,\tilde{x}\,\partial_{\tilde{x}}w+\frac{1}{2}\,\sigma^{2}\,\rho\left(\delta,\mu\right)^{2}\,\tilde{x}^{2}\,\partial_{\tilde{x}\tilde{x}}w$
(43)
$\displaystyle\qquad\quad\quad\quad-\frac{\gamma}{\delta^{2}}\,\tilde{x}\,\partial_{\tilde{x}}w+\sigma^{2}\,\rho\left(\delta,\mu\right)\,\tilde{x}\,z\,\partial_{\tilde{x}z}w\Bigg{)}\,,$
(44)

with terminal condition

$\displaystyle
w(T,\tilde{x},z,\tilde{\pi},\mu)=\log\left(\tilde{x}\right),\quad\forall\left(\tilde{x},z,\tilde{\pi},\mu\right)\in\mathbbm{R}^{4}\,,$
(45)

where $\mathcal{L}^{\mu}$ is the infinitesimal generator of $\mu$.

To study the HJB in (42), use the ansatz

$\displaystyle
w\left(t,\tilde{x},z,\tilde{\pi},\mu\right)=\log\left(\tilde{x}\right)+\theta\left(t,z,\tilde{\pi},\mu\right)\,,$
(46)

to obtain the HJB

$\displaystyle 0=$
$\displaystyle\,\partial_{t}\theta+\frac{1}{2}\sigma^{2}\,z^{2}\,\partial_{zz}\theta+\mu\,Z\,\partial_{z}\theta+\Gamma\left(\overline{\pi}-\tilde{\pi}\right)\partial_{\tilde{\pi}}w+\frac{1}{2}\,\psi^{2}\tilde{\pi}\partial_{\tilde{\pi}\tilde{\pi}}w+\frac{\mu}{2}-\frac{1}{8}\,\sigma^{2}$
(47)
$\displaystyle+\mathcal{L}^{\mu}\theta+\underset{\delta\in\mathbb{R}^{+}}{\sup}\Bigg{(}\frac{1}{\delta}\left(4\,\tilde{\pi}+4\,\eta-\frac{\sigma^{2}}{2}\right)+\frac{\mu^{2}}{\delta}-\frac{1}{2}\,\sigma^{2}\,\left(\frac{\mu^{2}}{\delta^{2}}+\frac{\mu}{\delta}\right)-\frac{\gamma}{\delta^{2}}\Bigg{)}\,,$
(48)

with terminal condition

$\displaystyle\theta\left(T,z,\tilde{\pi},\mu\right)=0\,,\quad\forall(z,\tilde{\pi},\mu)\in\mathbbm{R}^{3}\,.$
(49)

The supremum in the HJB (47) is attained at

$\delta^{\star}=\frac{2\,\gamma+\mu^{2}\,\sigma^{2}}{4\,\tilde{\pi}+4\,\eta-\frac{\sigma^{2}}{2}+\mu\left(\mu-\frac{\sigma^{2}}{2}\right)}=\frac{2\,\gamma+\mu^{2}\,\sigma^{2}}{4\,\tilde{\pi}+\epsilon}\,.$

Thus, (47) becomes

$\displaystyle 0=$
$\displaystyle\,\partial_{t}\theta+\frac{1}{2}\sigma^{2}\,z^{2}\,\partial_{zz}\theta+\mu\,Z\,\partial_{z}\theta+\Gamma\left(\overline{\pi}-\tilde{\pi}\right)\partial_{\tilde{\pi}}\theta+\frac{1}{2}\,\psi^{2}\tilde{\pi}\partial_{\tilde{\pi}\tilde{\pi}}\theta+\frac{\mu}{2}-\frac{\sigma^{2}}{8}+\mathcal{L}^{\mu}\theta+\frac{1}{2}\frac{\left(4\,\tilde{\pi}+\epsilon\right)^{2}}{2\,\gamma+\mu^{2}\,\sigma^{2}}\,.$
(50)

Next, substitute the ansatz

$\displaystyle\theta\left(t,z,\tilde{\pi},\mu\right)=$
$\displaystyle\,A\left(t,\mu\right)z^{2}+B\left(t,\mu\right)\tilde{\pi}\,z+C\left(t,\mu\right)\tilde{\pi}^{2}$
(51)
$\displaystyle+D\left(t,\mu\right)z+E\left(t,\mu\right)\tilde{\pi}+F\left(t,\mu\right)\,,$
(52)

in (47), collect the terms in $Z$ and $\tilde{\pi}$, and write the following
system of PDEs:

$\displaystyle\begin{cases}\left(\partial_{t}+\mathcal{L}^{\mu}\right)A\left(t,\mu\right)=&-\sigma^{2}\,A\left(t,\mu\right)-2\,\mu\,A\left(t,\mu\right)\>,\\\
\left(\partial_{t}+\mathcal{L}^{\mu}\right)B\left(t,\mu\right)=&-\mu\,B\left(t,\mu\right)+\Gamma
B\left(t,\mu\right)\>,\\\
\left(\partial_{t}+\mathcal{L}^{\mu}\right)C\left(t,\mu\right)=&2\,C\left(t,\mu\right)\Gamma-\frac{8}{2\,\gamma+\mu^{2}\,\sigma^{2}}\>,\\\
\left(\partial_{t}+\mathcal{L}^{\mu}\right)D\left(t,\mu\right)=&-\mu\,D\left(t,\mu\right)-\Gamma\,\overline{\pi}\,B\left(t,\mu\right)\>,\\\
\left(\partial_{t}+\mathcal{L}^{\mu}\right)E\left(t,\mu\right)=&-2\,\Gamma\,\overline{\pi}\,C\left(t,\mu\right)-\psi^{2}\,C\left(t,\mu\right)+\Gamma\,E\left(t,\mu\right)-\frac{4\,\varepsilon}{2\,\gamma+\sigma^{2}\,\mu^{2}}\>,\\\
\left(\partial_{t}+\mathcal{L}^{\mu}\right)F\left(t,\mu\right)=&-\Gamma\,\overline{\pi}\,E\left(t,\mu\right)+\psi^{2}\,\eta\,C\left(t,\mu\right)-\frac{1}{2}\frac{\varepsilon^{2}}{2\,\gamma+\sigma^{2}\,\mu^{2}}-\frac{\mu}{2}+\frac{\sigma^{2}}{8}\>,\end{cases}$

with terminal conditions
$A(T,\mu)=B(T,\mu)=C(T,\mu)=D(T,\mu)=E(T,\mu)=F(T,\mu)=0$ for all
$\mu\in\mathbbm{R}\,.$

First, note that the PDEs in $A$, $B$, and $D$ admit the unique solutions
$A=B=D=0\,.$ Next, we solve the PDE in $C\,.$ Use Itô’s lemma to write

$C\left(T,\mu_{T}\right)=C\left(t,\mu_{t}\right)+\int_{t}^{T}\left(\partial_{t}+\mathcal{L}^{\mu}\right)C\left(s,\mu_{s}\right)\mathrm{d}s\,.$

Next, replace
$\left(\partial_{t}+\mathcal{L}^{\mu}\right)C\left(s,\mu_{s}\right)$ with
$2\,C\left(s,\mu_{s}\right)\Gamma-\frac{8}{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}$
to obtain

$C\left(T,\mu_{T}\right)=C\left(t,\mu_{t}\right)+2\,\Gamma\int_{t}^{T}C\left(s,\mu_{s}\right)\mathrm{d}s-\int_{t}^{T}\frac{8}{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}\,\mathrm{d}s\,.$

Take expectations to get the equation

$C\left(t,\mu_{t}\right)=\mathbbm{E}_{t,\mu}\left[-2\,\Gamma\int_{t}^{T}C\left(s,\mu_{s}\right)\mathrm{d}s+\int_{t}^{T}\frac{8}{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}\,\mathrm{d}s\right]\,.$

Now consider the candidate solution function

$\hat{C}\left(t,\mu_{t}\right)=\mathbbm{E}_{t,\mu}\left[\,\int_{t}^{T}\frac{8}{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}\exp\left(-2\,\Gamma\left(s-t\right)\right)\,\mathrm{d}s\right]$

and write

$\displaystyle\mathbbm{E}_{t,\mu}\left[-2\,\Gamma\int_{t}^{T}\hat{C}\left(s,\mu_{s}\right)\mathrm{d}s+\int_{t}^{T}\frac{8}{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}\,\mathrm{d}s\right]$
$\displaystyle=$
$\displaystyle\mathbbm{E}_{t,\mu}\left[-2\,\Gamma\int_{t}^{T}\mathbbm{E}_{t,\mu}\left[\,\int_{s}^{T}\frac{8}{2\,\gamma+\mu_{u}^{2}\,\sigma^{2}}\exp\left(-2\,\Gamma\left(u-s\right)\right)\,\mathrm{d}u\right]\mathrm{d}s+\int_{t}^{T}\frac{8}{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}\,\mathrm{d}s\right]$
$\displaystyle=$
$\displaystyle\mathbbm{E}_{t,\mu}\left[\,\int_{t}^{T}\frac{8}{2\,\gamma+\mu_{s}^{2}\,\sigma^{2}}\exp\left(-2\,\Gamma\left(s-t\right)\right)\,\mathrm{d}s\right]\,.$

Thus $\hat{C}$ is a solution to the equation in $C$ and by uniqueness of
solutions, we conclude that $C=\hat{C}\,.$

Follow the same steps as above to obtain the solution

$E\left(t,\mu\right)=\mathbbm{E}_{t,\mu}\left[\,\int_{t}^{T}\left(\left(2\,\Gamma\,\overline{\pi}+\psi^{2}\right)C\left(s,\mu\right)+\frac{4\,\varepsilon}{2\,\gamma+\sigma^{2}\,\mu_{s}^{2}}\right)\exp\left(-\Gamma\left(s-t\right)\right)\,\mathrm{d}s\right]$

to the PDE in $E$, and the solution

$F\left(t,\mu\right)=\mathbbm{E}_{t,\mu}\left[\,\int_{t}^{T}\left(\Gamma\,\overline{\pi}\,E\left(s,\mu_{s}\right)+\psi^{2}\,\eta_{s}\,C\left(s,\mu_{s}\right)-\frac{1}{2}\frac{\varepsilon^{2}}{2\,\gamma+\sigma^{2}\,\mu_{s}^{2}}-\frac{\mu_{s}}{2}+\frac{\sigma^{2}}{8}\right)\mathrm{d}s\right]\,$

to the PDE in $F\,,$ where
$\eta_{s}=\frac{\sigma^{2}}{8}-\frac{\mu_{s}}{4}\left(\mu_{s}-\frac{\sigma^{2}}{2}\right)+\frac{\varepsilon}{4}\,,$
which proves the result. ∎

###  B.2 Proof of Theorem 1

Proposition 1 provides a classical solution to (42). Therefore, standard
results apply and showing that (29) is an admissible control is enough to
prove that (24) is the value function (23). Specifically, use the form of the
optimal control $\delta^{\star}$ in (29) and the dynamics for $\pi$ in (12) to
obtain

$0<\delta_{s}^{\star}\leq\frac{\sigma^{2}\mu_{s}^{2}+2\,\gamma}{\varepsilon}\,,\qquad\forall
s\in[t,T]\,,$ (53)

thus $\delta^{\star}$ is an admissible control. ∎

## References

  * Adams et al. (2021) Adams, H., Zinsmeister, N., Salem, M., Keefer, R., Robinson, D., 2021.  Uniswap v3 core.  Technical Report.
  * Angeris et al. (2021) Angeris, G., Kao, H.T., Chiang, R., Noyes, C., Chitra, T., 2021.  An analysis of uniswap markets.
  * Avellaneda and Stoikov (2008) Avellaneda, M., Stoikov, S., 2008\.  High frequency trading in a limit order book.  Quantitative Finance 8, 217–224.  doi:10.1080/14697680701381228.
  * Barger and Lorig (2019) Barger, W., Lorig, M., 2019\.  Optimal liquidation under stochastic price impact.  International Journal of Theoretical and Applied Finance 22, 1850059.
  * Bergault et al. (2022) Bergault, P., Drissi, F., Guéant, O., 2022.  Multi-asset optimal execution and statistical arbitrage strategies under Ornstein–Uhlenbeck dynamics.  SIAM Journal on Financial Mathematics 13, 353–390.  doi:10.1137/21M1407756.
  * Bergault et al. (2021) Bergault, P., Evangelista, D., Guéant, O., Vieira, D., 2021\.  Closed-form approximations in multi-asset market making.  Applied Mathematical Finance 28, 101–142.  doi:10.1080/1350486X.2021.1949359.
  * Cartea et al. (2017) Cartea, Á., Donnelly, R., Jaimungal, S., 2017.  Algorithmic trading with model uncertainty.  SIAM Journal on Financial Mathematics 8, 635–671.
  * Cartea et al. (2018) Cartea, Á., Donnelly, R., Jaimungal, S., 2018.  Enhancing trading strategies with order book signals.  Applied Mathematical Finance 25, 1–35.
  * Cartea et al. (2022) Cartea, Á., Drissi, F., Monga, M., 2022.  Decentralised finance and automated market making: Execution and speculation.  Available at SSRN 4144743 .
  * Cartea et al. (2023) Cartea, Á., Drissi, F., Monga, M., 2023.  Predictable losses of liquidity provision in constant function markets and concentrated liquidity markets.  Available at SSRN 4541034 .
  * Cartea et al. (2015) Cartea, Á., Jaimungal, S., Penalva, J., 2015.  Algorithmic and high-frequency trading.  Cambridge University Press.
  * Cartea et al. (2014) Cartea, Á., Jaimungal, S., Ricci, J., 2014.  Buy low, sell high: A high frequency trading perspective.  SIAM Journal on Financial Mathematics 5, 415–444.
  * Cartea and Wang (2020) Cartea, Á., Wang, Y., 2020\.  Market making with alpha signals.  International Journal of Theoretical and Applied Finance 23, 2050016.
  * Chiu and Koeppl (2019) Chiu, J., Koeppl, T.V., 2019\.  Blockchain-based settlement for asset trading.  The Review of Financial Studies 32, 1716–1753.
  * Donnelly and Lorig (2020) Donnelly, R., Lorig, M., 2020\.  Optimal trading with differing trade signals.  Applied Mathematical Finance 27, 317–344.
  * Drissi (2022) Drissi, F., 2022.  Solvability of differential Riccati equations and applications to algorithmic trading with signals.  Available at SSRN 4308008 .
  * Drissi (2023) Drissi, F., 2023.  Models of market liquidity: Applications to traditional markets and automated market makers.  Available at SSRN 4424010 .
  * Fan et al. (2023) Fan, Z., Marmolejo-Cossio, F., Moroz, D.J., Neuder, M., Rao, R., Parkes, D.C., 2023\.  Strategic liquidity provision in uniswap v3.  arXiv preprint arXiv:2106.12033 .
  * Forde et al. (2022) Forde, M., Sánchez-Betancourt, L., Smith, B., 2022.  Optimal trade execution for Gaussian signals with power-law resilience.  Quantitative Finance 22, 585–596.
  * Fukasawa et al. (2023) Fukasawa, M., Maire, B., Wunsch, M., 2023.  Model-free hedging of impermanent loss in geometric mean market makers.  arXiv preprint arXiv:2303.11118 .
  * Guéant (2016) Guéant, O., 2016.  The Financial Mathematics of Market Liquidity: From optimal execution to market making. volume 33.  CRC Press.
  * Guéant (2017) Guéant, O., 2017.  Optimal market making.  Applied Mathematical Finance 24, 112–154.  doi:10.1080/1350486X.2017.1342552.
  * Heimbach et al. (2022) Heimbach, L., Schertenleib, E., Wattenhofer, R., 2022.  Risks and returns of Uniswap v3 liquidity providers.
  * Ho and Stoll (1983) Ho, T.S., Stoll, H.R., 1983\.  The dynamics of dealer markets under competition.  The Journal of Finance 38, 1053–1074.
  * Lipton and Treccani (2021) Lipton, A., Treccani, A., 2021\.  Blockchain and Distributed Ledgers: Mathematics, Technology, and Economics.  World Scientific.
  * Milionis et al. (2023) Milionis, J., Moallemi, C.C., Roughgarden, T., 2023.  Automated market making and arbitrage profits in the presence of fees.  arXiv preprint arXiv:2305.14604 .