Optimal Dynamic Fees in Automated Market Makers
Extracted source text · arXiv 2506.02869
\documentclass[11pt]{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{bbm}
\usepackage{multirow}
\usepackage{array}
\usepackage[colorlinks=true, linkcolor=green, citecolor=blue, urlcolor=blue]{hyperref}
\usepackage{yfonts}
\usepackage{booktabs}
\usepackage{cleveref}
\usepackage[margin=1in]{geometry}
\usepackage{setspace}
\onehalfspacing
%\usepackage{showlabels}
\usepackage{comment}
\usepackage{todonotes}
\usepackage{amssymb}
%\usepackage{biblatex}
\usepackage{color}
\usepackage{subcaption}
\usepackage{float}
\usepackage[round]{natbib}
\newcommand{\MH}[1]{{\color{green}{#1}}}
\newcommand{\LB}[1]{{\color{blue}{#1}}}
\input{macros}
% numbering
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{example}[theorem]{Example}
\newtheorem{excont}{Example}
\renewcommand{\theexcont}{\theexample}
\newtheorem{assumption}{Assumption}
\newtheorem{condition}{Condition}
\theoremstyle{remark}
\numberwithin{equation}{section}
\newtheorem*{empty*}{}
% style for enumerations
\renewcommand{\labelenumi}{{\normalfont (\alph{enumi})}}
\renewcommand{\labelenumii}{(\roman{enumii})}
\title{Optimal Dynamic Fees in Automated Market Makers}
\author{Leonardo Baggiani\thanks{Corresponding author: leonardo.baggiani@warwick.ac.uk}\,\,\thanks{Department of Statistics, University of Warwick}
\and
Martin Herdegen\thanks{Department of Mathematics, University of Stuttgart}
\and
Leandro S\'anchez-Betancourt\thanks{Mathematical Institute and Oxford-Man Institute of Quantitative Finance, University of Oxford}
}
\newcommand{\E}{\mathbb{E}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\LL}{\mathbb{L}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\probp}{\mathbb{P}}
\newcommand{\probq}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\renewcommand{\P}{\mathbb{P}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Lp}{\mathbb{L}}
\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}
\newcommand{\cN}{{\mathcal{N}}}
\newcommand{\cF}{{\mathcal{F}}}
\newcommand{\CF}{{\mathcal{F}}}
\newcommand{\cE}{{\mathcal{E}}}
\newcommand{\cG}{{\mathcal{G}}}
\newcommand{\cB}{{\mathcal{B}}}
\newcommand{\cS}{{\mathcal{S}}}
\newcommand{\cA}{\mathcal{A}}
\newcommand{\cC}{\mathcal{C}}
\newcommand{\cD}{\mathcal{D}}
\newcommand{\cH}{\mathcal{H}}
\newcommand{\cK}{\mathcal{K}}
\newcommand{\cI}{{\mathscr{I}}}
\newcommand{\cL}{\mathcal{L}}
\newcommand{\cM}{\mathcal{M}}
\newcommand{\CM}{\mathcal{M}}
\newcommand{\cO}{\mathcal{O}}
\newcommand{\cP}{\mathcal{P}}
\newcommand{\cQ}{\mathcal{Q}}
\newcommand{\cR}{\mathcal{R}}
\newcommand{\cU}{\mathcal{U}}
\newcommand{\cV}{\mathcal{V}}
\newcommand{\V}{\textnormal{Var}}
\newcommand{\cX}{{\mathcal{X}}}
\newcommand{\cY}{{\mathcal{Y}}}
\newcommand{\ind}{\mathbbm 1}
\newcommand{\esssup}{\mathop {\rm ess\,sup}\nolimits}
\newcommand{\essinf}{\mathop {\rm ess\,inf}\nolimits}
\newcommand{\barr}{\mathop{\rm bar}\nolimits}
\newcommand{\dom}{\mathop {\rm dom}\nolimits}
\newcommand{\epi}{\mathop {\rm epi}\nolimits}
\newcommand{\cone}{\mathop{\rm cone}\nolimits}
\newcommand{\co}{\mathop{\rm co}\nolimits}
\newcommand{\rec}{\mathop{\rm rec}\nolimits}
\newcommand{\conj}{\mathop{\rm conj}\nolimits}
\newcommand{\hypo}{\mathop {\rm hypo}\nolimits}
\newcommand{\Span}{\mathop{\rm span}\nolimits}
\newcommand{\cl}{\mathop{\rm cl}\nolimits}
\newcommand{\Ssq}{\Ss_+^{\Q}}
\def\O{\mathcal{O}}
\newcommand{\lnorm}{\left\|}
\newcommand{\rnorm}{\right\|}
\newcommand{\e}{\varepsilon}
\newcommand{\Interior}{\mathop{\rm int}\nolimits}
\newcommand{\VaR}{\mathop {\rm VaR}\nolimits}
\newcommand{\LVaR}{\mathop {\rm LVaR}\nolimits}
\newcommand{\accvar}{\cA_{\VaR}}
\newcommand{\ES}{\mathop {\rm ES}\nolimits}
\newcommand{\OCE}{\mathop {\rm OCE}\nolimits}
\newcommand{\acces}{\cA_{\ES}}
\newcommand{\TVaR}{\mathop {\rm TVaR}\nolimits}
\newcommand{\SPAN}{\mathop {\rm SPAN}\nolimits}
\newcommand{\spread}{\mathop \sigma\nolimits}
\newcommand{\MCP}{\mathop {\rm MCP}\nolimits}
\newcommand{\ba}{\mathop {\bm{ba}}\nolimits}
\newcommand{\dd}{\,\mathrm{d}}
\DeclareMathOperator*{\argmin}{arg\,min}
\renewcommand{\epsilon}{\varepsilon}
\begin{document}
\maketitle
\begin{abstract}
Automated Market Makers (AMMs) are emerging as a popular decentralised trading platform. In this work, we determine the optimal dynamic fees in a constant function market maker. We find approximate closed-form solutions to the control problem and study the optimal fee structure. We find that there are two distinct fee regimes: one in which the AMM imposes higher fees to deter arbitrageurs, and another where fees are lowered to increase volatility and attract noise traders. Our results also show that dynamic fees that are linear in inventory and that track changes in the external price are a good approximation of the optimal fee structure and thus constitute suitable candidates when designing fees for AMMs.\newline
\vspace{0.7em}
\noindent \emph{Keywords:} decentralized finance, automated market makers, optimal fees, arbitrageurs, noise trading.
\vspace{0.5em}
\newline
\emph{Mathematics Subject Classification (2020):} 93E20, %stochastic optimal control
91B70. %Stochastic models in economics
\vspace{0.5em}
\noindent \emph{JEL Classification:} C61, %Optimization Techniques • Programming Models • Dynamic Analysis
G23, %Non-bank Financial Institutions • Financial Instruments • Institutional Investors
D53. %financial markets
\end{abstract}
\section{Introduction}
In recent years, automated market makers (AMMs) have gained popularity as a key innovation in financial technology, fundamentally changing the way liquidity is provided and exchanged within decentralized finance (DeFi) ecosystems. An AMM is a decentralized venue, where liquidity provision and liquidity taking follow rules that are encoded in smart contracts. As of 2025, the most popular AMM is Uniswap, which began gaining widespread adoption with its v2 version and has now reached v4; see \citet{Adams2020UniswapVC, Adams2021UniswapVC, Adams2024UniswapVC} for the white papers on versions v2 to v4, and \citet{Bachu2025} for a detailed overview of the v4 protocol.
\newline \newline
The early works of \citet{capponi2021adoptionblockchainbaseddecentralizedexchanges}, \citet{bartoletti2021theoryamm}, \citet{angeris2020priceoracles}, \citet{angeris2021uniswapanalysis}, \citet{Cartea_2022} and \citet{Angeris2023} first explain how these exchanges operate and introduce the problem of liquidity provision in AMMs. As shown by \citet{Cartea202369, Cartea2024931}, \citet{milionis2022automated}, and \citet{fukasawa2025liquidity}, liquidity provision in the absence of fees leads to losses for liquidity providers. There are two well-understood types of losses: \emph{loss-versus-rebalancing} (LVR) and \emph{impermanent loss} (IL). \cite{milionis2024automated} describe LVR as
\begin{quote}
\textit{the loss incurred by LPs relative to a trading strategy (the
``rebalancing strategy'') that holds the same risky positions as the pool, but that trades at market
prices rather than AMM prices.}
\end{quote}
On the other hand, IL is the difference in value between holding the assets inside the pool and holding the assets outside of the pool.
The name \emph{impermanent} is due to the fact that if the market condition reverse,
the losses disappear.
\newline \newline
To address the IL issue, the literature has generally taken two main approaches. The first is to redesign automated market makers (AMMs) to better account for spot price volatility. For instance, \citet{Bergault2024} propose an oracle-based AMM, where price discovery is not determined solely by liquidity takers. Instead, their pricing function integrates external information about the current market price of the risky asset.
The second approach focuses on finding trading strategies that allow liquidity providers to adapt to changing market conditions. \citet{Capponi2025} tackle the issue of IL by determining an optimal exit strategy for liquidity providers. \citet{Fukasawa03062023} address IL in constant function market makers by employing a weighted variance swap for hedging, and in a follow up study, \citet{fukasawa2024model} demonstrate a super-hedging strategy for IL that holds regardless of the oracle price dynamics. Most recently, \citet{sepp2024unified} show that IL can be fully hedged using European put and call options.
\newline\newline
To find solutions for the loss-versus-rebalancing problem, much of the research has centered on improving AMM designs to make liquidity provision less vulnerable to arbitrageurs. Several notable works in this direction include \citet{adams2025amammauctionmanagedautomatedmarket}, who introduce an auction-based AMM in which a pool “manager” captures arbitrage profits and rewards liquidity providers accordingly; \citet{goyal2023findingcurve}, who convert LPs’ beliefs about future asset values into optimal trading functions; and \citet{Cartea2024}, who generalize constant function market makers into decentralized liquidity pools (DLPs), enabling LPs to mitigate loss-versus-rebalancing by selecting suitable quote and impact functions and by monitoring external information. Another notable contribution is the work by \citet{nadkarni2024adaptive}, in which the authors investigate the problem of finding an optimal dynamic trading curve with the focus is specifically on developing a strategy that effectively hedges against loss-versus-rebalancing.
\newline \newline
As shown by \citet{milionis2024automated}, loss-versus-rebalancing can be partially or fully hedged through the collection of fees. Thus, the problem of determining optimal fees for AMMs has been an important issue since the early stages of research in this area. \citet{evans2021optimalfees} focused on how to find optimal fees for geometric mean market makers (G3Ms) while \citet{fritsch2021noteoptimalfees} studied how to determine optimal fees in a setting of multiple liquidity pools competing with each other for trade volume. \citet{he2024optimaldesignautomatedmarket} determined the optimal fee structure for a liquidity provider who allocates their capital between an automated market maker (AMM) and centralized trading venues. However, these works only address the problem of finding constant static fees. \citet{sabate2023variablefees} address the loss-versus-rebalancing problem by setting dynamic fees although no optimality is established. \citet{Hasbrouck2022} found how higher fees on decentralised exchanges (DEX) can increase trading volume because higher fees attract more liquidity providers and boost the inventory in the DEX. Recently, \cite{aqsha2025equilibriumrewardliquidityproviders} solve a stochastic leader-follower game between the AMM and the liquidity providers in the venue. They find that under the equilibrium contract, the liquidity providers have incentives to add liquidity to the pool only when higher liquidity on average attracts more noise trading. In their work, the fee that the venue charges is proportional to the trade size.
\newline \newline
In this study, we address the problem of determining optimal dynamic fees for AMMs.
As argued in \citet{Cao2023}, the fees should adjust dynamically in order to reflect market conditions.
%The idea that AMMs fees should be adjusted dynamically to reflect market volatility as been studied in \citet{Cao2023}.
With the recent introduction of Uniswap v4, the implementation of dynamic fees is now possible. Setting optimal fees is crucial because fees are the primary incentive for liquidity providers to engage with the AMM as they help offset losses from impermanent loss. As a result, a platform that optimizes fee collection can better compensate liquidity providers and, in turn, strengthen its overall market position. Inspired by the work on market making by \citet{zbMATH05278232},\footnote{For a comprehensive exposition of the market making problem and its generalisation see the monographs by \citet{zbMATH06459781} and \citet{zbMATH06550567}.} we formulate a stochastic control problem in which the venue aims to maximize the total fees collected in a liquidity pool consisting of two assets: a risky asset $ Y $ and a riskless asset $ X $. The control processes are $ \feeLTsells $ and $\feeLTbuys $, representing the fees charged for selling and buying asset $ Y $, respectively.\footnote{We choose $ \feeLTsells $ for \emph{plus} and $\feeLTbuys $ for \emph{minus} because the quantity of asset $Y$ in the pool increases after a trade that pays $\feeLTsells$ and decreases after a trade that pays $\feeLTbuys$.}
These fees influence the exchange rate faced by liquidity takers: buying $Y$ requires paying more of asset $X$, while selling $Y$ yields less of asset $X$. This, in turn, affects the order flow. We model sell and buy orders using two point processes,$\{ \ppsell_{t} \}_{t \in [0,T]} $ and $ \{ \ppbuy_{t} \}_{t \in [0,T]} $, with controlled stochastic intensities of the form:
\begin{align*}
\lambda_{t}^{+,\feeLTsells} &:= \intsell \exp\left( \expdecay \left( \exratesell^{\feeLTsells_t}(y_{t-}^{\feeLTsells,\feeLTbuys}) - (\oraclepricestochastic + \zeta) \right) \deltasell(y_{t-}^{\feeLTsells,\feeLTbuys}) \right) \ind_{ \{ y_{t-}^{\feeLTsells,\feeLTbuys} < \overline{y} \}}, \\
\lambda_{t}^{-,\feeLTbuys} &:= \intbuy \exp\left( -\expdecay \left( \exratebuy^{\feeLTbuys_{t}}(y_{t-}^{\feeLTsells,\feeLTbuys}) - (\oraclepricestochastic - \zeta) \right) \deltabuy(y_{t-}^{\feeLTsells,\feeLTbuys}) \right) \ind_{ \{ y_{t-}^{\feeLTsells,\feeLTbuys} > \underline{y} \}}.
\end{align*}
Here, $S_t$ denotes the price of asset $Y$ in terms of asset $X$ on a centralized venue (e.g., Kraken, Binance), while $\deltabuy(y_{t-}^{\feeLTsells,\feeLTbuys})$ and $\deltasell(y_{t-}^{\feeLTsells,\feeLTbuys}) $ represent the amounts that a liquidity taker trades when buying and selling asset $ Y$, respectively.
The control problem we wish to solve is, in its full generality, intractable. Therefore, we study two simplified cases using different approximations. First, we assume that the external price $S_t$ remains constant at $S_0$. Under this assumption, we derive in Theorem \ref{th: value function and optimal fees} the optimal fee policies and the corresponding value function.
Second, we approximate the exponential terms in the Hamilton–Jacobi–Bellman (HJB) equation using a linear-quadratic expansion. This leads to an alternative tractable formulation from which we derive the optimal fees and value function, as stated in Theorem \ref{thm: solution to the PDE system}.
In both approximations, we obtain the same insight: the venue finds it optimal to adopts two distinct fee regimes; one in which the AMM imposes higher fees to deter arbitrageurs, and another where fees are lowered to increase volatility and attract noise traders.
Figures \ref{fig: figure 1 introduction} and \ref{fig: figure 2 introduction} illustrate the optimal buying and selling fees under the first (left) and second (right) approximations, respectively, with the two fee patterns highlighted.
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity.pdf}
\caption{Optimal fees for selling $\feeLTsells_{t}^{*}$ (solid line) and for buying $\feeLTbuys_{t}^{*}$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool with the approximation that takes $S_t = S_0$ for $t \in [0,T]$.}
\label{fig: figure 1 introduction}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_lin_quadratic_approx.pdf}
\caption{Optimal fees for selling $\feeLTsells_{t}^{*}$ (solid line) and for buying $\feeLTbuys_{t}^{*}$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool with the linear quadratic approximation of the stochastic intensities.}
\label{fig: figure 2 introduction}
\end{subfigure}
\end{figure}
Finally, we run simulations to compare the performance of the optimal fee policies against alternative strategies. In the case of a constant external price, we find that the optimal fees outperform constant fee strategies by a significant margin. Furthermore, a linear approximation of the optimal policies proves to be sufficiently accurate, yielding nearly identical revenue outcomes.
Our results suggest that the optimal fees balance two competing objectives: setting fees high enough to maximize per-trade revenue while simultaneously increasing the quadratic variation of the marginal price, thereby attracting increased noise trading. A similar pattern emerges under the second approximation, where the revenue generated by the optimal fees also exceeds that of the alternative strategies.
\newline \newline
The remainder of the paper is organised as follows. Section \ref{section: the model} introduces the model that we use, sets up the control problem and the performance criterion that the venue wants to maximize. In Section \ref{section: Optimal Strategy with Exponential Intensities} we compute the optimal policies. Sections \ref{section: First Approximation} and \ref{section: second Approximation} are dedicated to finding the value functions for the first and second approximation, respectively. Finally, in Sections \ref{Optimal fee structure: constant external price} and \ref{section: Optimal fee structure: dynamic external price with second order approximation} we carry out simulations to illustrate our theoretical results.
\section{The model}\label{section: the model}
We study an automated market maker (AMM) with a finite time horizon $T > 0$. More precisely, we consider a constant function market (CFM) pool inside the reference AMM
with a riskless asset $X$ and a risky asset $Y$. Let $\depth > 0$ denote the depth of the pool and let $f: \mathbb{R}_{+} \times \mathbb{R}_{+} \to \mathbb{R}_{+}$ be the trading function, which is strictly increasing and twice differentiable
in both arguments. %Let $\{ y_{t} \}_{ t \in [0,T]}$ and $\{ x_{t} \}_{ t \in [0,T]}$ be the processes describing the amount of asset $Y$ and $X$ in the CFM pool, where $y_{0}$ and $x_{0}$ are known.
The trading condition is $f(x, y) = \depth$, where $x$ and $y$ denote the amounts in assets $X$ and $Y$, respectively. We can rewrite this condition using the level function $\varphi: \mathbb{R}_{+} \to \mathbb{R}_{+}$ satisfying $f(\varphi(y), y) = \depth$. The latter is then automatically differentiable and decreasing, and we assume in addition that it is convex in order to exclude roundtrip arbitrage, see \citet{Cartea2024931}.
These assumptions are satisfied by the most popular CFMs such as constant product markets (CPMs) where $f(x,y) = x y$ and $\varphi(y) = \depth/y$.
\medskip{}
We assume that quantity of asset $Y$ in the pool takes values in a finite grid given by
\begin{equation*}\label{eq: grid for quantity of y}
\{ y^{-N} := \underline{y}, \dots, y^{0}, \dots, y^{N} := \overline{y} \},
\end{equation*}
where $\underline{y}$ and $\overline{y}$ can be interpreted as reserve constraints satisfying $0 <\underline{y} < y^{0} < \overline{y} < \depth$.
Consequently, the quantity of asset $X$ in the pool takes values in the grid
\begin{equation*}\label{eq: grid for quantity of x}
\{ x^{-N} :=\varphi(y^{-N}), \dots, x^{0} := \varphi(y^0), \dots, x^{N} := \varphi(y^{N}) \}.
\end{equation*}
Note that the monotonicity of the grids for the two assets are opposite to each other: the grid for asset $Y$ is increasing, whereas the grid for asset $X$ is decreasing.
\medskip{}
There are three basic exchange rates for the price of asset $Y$ in units of asset $X$ in terms of the quantity of asset $Y$ in the pool that we use throughout the paper. To fix notation, let $y^{i}$ denote the quantity of asset $Y$ in the pool just before the trade of a liquidity taker.
\begin{enumerate}
\item The \emph{marginal exchange rate} describes the price of an infinitesimal trade and is given by \begin{equation*}\label{eq: marginal exchange}
Z ( y^{i} ) : = - \varphi' (y^{i}).
\end{equation*}
\item The \emph{exchange rate for buying} (taking out of the pool) $\deltabuy(y^{i}):= y^i-y^{i-1}$ units of asset $Y$ is given by
\begin{equation*}\label{eq: exchange rate for buying}
\exratebuy(y^{i}) : = \frac{\varphi(y^{i-1}) - \varphi(y^{i})}{\deltabuy(y^{i})}.
\end{equation*}
It takes values in the grid
\begin{equation*}\label{eq: grid for buying exchange}
\{ \exratebuy^{-N + 1} := \exratebuy(y^{-N+1}), \dots, \exratebuy^{0} := \exratebuy(y^{0}), \dots, \exratebuy^{N} := \exratebuy(y^{N})\}.
\end{equation*}
\item The \emph{exchange rate for selling} (depositing in the pool) $\deltasell(y^{i}):= y^{i+1}-y^{i}$ units of asset $Y$ is given by
\begin{equation*}\label{eq: exchange rate for selling}
\exratesell(y^{i}) : = \frac{\varphi(y^{i}) - \varphi(y^{i+1})}{\deltasell(y^{i}) }.
\end{equation*}
It takes values in the grid
\begin{equation*}\label{eq: grid for selling exchange}
\{ \exratesell^{-N} := \exratesell(y^{-N}), \dots, \exratesell^{0} := \exratesell(y^{0}), \dots, \exratesell^{N - 1} := \exratesell(y^{N-1}) \}.
\end{equation*}
\end{enumerate}
Note that exchange rates for buying and selling satisfy the identity
\begin{equation*}
\exratebuy^{i} = \exratesell^{i-1}, \quad i \in \{ -N + 1, \dots, 0, \dots N\}.
\end{equation*}
\begin{comment}
If the quantity of asset $Y$ in the pool is $y^{i}$ and a liquidity taker wishes to buy $\deltabuy(y_i)$ units of asset $Y$, he deposits the quantity
\begin{equation*}
x^{i-1} - x^{i} = \exratebuy(y^{i}) (y^{i} - y^{i-1}) = \varphi(y^{i-1}) - \varphi(y^{i}).
\end{equation*}
Symmetrically, if the quantity of asset $Y$ in the pool is $y^{i}$ and a liquidity taker wishes to sell $\deltasell(y_i)$ units of asset $Y$, he withdraws the quantity
\begin{equation*}
x^{i} - x^{i+1} = \exratesell(y^{i}) (y^{i+1} - y^{i}) = \varphi(y^{i}) - \varphi(y^{i+1}).
\end{equation*}
\end{comment}
We now add proportional transaction cost to the trading mechanism, and model the fees for buying and selling by the functions $\feeLTbuys: \{ y^{-N}, \ldots, y^{N} \} \to \R$ and $\feeLTsells: \{ y^{-N}, \ldots, y^{N} \} \to \R$, respectively.\footnote{Although one would expect that $\feeLTbuys,\feeLTsells \in [0,1]$, we do not impose this condition since it turns out to be optimal to sometimes charge negative fees, meaning that the venues pays liquidity takers to trade in a given direction.}
\begin{comment}
\begin{align*}\label{eq: grid for fees}
&\{ \feeLTbuys^{-N + 1} := \feeLTbuys(y^{-N+1}), \dots, \feeLTbuys^{0} :=\feeLTbuys(y^{0}), \dots, \feeLTbuys^{N} := \feeLTbuys(y^{N})\}, \\
&\{ \feeLTsells^{-N} := \feeLTsells(y^{-N}), \dots, \feeLTsells^{0} := \feeLTsells(y^0), \dots, \feeLTsells^{N - 1}:= \feeLTsells(y^{N-1}) \}.
\end{align*}
\end{comment}
The fees are collected in units of the riskless asset $X$ and are deposited outside of the pool. The corresponding (fee-depending) exchange rates can then be described in the following way, where $y^{i}$ denotes the quantity of asset $Y$ in the pool just before the trade.
\begin{enumerate}
\item The \emph{exchange rate with fee structure $\feeLTbuys$ for buying} (taking out of the pool) $\deltabuy(y^{i}):= y^i-y^{i-1}$ units of asset $Y$ is given by
\begin{equation*}\label{eq: exchange rate for buying with fees}
\exratebuy^\feeLTbuys(y^{i}) : = (1 + \feeLTbuys(y^{i})) \exratebuy(y^{i}).
\end{equation*}
\item The \emph{exchange rate with fee structure $\feeLTsells$ for selling} (depositing in the pool) $\deltasell(y^{i}):= y^{i+1}-y^{i}$ units of asset $y$ is given by
\begin{equation*}\label{eq: exchange rate for selling with fees}
\exratesell^\feeLTsells(y^{i}) : = (1 - \feeLTsells(y^i)) \exratesell(y^{i}) .
\end{equation*}
\end{enumerate}
\begin{comment}
Formally, let the quantity of asset $Y$ in the pool be $y^{i}$, if an LT wishes to buy $\deltabuy(y_i)$ units of asset $Y$, he pays a quantity of asset $X$ equal to
\begin{equation}
(x^{-i + 1} - x^{-i}) + \feeLTbuys^{i}(x^{-i + 1} - x^{-i}) = \exratebuy(\feeLTbuys^{i},y^{i}) (y^{i} - y^{i-1}) = (1 + \feeLTbuys^{i}) (\varphi(y^{i-1}) - \varphi(y^{i})).
\end{equation}
Here, $\exratebuy(\feeLTbuys^{i},y^{i})$ is the exchange rate for buying $\deltabuy(y)$ unit of asset $Y$ including the fees $\feeLTbuys^{i}$, given by
\begin{equation*}\label{eq: exchange rate for buying with friction}
\exratebuy(\feeLTbuys^{i},y^{i}) : = (1 + \feeLTbuys^{i}) \exratebuy(y^{i}) .
\end{equation*}
Symmetrically, if an LT wishes to sell $\deltasell(y_i)$ units of asset $Y$, he receives a quantity of asset $X$ equal to
\begin{equation}
(x^{-i} - x^{-i -1}) - \feeLTsells^{i}(x^{-i} - x^{-i -1}) = \exratesell(\feeLTsells^{i},y^{i}) (y^{i+1} - y^{i}) = (1 - \feeLTsells^{i}) (\varphi(y^{i}) - \varphi(y^{i+1})).
\end{equation}
Here, $\exratesell(\feeLTsells^{i},y^{i})$ is the exchange rate for selling $\deltasell(y_i)$ units of asset $Y$ including the fees $\feeLTsells^{i}$, given by
\begin{equation*}\label{eq: exchange rate for selling with friction}
\exratesell(\feeLTsells^{i},y^{i}) : = (1 - \feeLTsells^{i}) \exratesell(y^{i}).
\end{equation*}
\end{comment}
In this paper the AMM mechanism works independently of the fee structure because the fees charged by the venue go to the venue's cash account to be redistributed at a later stage. In the pool, trading is carried out via the rates $\exratesell$ and $\exratebuy$ so that the depth $\depth$ does not change. However, from the point of view of the liquidity taker, the exchange rates include fees.
\medskip{}
Our model aims to study how the AMM sets fees dynamically in order to maximize revenue coming from the order flow. We fix a probability space $(\Omega, \mathcal{F}, \mathbb{F} = \{ \mathcal{F}_{t} \}_{t \in [0,T]}, \mathbb{P}^{\feeLTsells,\feeLTbuys})$ supporting all the processes we use below.\footnote{A rigorous definition of the probability space would involve a weak formulation of the control problem because the controls affect the intensities of the jump processes that inform the filtration. We leave this rigorous treatment out of the paper for readability. See Section 3.1 in \citet{Barucci2025} for a formal treatment of this issue.} We model one representative liquidity taker (LT) and assume that their buy and sell order arrivals are described by controlled point processes $\{ \ppbuy_{t} \}_{t \in [0,T]}$ and $ \{\ppsell_{t} \}_{t \in [0,T]}$, respectively, where the fee structure processes $\{\feeLTsells_{t}\}_{t \in [0, T]} $ and $\{\feeLTbuys_{t}\}_{t \in [0, T]}$ are assumed to be predictable. In this work, the depth of the pool $\depth$ is fixed throughout $[0,T]$, that is, $T$ is small enough so that LPs do not add or remove liquidity from the pool. This allows us to study liquidity taking and optimal fees in isolation.
The controls will operate in such a way that the difference $\ppsell - \ppbuy$ takes values in $\{-N, \ldots, N\}$.
The quantity of asset $Y$ at time $t \in [0,T]$ is then given by
\begin{equation*}
Y_{t}^{\feeLTsells,\feeLTbuys} := y^{\ppsell_{t} - \ppbuy_{t}}.
\end{equation*}
The controlled intensities of $\{ \ppbuy_{t} \}_{t \in [0,T]}$ and $ \{\ppsell_{t} \}_{t \in [0,T]}$ are given by
\begin{align*}\label{eq: intensities for ppp}
\lambda_{t}^{-,\feeLTbuys} &: = \intbuy \exp{ \left( -\expdecay (\exratebuy^{\feeLTbuys_{t}}(Y_{t-}^{\feeLTsells,\feeLTbuys}) - (\oraclepricestochastic -\zeta)) \deltabuy(Y_{t-}^{\feeLTsells,\feeLTbuys}) \right) } \ind_{ \{ Y_{t-}^{\feeLTsells,\feeLTbuys} > \underline{y} \}}, \\
\lambda_{t}^{+,\feeLTsells} &: = \intsell \exp{ \left( \expdecay( \exratesell^{\feeLTsells_t}(Y_{t-}^{\feeLTsells,\feeLTbuys}) - (\oraclepricestochastic + \zeta)) \deltasell(Y_{t-}^{\feeLTsells,\feeLTbuys}) \right) } \ind_{ \{ Y_{t-}^{\feeLTsells,\feeLTbuys} < \overline{y} \}}.
\end{align*}
Here, $\intbuy$ and $\intsell$ are some baseline intensities, $k > 0$ is an exponential decay parameter (similar to that in \citet{zbMATH05278232}), $\{\oraclepricestochastic\}_{t \in [0, T]}$ denotes the midprice in a centralised exchange (outside of the pool) of asset $Y$ in terms of the riskless asset $X$, the so-called \emph{oracle price}, and $\zeta > 0$ is the corresponding half-spread in the centralised exchange. We assume that $\{\oraclepricestochastic\}_{t \in [0, T]}$ has dynamics given by \[ \oraclepricestochastic = S_0 + \sigma W_{t}, \] where $\{ W_{t} \}_{\{t \in [0,T]\}}$ is a Brownian motion.
\medskip{}
The controlled stochastic intensities $\lambda_{t}^{-,\feeLTbuys}$ and $\lambda_{t}^{+,\feeLTsells}$ aim to capture the following stylised fact:
when $\exratebuy^{\feeLTbuys_{t}}(Y_{t-}^{\feeLTsells,\feeLTbuys}) < \oraclepricestochastic - \zeta$, buying $\deltabuy(Y_{t-}^{\feeLTsells,\feeLTbuys})$ units to the pool and selling the same amount from the external venue is profitable to arbitrageurs. Thus, all else being equal, the buy intensity $\lambda_{t}^{+,\feeLTsells}$ increases.
Similarly,
when $\exratesell^{\feeLTsells_{t}}(Y_{t-}^{\feeLTsells,\feeLTbuys}) > \oraclepricestochastic + \zeta$, selling $\deltasell(Y_{t-}^{\feeLTsells,\feeLTbuys})$ units to the pool and buying the same amount from the external venue is profitable to arbitrageurs, and the sell intensity $\lambda_{t}^{+,\feeLTsells}$ increases. In order to make the notation simpler, we incorporate $e^{-k \zeta}$ into $\intsell$ and $\intbuy$ and formally set $\zeta :=0$.
\medskip{}
The cumulative fees $\{\Cash_{t}^{\feeLTsells,\feeLTbuys}\}_{t \in [0, T]}$ collected by the AMM are in turn given by
\begin{equation*} \label{eq : SDE for holdings}
\Cash_{t}^{\feeLTsells,\feeLTbuys} = \int_0^t \feeLTsells_{u}\exratesell^{\feeLTsells_{u}}(Y_{u^{-}}^{\feeLTsells,\feeLTbuys}) \deltasell(Y_{u^{-}}^{\feeLTsells,\feeLTbuys}) \dd \ppsell_{u} + \int_0^t \feeLTbuys_{u}\exratebuy^{\feeLTbuys_{u}}(Y_{u^{-}}^{\feeLTsells,\feeLTbuys}) \deltabuy(Y_{u^{-}}^{\feeLTsells,\feeLTbuys})) \dd \ppbuy_{u}, \quad \quad t \in [0,T].
\end{equation*}
The performance criterion of the venue is given by
\begin{equation*} \label{eq: goal function}
J(\feeLTbuys,\feeLTsells) : = \mathbb{E} \left[ \Cash_{T}^{\feeLTsells,\feeLTbuys} - \int_{0}^{T} P(Y_{t}^{\feeLTsells,\feeLTbuys},S_{t}) \dd t \right],
\end{equation*}
where $P$ is a penalty function. An example of the function $P$ that we consider below is the quadratic distance between the oracle price $S_{t}$ and the instantaneous exchange rate $Z(y_{t})$, i.e., \[P(Y_{t}^{\feeLTsells,\feeLTbuys},S_{t}) = \pencons ( Z(Y_{t}^{\feeLTsells,\feeLTbuys}) - S_{t})^{2}. \]
Note, however, that $P$ is not needed to add concavity to the problem, because the term $\Cash_T$ itself is concave in the controls. Our main results and insights are obtained when $P = 0$.
\section{Characterization of the value function}\label{section: Optimal Strategy with Exponential Intensities}
The AMM seeks to solve the control problem \[ v(t,\cash,y,s) : = \sup_{(\feeLTbuys,\feeLTsells) \in \mathcal{A}_{t}} v^{(\feeLTbuys,\feeLTsells)}(t,\cash,y,s),\]
where $\mathcal{A}_{t}$ denotes the set of all $\mathbb{F}$-predictable and bounded fee structure processes $(\feeLTbuys_{u},\feeLTsells_{u})_{\{t \leq u \leq T\}}$ and the conditional performance criterion is given by \[ v^{(\feeLTbuys,\feeLTsells)}(t,\cash,y,s) : = \mathbb{E}_{(t,\cash,y,s)} \left[ \Cash_{T}^{(t,\cash,y,s,\feeLTbuys,\feeLTsells)} - \int_{t}^{T} P(Y^{(t,\cash,y,s,\feeLTbuys,\feeLTsells)}_{u},S_{u}^{(t,\cash,y,s)}) \dd u \right]. \]
Here, $\{ \Cash_{u}^{(t,\cash,y,s,\feeLTbuys,\feeLTsells)} \}_{u \in [t,T]}$, $\{ Y_{u}^{(t,\cash,y,s,\feeLTbuys,\feeLTsells)} \}_{u \in [t,T]}$ and $\{ S_{u}^{(t,\cash,y,s)}\}_{u \in [t,T]} $ denote the (controlled) processes $\Cash$, $y$ and $S$ restarted at time $t$ with initial value $\cash$, $y$ and $s$, respectively.
From the dynamic programming principle, we determine that the Hamilton-Jacobi-Bellman (HJB) equation satisfied by the value function is:
\begin{align} \label{eq: real HJB for v}
& \frac{\partial}{\partial t} v (t,y,\cash,s) + \frac{\sigma^{2}}{2} \frac{\partial^{2}}{\partial s^{2}} v(t,y,\cash,s) - P(y,s) \nonumber \\
& +\left( \intsell e^{\expdecay(\exratesell( y)- \oracleprice) \deltasell(y)} \sup_{ \feeLTsells \in \mathbb{R}} e^{-\expdecay \feeLTsells\exratesell( y) \deltasell(y)} \left[v(t,y + \deltasell(y) ,\cash + \feeLTsells \exratesell(y) \deltasell(y),s) - v(t,\cash,y,s)\right] \right) \ind_{ \{ y < \overline{y} \}} \\
& +\left( \intbuy e^{-\expdecay(\exratebuy(y)- \oracleprice) \deltabuy(y)} \sup_{ \feeLTbuys \in \mathbb{R}} e^{-\expdecay \feeLTbuys \exratebuy(y) \deltabuy(y)} \left[v(t,y - \deltabuy(y),\cash + \feeLTbuys \exratebuy(y) \deltabuy(y),s) - v(t,\cash,y,s) \right] \right) \ind_{ \{ y > \underline{y} \}} = 0, \nonumber
\end{align}
with terminal condition $v(T,y,\cash,s) = \cash$. The terms in this HJB equation have an intuitive interpretation. The terms
\[ v(t,y + \deltasell(y) ,\cash + \feeLTsells \exratesell(y) \deltasell(y)) - v(t,y,\cash,s), \quad \quad v(t,y - \deltabuy(y),\cash + \feeLTbuys \exratebuy(y) \deltabuy(y)) - v(t,y,\cash,s), \]
represent the difference in the value function before and after a trade. If there is a sell trade, the quantity of asset $y$ in the pools jumps from $y$ to $y + \deltasell(y)$, and the AMM collects fees that amount to $\feeLTsells \, \exratesell(y) \deltasell(y)$, i.e., the percentage of fees $\feeLTsells$ times the quantity traded $\deltasell(y)$ times the sell exchange rate at the moment of the trade $\exratesell(y)$. Symmetrically, when there is a buy trade, the grid for the risky asset moves from $y$ to $y - \deltabuy(y)$, and the AMM collects fees that amount to $\feeLTbuys \, \exratebuy(y) \deltabuy(y)$. Each of the differences is multiplied by the respective intensity of order arrival.
Next, we make the ansatz $v(t,y,\cash,s) = g(t,y,s) + \cash$, to obtain that $g(t,y,s)$ satisfies the HJB equation
\begin{align}\label{eq: HJB for g}
& \frac{\partial}{\partial t} g(t,y,s) + \frac{\sigma^{2}}{2} \frac{\partial^{2}}{\partial s^{2}} g(t,y,s) - P(y,s) \nonumber \\
&+ \left( \intsell e^{\expdecay (\exratesell(y) - \oracleprice ) \deltasell(y)} \sup_{ \feeLTsells \in \mathbb{R}} e^{-\expdecay \feeLTsells \exratesell(y) \deltasell(y)} \left[g(t,y + \deltasell(y),s) - g(t,y,s) + \feeLTsells \exratesell(y) \deltasell(y)\right] \right) \ind_{ \{ y < \overline{y} \}} \\
&+ \left( \intbuy e^{-\expdecay(
\exratebuy(y) -\oracleprice) \deltabuy(y)} \sup_{ \feeLTbuys \in \mathbb{R}} e^{-\expdecay \feeLTbuys \exratebuy(y) \deltabuy(y)} \left[g(t,y - \deltabuy(y),s) - g(t,y,s) + \feeLTbuys \exratebuy(y) \deltabuy(y) \right] \right) \ind_{ \{ y > \underline{y} \}} = 0, \nonumber
\end{align}
with terminal condition $g(T,y,s) = 0$. The corresponding maximizers are given by
\begin{equation}\label{eq: maximizers}
\begin{aligned}
\feeLTsells^{*}(t,y) & := \frac{g(t,y,s) - g(t,y + \deltasell(y),s)}{ \exratesell(y) \deltasell(y)} + \frac{1}{\expdecay \exratesell(y) \deltasell(y)}, \\
\feeLTbuys^{*}(t,y) & := \frac{g(t,y,s) - g(t,y - \deltabuy(y),s)}{ \exratebuy(y) \deltabuy(y)} + \frac{1}{\expdecay \exratebuy(y) \deltabuy(y)}.
\end{aligned}
\end{equation}
\newline
Plugging the maximizers in \eqref{eq: HJB for g}, we obtain
\begin{align}\label{eq: eq for g}
& \frac{\partial}{\partial t} g(t,y,s) + \frac{\sigma^{2}}{2} \frac{\partial^{2}}{\partial s^{2}} g(t,y,s) - P(y,s) \nonumber \\
& \quad + \left( \frac{\intsell e^{- \expdecay \oracleprice \deltasell(y) - 1}}{\expdecay} e^{\expdecay \exratesell (y) \deltasell(y)} e^{ \expdecay ( g(t,y + \deltasell(y),s) - g(t,y,s) )} \right) \ind_{ \{ y < \overline{y} \}} \\
&\quad + \left( \frac{\intbuy e^{ \expdecay \oracleprice \deltabuy(y) - 1}}{\expdecay} e^{-\expdecay \exratebuy (y) \deltabuy(y)} e^{ \expdecay ( g(t,y - \deltabuy(y),s) - g(t,y,s)} \right) \ind_{ \{ y > \underline{y} \}} = 0. \nonumber
\end{align}
\section{Constant oracle price}\label{section: First Approximation}
To compute the first approximate solution, we take $S_{t} = S_0$, which is equivalent to assuming that $\sigma = 0$. In Section \ref{section: second Approximation} we return to the case $\sigma > 0$.
With this assumption the reduced value function $g$ no longer depends on $s$ and the Hamilton-Jacobi-Bellman equation \eqref{eq: eq for g} simplifies to
\begin{align} \label{eq: approx HJB for g}
& \frac{\partial}{\partial t} g(t,y) - P(y,s) \nonumber \\
& \quad + \left( \frac{\intsell e^{- \expdecay \oracleprice \deltasell(y) - 1}}{\expdecay} e^{\expdecay \exratesell (y) \deltasell(y)} e^{ \expdecay ( g(t,y + \deltasell(y)) - g(t,y) )} \right) \ind_{ \{ y < \overline{y} \}} \\
&\quad + \left( \frac{\intbuy e^{ \expdecay \oracleprice \deltabuy(y) - 1}}{\expdecay} e^{-\expdecay \exratebuy (y) \deltabuy(y)} e^{ \expdecay ( g(t,y - \deltabuy(y)) - g(t,y)} \right) \ind_{ \{ y > \underline{y} \}} = 0. \nonumber
\end{align}
We make the substitution $e^{kg(t,y)} = w(t,y)$ which transforms \eqref{eq: eq for g} into a linear system of ODEs of the form
\begin{align} \label{eq: eq for w}
& \frac{\partial}{\partial t} w(t,y) - \expdecay P(y,s) w(t,y)\nonumber \\
& +\left( \intsell e^{- \expdecay \oracleprice \deltasell(y) - 1} e^{\expdecay \exratesell (y) \deltasell(y)} w(t,y + \deltasell(y)) \right) \ind_{ \{ y < \overline{y} \}} \\
& +\left( \intbuy e^{ \expdecay \oracleprice \deltabuy(y) - 1} e^{-\expdecay \exratebuy (y) \deltabuy(y)} w(t,y - \deltabuy(y)) \right) \ind_{ \{ y > \underline{y} \}} = 0. \nonumber
\end{align}
The solution to the system is summarized in the following theorem. The proof is straightforward and hence, omitted.
\begin{theorem} \label{th: value function and optimal fees}
Define the matrix $ \mathbf{A} : = ( \mathbf{A}_{i,j} )_{0 \leq i \leq j \leq 2N} $ by
\[
\mathbf{A}_{i,j} : =
\begin{cases}
- \expdecay P(y^{j - N},s) & \text{ if } i = j, \\
\intsell e^{- \expdecay \oracleprice \deltasell(y^{j - N}) - 1} e^{\expdecay \exratesell (y^{j - N}) \deltasell(y^{j - N})} & \text{ if } i = j - 1, \\
\intbuy e^{ \expdecay \oracleprice \deltabuy(y^{j - N}) - 1}e^{-\expdecay \exratebuy (y^{j - N}) \deltabuy(y^{j - N})} & \text{ if } i = j + 1 \\
0 & \text{ otherwise,}
\end{cases}
\]
and denote with $\mathbf{1}$ the unit vector of $\mathbb{R}^{2N}$. Define the function $w : [0,T] \times \{ y^{-N}, \dots, y^{N} \} \to \mathbb{R}$ by \[ w(t,y^{i}) : = (\exp( \mathbf{A}(T - t)) \mathbf{1})_{i}, \]
and the function $v : [0,T] \times \{ y^{-N}, \dots, y^{N} \} \times \mathbb{R}_{+} \to \mathbb{R}$ as
\[ v(t,y^{i}, \cash) = \cash + \frac{1}{k}\log(w(t,y^{i})).\]
Then $v$ solves the Hamilton-Jacobi-Bellman equation
\begin{align*}
& \frac{\partial}{\partial t} v(t,y^{i},\cash) - P(y^{i},s) + \nonumber \\
& \left( \intsell e^{- \expdecay \oracleprice \deltasell(y^{i})} \sup_{ \feeLTsells \in \mathbb{R}} e^{\expdecay \exratesell(\feeLTsells,y^{i}) \deltasell(y^{i})} \left[v(t,y^{i+1}, \cash + \feeLTsells \exratesell(y^{i}) \deltasell(y^{i})) - v(t,y^{i},\cash)\right] \right) \ind_{ \{ y^{i} < y^{N} \}} \\
& \left( \intbuy e^{\expdecay \oracleprice \deltabuy(y^{i})} \sup_{ \feeLTbuys \in \mathbb{R}} e^{-\expdecay \exratebuy(\feeLTbuys,y^{i}) \deltabuy(y^{i})} \left[v(t,y^{i-1},\cash + \feeLTbuys \exratebuy(y^{i}) \deltabuy(y^{i})) - v(t,y^{i},\cash) \right] \right) \ind_{ \{ y^{i} > y^{-N} \}} = 0, \nonumber
\end{align*}
with boundary condition $v(T,y,\cash) = \cash$. Moreover, the corresponding optimizers are independent of $\cash$ and satisfy
\begin{align}
\feeLTsells^{*}(t,y^i) & : = \frac{1}{\expdecay \exratesell(y^{i}) \deltasell(y^{i})} \left( 1 + \log \left( \frac{w(t,y^{i})}{w(t,y^{i + 1})} \right) \right), \\
\feeLTbuys^{*}(t,y^i) & : = \frac{1}{\expdecay \exratebuy(y^{i}) \deltabuy(y^{i})} \left( 1 + \log \left( \frac{w(t,y^{i})}{w(t,y^{i - 1})} \right) \right),
\end{align}
for $y^{i} \in \{ y^{-N} = \underline{y}, \dots, y^{0} = y_{0}, \dots, y^{N} = \overline{y} \}$.
\end{theorem}
\subsection{Optimal fee structure}\label{Optimal fee structure: constant external price}
We perform numerical simulations of the results found in Theorem \ref{th: value function and optimal fees}. We assume that the AMM is a CPM, where the trading function $f: \mathbb{R}_{+} \times \mathbb{R}_{+} \to \mathbb{R}_{+}$ is $f(x,y) := xy$ and the level function $\varphi: \mathbb{R}_{+} \to \mathbb{R}_{+}$ is $\varphi(y) := \depth / y$. We assume that the the grid for $y$ is such that after every trade the exchange rate $Z(y)$ moves by $0.1$. More precisely, the grid for the risky asset is in turn given by the formula \[ y^{i} : = \sqrt{\frac{\depth}{ \left( \frac{\depth}{y_0} - 0.1\,i \right) } }, \quad \quad \text{ for } i \in \{ -20, \dots, 20 \}. \]
We take the time horizon $T=1$, the two baseline intensities $\intbuy = \intsell = 50$, the rate of exponential decay $\expdecay = 2$, the oracle price $S_0 =100$, and the penalty function $P(y,s) = \pencons(Z(y) -s)^{2}$. Moreover, we assume that the initial conditions of the pool are $\depth = 10^{8}$ and $y_0 = 1000$. Figure \ref{fig: optimal fees} shows the optimal fees in the case where the penalization constant $\pencons = 0$.
From the plot in Figure \ref{fig: optimal fees} we see that the AMM charges fees in two different regimes. When the quantity of asset $y$ is below the value of $y_0$ it is more profitable to sell inside the AMM with respect to the oracle price, hence the AMM will charge high fees to penalize arbitrageurs. At the same time it will charge low fees to buy, even negative ones, in order to encourage noise traders to trade inside the venue and increase the volatility in the price. Symmetrically, the analogous happens when the quantity is above the value of $y_0$. Figure \ref{fig: linear fees} shows that if the quantity of asset $Y$ stays in a small enough neighbourhood of $y_0$, a linear approximation of the fees is a good enough approximation. Below we show that the linear approximation generates revenues close to the optimal strategy.
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool.}
\label{fig: optimal fees}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Linear_Fees_on_quantity.pdf}
\caption{Linear fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool.}
\label{fig: linear fees}
\end{subfigure}
\end{figure}
The behaviour of the fees is highly dependent on the value of the parameter $k$. Indeed, as the value of the parameter $k$ gets smaller, the probability of arrival becomes less sensitive to price changes. As a response to this, the AMM prioritizes pushing the price as close to the oracle price as possible to get away from the boundaries where it does not generate revenues. We can observe this phenomenon in Figure \ref{fig: optimal fees k=0.5} and Figure \ref{fig: optimal fees k=0.25} for $k=1$ and $k=0.25$, respectively.
\begin{figure}[h]
\centering
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_k=1.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) multiplied by $k$ at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool when $k = 1$.}
\label{fig: optimal fees k=0.5}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_k=0.25.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) multiplied by $k$ at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool when $k = 0.25$.}
\label{fig: optimal fees k=0.25}
\end{subfigure}
\end{figure}
The following corollary gives a rigorous mathematical characterization of this behaviour. The proof is straightforward and hence, omitted.
\begin{corollary}\label{cor: fee for k to 0}
Define the matrix $ \mathbf{A} : = ( \mathbf{A}_{i,j} )_{0 \leq i \leq j \leq 2N} $ by
\[
\mathbf{A}_{i,j} : =
\begin{cases}
\intsell e^{-1} & \text{ if } i = j - 1, \\
\intbuy e^{-1} & \text{ if } i = j + 1, \\
0 & \text{ otherwise,}
\end{cases}
\]
and denote with $\mathbf{1}$ the unit vector of $\mathbb{R}^{2N}$. Define the function $w : [0,T] \times \{ y^{-N}, \dots, y^{N} \} \to \mathbb{R}$ by \[ w(t,y^{i}) : = (\exp( \mathbf{A}(T - t)) \mathbf{1})_{i},. \]
Let $\feeLTsells^{*}$ and $\feeLTbuys^{*}$ be the optimal fees from Theorem \ref{th: value function and optimal fees} and define the quantities
\begin{align}
\feeLTsells^{*}_0(t,y^i) & : = \frac{1}{ \exratesell(y^{i}) \deltasell(y^{i})} \left( 1 + \log \left( \frac{w(t,y^{i})}{w(t,y^{i + 1})} \right) \right) \\
\feeLTbuys^{*}_0(t,y^i) & : = \frac{1}{ \exratebuy(y^{i}) \deltabuy(y^{i})} \left( 1 + \log \left( \frac{w(t,y^{i})}{w(t,y^{i - 1})} \right) \right).
\end{align}
We have that
\begin{align}
\lim_{k \to 0} k\feeLTsells^{*}(t,y^i) = \feeLTsells^{*}_0(t,y^i) \quad \quad \text{ and } \quad \quad \lim_{k \to 0} k\feeLTbuys^{*}(t,y^i) = \feeLTbuys^{*}_0(t,y^i),
\end{align}
for every $t \in [0,T]$ and $y^{i} \in \{ y^{-N}, \dots, y^{N} \}$.
\end{corollary}
The next plots illustrates the corollary. More precisely, we compare $k*\feeLTsells^{*}$ and $k*\feeLTbuys^{*}$ for $k=0.1$ (left figure) with the limit optimal fees $\feeLTsells^{*}_0$ and $\feeLTbuys^{*}_0$ (right figure) in \eqref{cor: fee for k to 0}.
\begin{figure}[H]
\centering
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_k=0.1.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) multiplied by $k$ at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool when $k = 0.5$.}
\label{fig: optimal fees k=0.1}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_k=0.pdf}
\caption{Optimal fees for selling $\feeLTsells_{0}^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys_{0}^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool.}
\label{fig: optimal fees k=0}
\end{subfigure}
\end{figure}
Next we discuss how the optimal fees behave as functions of $\pencons$. If we increase $\pencons$, the AMM tries to keep prices aligned to the external price by pushing quantities of asset $Y$ away from the boundaries. To this end, it charges low fees to sell and high fees to buy when the price is less than the oracle price and vice versa when the price is high. Figure \ref{fig: optimal fees with penalty k=1} and Figure \ref{fig: optimal fees with penalty k=0.1} show the fees as a function of quantity and penalization constant when $t=0.5$, for $k=2$ and $k=0.1$ respectively. The curves corresponding to $\pencons = 0$ are the ones in Figure \ref{fig: optimal fees} and Figure \ref{fig: optimal fees k=0.1} respectively .
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_Nonzero_penalty_k=2.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool and of $\pencons$ when $k = 2$.}
\label{fig: optimal fees with penalty k=1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_Nonzero_penalty_k=0.1.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ and of $\pencons$ in the pool when $k = 0.1$.}
\label{fig: optimal fees with penalty k=0.1}
\end{subfigure}
\end{figure}
As the penalty parameter $\pencons$ increases, it alters both the shape and slope of the optimal fees. When $\pencons$ becomes sufficiently large, the penalty term dominates the allocation of the fees, with alignment of quotes becoming a secondary effect.
The following plots show the behaviour of the fees as a function of time ($x$ axis) and quantity in the pool (colorbar) for $k=2$ and $k=0.1$. The effect present in the Figure \ref{fig: optimal fees k=0.1} can be seen also in Figure \ref{fig: optimal fees on time and quantity k=0.1}.
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.48\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_fees_through_time_fct_of_Q_t_cropped.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ (colorbar) in the pool and of time when $k = 2$.}
\label{fig: optimal fees on time and quantity k=1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.48\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_fees_through_time_fct_of_Q_t.k=0.1_cropped.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ (colorbar) and of time in the pool when $k = 0.1$.}
\label{fig: optimal fees on time and quantity k=0.1}
\end{subfigure}
\end{figure}
Lastly we compare our optimal strategy with other different strategies:
\begin{itemize}
\item[$(i)$] the linear strategy described in Figure \ref{fig: linear fees}, where at each time with linearised $\feeLTsells^{*}(t,y)$, $\feeLTbuys^{*}(t,y)$ in a neighbourhood of $y_0$, and
\item[$(ii)$] the \emph{constant} strategy where the fees are constant for every time $t$ and every quantity $y$. The constant $c$ is chosen as the average of the optimal two fees at $t=0.5$ for $y = y_0$, i.e., \[ c = \frac{\feeLTsells^{*}(0.5,y_0) + \feeLTbuys^{*}(0.5,y_0)}{2}. \]
\end{itemize}
We consider the following parameters $\depth = 10^{8}$, $y_0 = 1000$, $\pencons = 0$, $\underline{y} = 980$, $\overline{y} = 1020$, $T=1$ and we run simulations for different values of $\intbuy$, $\intsell$ and $k$. We carry out 100,000 simulations and we discretise $[0,T]$ in $1,000$ timesteps.\footnote{Our code is publicly available at \url{https://github.com/leonardobaggiani/amm-fees.git}.}
We observe that the revenues are decreasing in the values of $\expdecay$ and increasing in the value of $\intsell$ and $\intbuy$. The latter is because as $\intsell$ and $\intbuy$ increase the number of orders increase and hence the revenue increases, similarly, as $\expdecay$ decreases, the arbitrageurs react less to mispricing and simultaneously, the optimal fees increase and thus the AMM collects more fees.
In the following table, the column \textit{fees} shows the revenue from collecting fees, the column \textit{sell} shows the number of sell orders, the column \textit{buy} shows the number of buy orders, and the column \textit{QV} shows the quadratic variation of the instantaneous exchange rate $Z$ defined in Equation \ref{eq: marginal exchange}.
\begin{center}
\begin{tabular}[h]{@{}rcccccccc@{}}
\toprule
& \multicolumn{4}{c}{$\lambda^{+} = \lambda^{-} = 100$}
& \multicolumn{4}{c}{$\lambda^{+} = \lambda^{-} = 150$} \\
\cmidrule(lr){2-5} \cmidrule(lr){6-9}
& fees & sell & buy & QV
& fees & sell & buy & QV\\
\midrule
% --- k = 2
\multicolumn{9}{l}{$k=2$}\\
\midrule
Optimal & 35.55 & 35.89 & 35.91 & 0.69 & 52.97 & 53.45 & 53.47 & 1.01 \\
Linear & 35.55 & 35.88 & 35.91 & 0.69 & 52.97 & 53.44 & 53.48 & 1.01 \\
Constant & 35.16 & 35.15 & 35.16 & 0.68 & 52.26 & 52.26 & 52.26 & 0.99 \\
\midrule
% --- k = 1
\multicolumn{9}{l}{$k=1$}\\
\midrule
Optimal & 71.46 & 35.92 & 35.94 & 0.69 & 106.38 & 53.47 & 53.50 & 1.01 \\
Linear & 71.46 & 35.91 & 35.95 & 0.69 & 106.38 & 53.46 & 53.51 & 1.01 \\
Constant & 71.22 & 35.60 & 35.62 & 0.69 & 105.90 & 52.94 & 52.96 & 1.00 \\
\bottomrule
\end{tabular}
\end{center}
We find that optimal strategy outperforms the constant strategy and the linear approximation of the fees has a performance that is indistinguishable from that of the optimal strategy for the above parameters.
Thus, a linear fee structure is suitable when designing the fees to charge in these venues.
\section{Quadratic approximation with stochastic oracle price}\label{section: second Approximation}
For the second approximate solution we return to the original HJB equation in \eqref{eq: eq for g}. %Here, we do not pose any limitation to the inventory.\todo{Again I am not sure if this makes sense in light of the approximations} This will result in us dropping the characteristic functions $\ind_{ \{ y > \underline{y} \}}$ and $\ind_{ \{ y < \overline{y} \}}$ from the equation.
%This assumption is sensible if the depth of the pool $\depth$ is large. We work in an CPM, and we take $P(y,s) = \pencons ( Z(y) - s)^{2}.$ Finally,
Here, we make a quadratic approximation of the exponential terms:
\small{
\begin{align*}
e^{\expdecay (-\oracleprice \deltasell(y) + \exratesell (y) \deltasell(y) + g(t,y + \deltasell(y),s) - g(t,y,s) )} \approx 1 & + \expdecay (-\oracleprice \deltasell(y) + \exratesell (y) \deltasell(y) + g(t,y + \deltasell(y) ,s) - g(t,y,s) ) \\
& + \frac{1}{2} [ \expdecay (-\oracleprice \deltasell(y) + \exratesell (y) \deltasell(y) + g(t,y + \deltasell(y),s) - g(t,y,s) ) ]^{2}, \\
e^{ \expdecay( \oracleprice \deltabuy(y) - \exratebuy (y) \deltabuy(y) + g(t,y - \deltabuy(y) ,s) - g(t,y,s))} \approx 1 & + \expdecay( \oracleprice \deltabuy(y) - \exratebuy (y) \deltabuy(y) + g(t,y - \deltabuy(y),s) - g(t,y,s)) \\
& + \frac{1}{2} [\expdecay( \oracleprice \deltabuy(y) - \exratebuy (y) \deltabuy(y) + g(t,y - \deltabuy(y),s) - g(t,y,s))]^{2}.
\end{align*}
}
The HJB in \eqref{eq: eq for g} becomes
\begin{equation}\label{eq: approx eq for g}
\begin{aligned}
\frac{\partial}{\partial t} g(t,y,s) & + \frac{\sigma^{2}}{2} \frac{\partial^{2}}{\partial s^{2}} g(t,y,s) - \pencons(Z(y) -s)^{2} + \\
& \frac{e^{-1} \intsell}{\expdecay} [ 1 - \expdecay(\oracleprice \deltasell(y) + \exratesell(y) \deltasell(y) + g(t,y + \deltasell(y),s) - g(t,y,s)) \\
& + \frac{\expdecay^{2}}{2}(- \oracleprice \deltasell(y) + \exratesell(y) \deltasell(y) + g(t,y + \deltasell(y),s) - g(t,y,s))^{2} ] \\
& \frac{e^{-1} \intbuy}{\expdecay} [ 1 + \expdecay(\oracleprice \deltabuy(y) - \exratebuy(y) \deltabuy(y) + g(t,y - \deltabuy(y),s) - g(t,y,s)) \\
& + \frac{\expdecay^{2}}{2}( \oracleprice \deltabuy(y) - \exratebuy(y)\deltabuy(y) + g(t,y - \deltabuy(y),s) - g(t,y,s))^{2} ] = 0.
\end{aligned}
\end{equation}
We assume that $\deltabuy(y)$ and $\deltasell(y)$ are constant equal to $\delta^{-}$ and $\delta^{+}$, respectively.
\begin{remark}
The assumption that $\deltabuy(y)$ and $\deltasell(y)$ are constant is necessary if one wishes to carry out a quadratic expansion of the exponential terms. If we employ a linear approximation of the exponential terms, we could work with the case where $\deltabuy(y)$ and $\deltasell(y)$ are linear in $y$.
\end{remark}
Lastly, we use a linear approximation to the exchange rates
\begin{align*}
Z(y) & = \frac{\depth}{y^{2}} \approx \frac{\depth}{y_0^2} - 2(y - y_0) \frac{\depth}{y_0^3}, \\
\exratesell(y) \delta^{+}& = \frac{\depth}{y^{2} + \delta^{+} y} \approx \frac{\depth}{y_0^2 + \delta^{+} y_0} - (y - y_0) \frac{\depth(2 y_0 + \delta^{+})}{(y_0^2 + \delta^{+}y_0)^2}, \\
\exratebuy(y) \delta^{-} & = \frac{\depth}{y^{2} - \delta^{-}y} \approx \frac{\depth}{y_0^2 - \delta^{-}y_0} - (y - y_0) \frac{\depth(2 y_0 - \delta^{-})}{(y_0^2 - \delta^{-}y_0)^2}.
\end{align*}
\begin{comment}
\begin{remark}
This approximation is works only in a neighbourhood of $y_0$. However, our simulations indicate that trading activity is concentrated around $y_0$, which supports the suitability of this hypothesis.
\end{remark}
\end{comment}
In order to find a solution for the equation \eqref{eq: approx eq for g} we assume that $g(t,y,s)$ is a quadratic polynomial in $y$ of the form \[ g(t,y,s) = y^{2} A(t) + y B(t,s) + C(t,s), \]
with $A(T) = B(T,s) = C(T,s) = 0$. Proposition \eqref{thm: solution to the PDE system} formalises the solution to the HJB equation.
\begin{theorem}\label{thm: solution to the PDE system}
There exists constants\footnote{The full definition of the constants $\{ \psi_{i} \}_{1 \leq i \leq 26}$ is publicly available in the GitHub of the project.} $\{ \psi_{i} \}_{1 \leq i \leq 26} \subset \mathbb{R}$ that define the unique solution to the HJB equation \eqref{eq: approx eq for g} as follows. Let $A:[0,T] \to \mathbb{R}$ be the solution to the Riccati ODE
\begin{equation*}
\psi_0 + \psi_1 A(t) + \psi_2 A^{2}(t) + A'(t), \quad \quad A(T) = 0.
\end{equation*}
Let $b_0$, $b_1 : [0,T] \to \mathbb{R}$ be the unique solutions to the system
\[
\begin{cases}
\psi_3 + \psi_4 A(t) + \psi_5 A^{2}(t) + \psi_6 A(t) b_0(t) + \psi_7 b_0(t) + b_0^{'}(t) = 0 \\
\psi_8 + \psi_9 A(t) + \psi_{10}A(t)b_1(t) + \psi_{11}b_1(t) + b_1^{'}(t)= 0,
\end{cases}
\]
with terminal conditions $b_0(T) = b_1(T) = 0$.
Let $c_0$, $c_1$, $c_2: [0,T] \to \mathbb{R}$ be the unique solutions to the system
\[
\begin{cases}
\psi_{12} + \psi_{13} A(t) + \psi_{14}A^{2}(t) + \psi_{15}A(t)b_0(t) + \psi_{16}b_0(t) + \psi_{17}b_0^{2}(t) + \sigma^{2} c_{2}(t) + c_0^{'}(t) = 0, \\
\psi_{18} + \psi_{19}A(t) + \psi_{20}A(t)b_{1}(t) + \psi_{21}b_{0}(t) + \psi_{22}b_0(t)b_{1}(t) + \psi_{23}b_{1}(t) + c_{1}^{'}(t) = 0, \\
\psi_{24} + \psi_{25} b_{1}(t) + \psi_{26}b_{1}^{2}(t) + c_{2}^{'}(t) = 0,
\end{cases}
\]
with terminal conditions $c_0(T) = c_1(T) = c_2(T) = 0$.
Define $\hat{B},\hat{C} : [0,T] \times \mathbb{R} \to \mathbb{R}$ as
\begin{align*}
\hat{B}(t,s) & = s b_{1}(t) + b_0(t), \\
\hat{C}(t,s) & = s^{2} c_{2}(t) + s c_1(t) + c_0(t).
\end{align*}
Then, the function \[ g(t,y,s) = y^{2} \hat{A}(t) + y \hat{B}(t,s) + \hat{C}(t,s), \] is a solution to the HJB equation \eqref{eq: approx eq for g}.
\end{theorem}
With the above results, the optimal fees from \eqref{eq: maximizers} become
\begin{equation}\label{eq: maximizers second approx}
\begin{aligned}
\feeLTsells^{*}(t,y) & := -\frac{(2y + \delta^{+})\hat{A}(t) + \hat{B}(t,s)}{ \exratesell(y) } + \frac{1}{\expdecay \exratesell(y) \delta^{+}}, \\
\feeLTbuys^{*}(t,y) & := -\frac{(-2y + \delta^{-})\hat{A}(t) - \hat{B}(t,s)}{ \exratebuy(y)} + \frac{1}{\expdecay \exratebuy(y) \delta^{-}}.
\end{aligned}
\end{equation}
Observe that the fees depend linearly on $y$ and $s$ and they do not depend on $\sigma$.
\subsection{Optimal fee structure: dynamic oracle price with second order approximation}\label{section: Optimal fee structure: dynamic external price with second order approximation}
We perform numerical simulations of the results found in Theorem \ref{thm: solution to the PDE system}. In order to make it consistent with the hypothesis of the theorem, we assume that the traded amounts are $\deltasell(y) = \delta^{+} = 0.5$ and $\deltabuy(y) = \delta^{-} = 0.5$. We fix an initial value of $y_0 = 1000$ which gives the following grid for $y$ as \[ y^{i} = (1000 + i), \quad \quad \text{ for } i \in \{-20, -19.5, \dots, 19.5, 20 \}. \]
We take the time horizon $T=1$, the two baseline intensities $\intbuy = \intsell = 50$, the rate of exponential decay $\expdecay = 2$, the oracle price $S_{t} = S_0 + \sigma W_{t}$ with $S_0 = 100$, $\sigma = 0.2$ and $\pencons = 0$. As before, we assume that the depth of the pool is $\depth = 10^{8}$.
The next figures show the plot for the optimal fees of \eqref{eq: maximizers second approx} and the comparison with the optimal fees obtained with the first approximation. It is important to point out that the fees in \eqref{eq: maximizers second approx} are no longer skewed at the boundaries.
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_lin_quadratic_approx.pdf}
\caption{Optimal fees (second approximation Section \ref{section: second Approximation}) for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool.}
\label{fig: optimal fees second approx}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_lin_quadratic_approxvsfirstapprox.pdf}
\caption{Optimal fees (first approximation Section \ref{section: First Approximation}) for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool.}
\label{fig: optimal fees second approx vs optimal fees first approx}
\end{subfigure}
\end{figure}
The plot in Figure \ref{fig: optimal fees second approx} confirm the insights we obtained from Figure \ref{fig: optimal fees}, namely that there are two distinct regimes for the fee structure: one in which arbitrageurs are penalised and one that aim to increase volatility and noise trading.
Next, we study the case when $k \to 0 $. Here, the second order approximation does not work well for smaller values of the parameters $\expdecay$. Indeed, since the fees are independent of $\sigma$ we would expect that as $k \to 0$ the fees in \eqref{eq: maximizers second approx} should resemble the one in Figure \ref{fig: optimal fees k=0}, however, the next two figures show that this is not the case.
The explanation for this phenomenon comes from the fact that when $k \to 0$ then $A(t) \to 0$ and $B(t) \to \psi_{3}t$, hence the following holds.
\begin{corollary}\label{cor: fee for k to 0 second approximation}
Let $\feeLTsells^{*}(t,y)$ and $\feeLTbuys^{*}(t,y)$ be the optimal fees from Theorem \ref{eq: maximizers second approx} and define the quantities
\begin{align}
\feeLTsells^{*}_0(t,y^i) & : = \frac{1}{ \exratesell(y^{i}) \delta^{+}} \\
\feeLTbuys^{*}_0(t,y^i) & : = \frac{1}{ \exratebuy(y^{i}) \delta^{-}} .
\end{align}
Then we have that
\begin{align}
\lim_{k \to 0} k\feeLTsells^{*}(t,y^i) = \feeLTsells^{*}_0(t,y^i) \quad \quad \text{ and } \quad \quad \lim_{k \to 0} k\feeLTbuys^{*}(t,y^i) = \feeLTbuys^{*}_0(t,y^i),
\end{align}
for every $t \in [0,T]$ and $y^{i} \in \{ y^{-N}, \dots, y^{N} \}$.
\end{corollary}
Figures \ref{fig: optimal fees second approx k=0.25} and \ref{fig: optimal fees second approx k=0} illustrate the limiting behaviour described in Corollary \eqref{cor: fee for k to 0 second approximation}.
\begin{figure}[H]
\centering
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_lin_quadratic_approx_k=0.25.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) for $k=0.25$ at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool.}
\label{fig: optimal fees second approx k=0.25}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_lin_quadratic_approx_k=0.pdf}
\caption{Optimal fees for selling $\feeLTsells_{0}^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys_{0}^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool.}
\label{fig: optimal fees second approx k=0}
\end{subfigure}
\end{figure}
The next two figures show how the optimal fees behave as functions of $\pencons$ (left) and as a function of $S_t$ (right). Similarly to the first approximation there are two different regimes, one for $\pencons=0$ and one for $\pencons \neq 0$. Indeed, when $\pencons \neq 0$ the AMM tries to push the price away from the boundaries. Hence, when the quantity of asset $y$ is close to $\underline{y}$ it will charge high fees to buy and low (or even negative) fees to sell and when the quantity of asset $y$ is close to $\overline{y}$ we get the symmetric effect. As expected from the expression in \eqref{eq: maximizers second approx}, the dependence on $S_t$ is linear, furthermore, $\feeLTsells$ decreases when $S_{t}$ increases and $\feeLTbuys$ decreases as $S_{t}$ increases.
\begin{figure}[H]
\centering
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_lin_quadratic_approx_func_of_pen.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool and $\pencons$ (colorbar).}
\label{fig: optimal fees second approx penalty}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Optimal_Fees_on_quantity_lin_quadratic_approx_func_of_S.pdf}
\caption{Optimal fees for selling $\feeLTsells^{*}(t,y_{t-})$ (solid line) and for buying $\feeLTbuys^{*}(t,y_{t-})$ (dashed line) at time $t=0.5$ as a function of the quantity of asset $Y$ in the pool and $\oracleprice$ (colorbar).}
\label{fig: optimal fees second s}
\end{subfigure}
\end{figure}
We now compare the value functions obtained from the two approximations. If $\sigma=0$ then the value function $v(t,y,\cash)$ (right) from Theorem \ref{th: value function and optimal fees} is the \emph{true} value function and we expect it to be close to the function $g(t,y,s)$ (left) in the case of $\sigma = 0$. The following figures shows the comparison between the plots for $g$ and $v$ depending from time and the quantity of asset $Y$. The interval $[0,1]$ has been discretized in $1000$ time steps.
\begin{figure}[H]
\centering
\begin{subfigure}[t]{0.31\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/g_second_approx_cropped.pdf}
\caption{Value function first approximation.}
\label{fig: value function first approx}
\end{subfigure}
\hspace*{0.01\textwidth}
\begin{subfigure}[t]{0.31\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/v_first_approx_cropped.pdf}
\caption{Second approximation when $\sigma = 0$.}
\label{fig: value function second approx}
\end{subfigure}
\hspace*{0.01\textwidth}
\begin{subfigure}[t]{0.31\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/diff_between_v_g_cropped.pdf}
\caption{Difference between the two approximations.}
\label{fig: difference}
\end{subfigure}
\end{figure}
Finally we compare the optimal strategy from the second-order approximation in \eqref{thm: solution to the PDE system} (\emph{Optimal SA}) to the following strategies:
\begin{itemize}
\item[$(i)$] the optimal strategy from the first approximation (\emph{Optimal FA}) implemented with a stochastic $S_t$ instead of $S_0$,
\item[$(ii)$] the \emph{constant} strategy where the fees are constant for every time $t$ and every quantity $y$. The constant $c$ is chosen as the average of the optimal two fees at $t=0.5$ for $y = y_0$, i.e., \[ c = \frac{\feeLTsells^{*}(0.5,y_0) + \feeLTbuys^{*}(0.5,y_0)}{2}. \]
\end{itemize}
We use the following parameters: $\depth = 10^{8}$, $y_0 = 1000$, $\pencons = 0$, $\underline{y} = 990$, $\overline{y} = 1010$, $T=1$ and we run simulations for different $\intbuy$, $\intsell$ and $k$. We carry out 100,000 simulations and we discretise $[0,T]$ in $1,000$ timesteps.
In the following table the column \textit{fees} shows the revenue from collecting fees, the column \textit{sell} shows the number of sell orders, the column \textit{buy} shows the number of buy orders and the column \textit{QV} shows the quadratic variation of the instantaneous exchange rate $Z$ defined in Equation \ref{eq: marginal exchange}.
\begin{center}
\begin{tabular}[h]{@{}rcccccccc@{}}
\toprule
& \multicolumn{4}{c}{$\lambda^{+} = \lambda^{-} = 100$}
& \multicolumn{4}{c}{$\lambda^{+} = \lambda^{-} = 150$} \\
\cmidrule(lr){2-5} \cmidrule(lr){6-9}
& fees & sell & buy & QV
& fees & sell & buy & QV\\
\midrule
% --- k = 2
\multicolumn{9}{l}{$k=2$}\\
\midrule
Optimal SA & 35.62 & 35.90 & 35.91 & 0.69 & 53.05 & 51.60 & 51.60 & 0.98 \\
Optimal FA & 35.61 & 34.79 & 34.76 & 0.67 & 53.02 & 53.45 & 53.45 & 1.01 \\
Constant & 35.18 & 35.18 & 35.19 & 0.68 & 52.29 & 52.28 & 52.29 & 0.99 \\
\midrule
% --- k = 1
\multicolumn{9}{l}{$k=1$}\\
\midrule
Optimal SA & 71.49 & 35.92 & 35.93 & 0.69 & 106.42 & 53.46 & 53.47 & 1.00 \\
Optimal FA & 71.51 & 35.47 & 35.44 & 0.68 & 106.38 & 53.46 & 53.51 & 1.01 \\
Constant & 71.23 & 35.60 & 35.61 & 0.69 & 105.90 & 52.91 & 52.91 & 1.00 \\
\bottomrule
\end{tabular}
\end{center}
As before, we find that either approximation yields a performance that is almost indistinguishable from the other, and both outperform constant fees substantially.
This supports the usage of linear dynamic fees when designing fee structures in AMMs.
\section{Conclusion}
In this paper, we study how an AMM maximizes its revenue by setting optimal dynamic trading fees. We find that the optimal fee schedule serves two distinct purposes. On the one hand, by monitoring external prices, the AMM raises fees strategically to penalize arbitrageurs. On the other hand, it lowers fees to increase price volatility, which attracts noise traders and stimulates trading volume. This dual approach allows the AMM to balance the trade-off between deterring arbitrageurs and encouraging liquidity taking through noise order flow.
\newline \newline
Although in this paper we focus on a time-horizon that is small enough so that liquidity remains constant, future work will look at the case of non-static liquidity; see e.g.,
\cite{aqsha2025equilibriumrewardliquidityproviders,bergault2024price}.
Similarly, one could also look at online learning algorithms (e.g., adaptation and learning with neural contextual bandits or reinforcement learning, as in \cite{duran2022efficient,spooner2018market}) to automate the fees that AMMs charge, similar to what has been done in \citet{nadkarni2023zeroswap}.
Competition between pools is another promising area of future work; see e.g., \cite{boyce2024market,guo2024macroscopic} for studies in limit order books.
\bibliography{thebib}
\bibliographystyle{plainnat}
\end{document}
\newcommand{\feeLTsells}{\mathfrak{p}}
\newcommand{\feeLTbuys}{\mathfrak{m}}
\newcommand{\exratesell}{Z_{+}}
\newcommand{\exratebuy}{Z_{-}}
\newcommand{\deltasell}{\Delta^{+}}
\newcommand{\deltabuy}{\Delta^{-}}
\newcommand{\intsell}{\lambda^{+}}
\newcommand{\intbuy}{\lambda^{-}}
\newcommand{\depth}{p^{2}}
\newcommand{\expdecay}{k}
\newcommand{\oracleprice}{s}
\newcommand{\oraclepricestochastic}{S_{t}}
\newcommand{\ppbuy}{N^{-,\feeLTbuys}}
\newcommand{\ppsell}{N^{+,\feeLTsells}}
\newcommand{\pencons}{\phi}
\newcommand{\Cash}{\mathfrak{C}}
\newcommand{\cash}{\mathfrak{c}}
\begin{thebibliography}{41}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{\texttt{#1}}
\expandafter\ifx\csname urlstyle\endcsname\relax
\providecommand{\doi}[1]{doi: #1}\else
\providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi
\bibitem[Adams et~al.(2025)Adams, Moallemi, Reynolds, and
Robinson]{adams2025amammauctionmanagedautomatedmarket}
Austin Adams, Ciamac~C. Moallemi, Sara Reynolds, and Dan Robinson.
\newblock am-amm: An auction-managed automated market maker.
\newblock \emph{arXiv preprint arXiv:2403.03367}, 2025.
\bibitem[Adams et~al.(2020)Adams, Zinsmeister, and
Robinson]{Adams2020UniswapVC}
Hayden Adams, Noah Zinsmeister, and Daniel~H. Robinson.
\newblock Uniswap v2 core, 2020.
\bibitem[Adams et~al.(2021)Adams, Zinsmeister, Salem, and
Robinson]{Adams2021UniswapVC}
Hayden Adams, Noah Zinsmeister, Moody Salem, and Daniela Robinson.
\newblock Uniswap v3 core, 2021.
\bibitem[Adams et~al.(2024)Adams, Zinsmeister, Salem, Robinson, Reynolds,
Adams, Pote, Toda, Henshaw, and Williams]{Adams2024UniswapVC}
Hayden Adams, Noah Zinsmeister, Moody Salem, Daniela Robinson, Sara Reynolds,
Austin Adams, Will Pote, Mark Toda, Alice Henshaw, and Emily Williams.
\newblock Uniswap v4 core, 2024.
\bibitem[Angeris and Chitra(2020)]{angeris2020priceoracles}
Guillermo Angeris and Tarun Chitra.
\newblock Improved price oracles: Constant function market makers.
\newblock In \emph{Proceedings of the 2nd ACM Conference on Advances in
Financial Technologies}, 2020.
\bibitem[Angeris et~al.(2021)Angeris, Kao, Chiang, Noyes, and
Chitra]{angeris2021uniswapanalysis}
Guillermo Angeris, Hsien-Tang Kao, Rei Chiang, Charlie Noyes, and Tarun Chitra.
\newblock An {Analysis} of {Uniswap} markets.
\newblock \emph{Cryptoeconomic Systems}, 0\penalty0 (1), apr 5 2021.
\bibitem[Angeris et~al.(2023)Angeris, Evans, and Chitra]{Angeris2023}
Guillermo Angeris, Alex Evans, and Tarun Chitra.
\newblock Replicating market makers.
\newblock \emph{Digital Finance}, 2023.
\bibitem[Aqsha et~al.(2025)Aqsha, Bergault, and
Sánchez-Betancourt]{aqsha2025equilibriumrewardliquidityproviders}
Alif Aqsha, Philippe Bergault, and Leandro Sánchez-Betancourt.
\newblock Equilibrium reward for liquidity providers in automated market
makers.
\newblock \emph{arXiv preprint arXiv:2503.22502}, 2025.
\bibitem[Avellaneda and Stoikov(2008)]{zbMATH05278232}
Marco Avellaneda and Sasha Stoikov.
\newblock High-frequency trading in a limit order book.
\newblock \emph{Quantitative Finance}, 8\penalty0 (3):\penalty0 217--224, 2008.
\bibitem[Bachu et~al.(2025)Bachu, Hasbrouck, Saleh, and Wan]{Bachu2025}
Brad Bachu, Joel Hasbrouck, Fahad Saleh, and Xin Wan.
\newblock An overview of uniswap v4 for researchers.
\newblock \emph{SSRN}, 2025.
\newblock SSRN preprint.
\bibitem[Bartoletti et~al.(2021)Bartoletti, Chiang, and
Lluch-Lafuente]{bartoletti2021theoryamm}
Massimo Bartoletti, James Hsin-yu Chiang, and Alberto Lluch-Lafuente.
\newblock A theory of automated market makers in defi.
\newblock In \emph{Coordination Models and Languages}, Lecture Notes in
Computer Science, 2021.
\bibitem[Barucci et~al.(2025)Barucci, Mathieu, and
S{\'a}nchez-Betancourt]{Barucci2025}
Emilio Barucci, Adrien Mathieu, and Leandro S{\'a}nchez-Betancourt.
\newblock Market making with fads, informed, and uninformed traders.
\newblock \emph{arXiv preprint arXiv:2501.03658}, 2025.
\bibitem[Bergault et~al.(2024{\natexlab{a}})Bergault, Bertucci, Bouba,
Gu{\'e}ant, and Guilbert]{bergault2024price}
Philippe Bergault, Louis Bertucci, David Bouba, Olivier Gu{\'e}ant, and Julien
Guilbert.
\newblock Price-aware automated market makers: Models beyond {B}rownian prices
and static liquidity.
\newblock \emph{arXiv preprint arXiv:2405.03496}, 2024{\natexlab{a}}.
\bibitem[Bergault et~al.(2024{\natexlab{b}})Bergault, Bertucci, Bouba, and
Guéant]{Bergault2024}
Philippe Bergault, Louis Bertucci, David Bouba, and Olivier Guéant.
\newblock Automated market makers: Mean-variance analysis of lps payoffs and
design of pricing functions.
\newblock \emph{Digital Finance}, 2024{\natexlab{b}}.
\bibitem[Boyce et~al.(2025)Boyce, Herdegen, and
S\'{a}nchez-Betancourt]{boyce2024market}
Robert Boyce, Martin Herdegen, and Leandro S\'{a}nchez-Betancourt.
\newblock Market making with exogenous competition.
\newblock \emph{SIAM Journal on Financial Mathematics}, 16\penalty0
(2):\penalty0 692--706, 2025.
\bibitem[Cao et~al.(2023)Cao, Kogan, Tsoukalas, and Hemenway~Falk]{Cao2023}
David Cao, Leonid Kogan, Gerry Tsoukalas, and Brett Hemenway~Falk.
\newblock A structural model of automated market making.
\newblock \emph{SSRN preprint}, 2023.
\bibitem[Capponi and
Jia(2021)]{capponi2021adoptionblockchainbaseddecentralizedexchanges}
Agostino Capponi and Ruizhe Jia.
\newblock The adoption of blockchain-based decentralized exchanges.
\newblock \emph{arXiv preprint arXiv:2103.08842}, 2021.
\bibitem[Capponi and Zhu(2025)]{Capponi2025}
Agostino Capponi and Brian Zhu.
\newblock Optimal exiting for liquidity provision in constant function market
makers.
\newblock \emph{SSRN preprint}, 2025.
\bibitem[Cartea et~al.(2024{\natexlab{a}})Cartea, Drissi, Sánchez-Betancourt,
Siska, and Szpruch]{Cartea2024}
\'Alvaro Cartea, Fayçal Drissi, Leandro Sánchez-Betancourt, David Siska, and
Lukasz Szpruch.
\newblock Strategic bonding curves in automated market makers,
2024{\natexlab{a}}.
\newblock SSRN preprint.
\bibitem[Cartea et~al.(2015)Cartea, Jaimungal, and Penalva]{zbMATH06459781}
Álvaro Cartea, Sebastian Jaimungal, and José Penalva.
\newblock \emph{Algorithmic and High-Frequency Trading}.
\newblock Cambridge University Press, 2015.
\newblock ISBN 978-1-107-09114-6.
\bibitem[Cartea et~al.(2022)Cartea, Drissi, and Monga]{Cartea_2022}
Álvaro Cartea, Fayçal Drissi, and Marcello Monga.
\newblock Decentralised finance and automated market making: Execution and
speculation.
\newblock \emph{SSRN Electronic Journal}, 2022.
\newblock ISSN 1556-5068.
\newblock \doi{10.2139/ssrn.4144743}.
\bibitem[Cartea et~al.(2023)Cartea, Drissi, and Monga]{Cartea202369}
Álvaro Cartea, Fayçal Drissi, and Marcello Monga.
\newblock Predictable losses of liquidity provision in constant function
markets and concentrated liquidity markets.
\newblock \emph{Applied Mathematical Finance}, 30\penalty0 (2):\penalty0
69--93, 2023.
\bibitem[Cartea et~al.(2024{\natexlab{b}})Cartea, Drissi, and
Monga]{Cartea2024931}
Álvaro Cartea, Fayçal Drissi, and Marcello Monga.
\newblock Decentralized finance and automated market making: Predictable loss
and optimal liquidity provision.
\newblock \emph{SIAM Journal on Financial Mathematics}, 15\penalty0
(3):\penalty0 931--959, 2024{\natexlab{b}}.
\bibitem[Duran-Martin et~al.(2022)Duran-Martin, Kara, and
Murphy]{duran2022efficient}
Gerardo Duran-Martin, Aleyna Kara, and Kevin Murphy.
\newblock Efficient online bayesian inference for neural bandits.
\newblock In \emph{International conference on artificial intelligence and
statistics}, pages 6002--6021. PMLR, 2022.
\bibitem[Evans et~al.(2021)Evans, Angeris, and Chitra]{evans2021optimalfees}
Alex Evans, Guillermo Angeris, and Tarun Chitra.
\newblock Optimal fees for geometric mean market makers.
\newblock In \emph{Financial Cryptography and Data Security. FC 2021
International Workshops}, Lecture Notes in Computer Science, 2021.
\bibitem[Fritsch(2021)]{fritsch2021noteoptimalfees}
Robin Fritsch.
\newblock A note on optimal fees for constant function market makers.
\newblock In \emph{Proceedings of the 2021 ACM CCS Workshop on Decentralized
Finance and Security}. Association for Computing Machinery, 2021.
\bibitem[Fukasawa et~al.(2023)Fukasawa, Maire, and Wunsch]{Fukasawa03062023}
Masaaki Fukasawa, Basile Maire, and Marcus Wunsch.
\newblock Weighted variance swaps hedge against impermanent loss.
\newblock \emph{Quantitative Finance}, 23\penalty0 (6):\penalty0 901--911,
2023.
\bibitem[Fukasawa et~al.(2024)Fukasawa, Maire, and Wunsch]{fukasawa2024model}
Masaaki Fukasawa, Basile Maire, and Marcus Wunsch.
\newblock Model-free hedging of impermanent loss in geometric mean market
makers with proportional transaction fees.
\newblock \emph{Applied Mathematical Finance}, pages 1--22, 2024.
\bibitem[Fukasawa et~al.(2025)Fukasawa, Maire, and
Wunsch]{fukasawa2025liquidity}
Masaaki Fukasawa, Basile Maire, and Marcus Wunsch.
\newblock Liquidity provision of utility indifference type in decentralized
exchanges.
\newblock \emph{arXiv preprint arXiv:2502.01931}, 2025.
\bibitem[Goyal et~al.(2023)Goyal, Ramseyer, Goel, and
Mazieres]{goyal2023findingcurve}
Mohak Goyal, Geoffrey Ramseyer, Ashish Goel, and David Mazieres.
\newblock Finding the right curve: Optimal design of constant function market
makers.
\newblock In \emph{Proceedings of the 24th ACM Conference on Economics and
Computation}, 2023.
\bibitem[Gueant(2016)]{zbMATH06550567}
Olivier Gueant.
\newblock \emph{The financial mathematics of market liquidity. {From} optimal
execution to market making}.
\newblock Chapman Hall/CRC Financ. Math. Ser. Boca Raton, FL: CRC Press, 2016.
\newblock ISBN 978-1-4987-2547-7; 978-1-4987-2548-4.
\bibitem[Guo et~al.(2024)Guo, Jin, and Nam]{guo2024macroscopic}
Ivan Guo, Shijia Jin, and Kihun Nam.
\newblock Macroscopic market making games.
\newblock \emph{arXiv preprint arXiv:2406.05662}, 2024.
\bibitem[Hasbrouck et~al.(2022)Hasbrouck, Rivera, and Saleh]{Hasbrouck2022}
Joel Hasbrouck, Thomas~J Rivera, and Fahad Saleh.
\newblock The need for fees at a dex: How increases in fees can increase dex
trading volume.
\newblock \emph{SSRN preprint}, 2022.
\newblock SSRN preprint.
\bibitem[He et~al.(2024)He, Yang, and Zhou]{he2024optimaldesignautomatedmarket}
Xue~Dong He, Chen Yang, and Yutian Zhou.
\newblock Optimal design of automated market makers on decentralized exchanges.
\newblock \emph{arXiv preprint arXiv:2404.13291}, 2024.
\bibitem[Milionis et~al.(2022)Milionis, Moallemi, Roughgarden, and
Zhang]{milionis2022automated}
Jason Milionis, Ciamac~C Moallemi, Tim Roughgarden, and Anthony~Lee Zhang.
\newblock Automated market making and loss-versus-rebalancing.
\newblock \emph{arXiv preprint arXiv:2208.06046}, 2022.
\bibitem[Milionis et~al.(2024)Milionis, Moallemi, and
Roughgarden]{milionis2024automated}
Jason Milionis, Ciamac~C Moallemi, and Tim Roughgarden.
\newblock Automated market making and arbitrage profits in the presence of
fees.
\newblock In \emph{International Conference on Financial Cryptography and Data
Security}, pages 159--171. Springer, 2024.
\bibitem[Nadkarni et~al.(2023)Nadkarni, Hu, Rana, Jin, Kulkarni, and
Viswanath]{nadkarni2023zeroswap}
Viraj Nadkarni, Jiachen Hu, Ranvir Rana, Chi Jin, Sanjeev Kulkarni, and Pramod
Viswanath.
\newblock Zeroswap: Data-driven optimal market making in defi.
\newblock \emph{arXiv preprint arXiv:2310.09413}, 2023.
\bibitem[Nadkarni et~al.(2024)Nadkarni, Kulkarni, and
Viswanath]{nadkarni2024adaptive}
Viraj Nadkarni, Sanjeev Kulkarni, and Pramod Viswanath.
\newblock Adaptive curves for optimally efficient market making.
\newblock \emph{arXiv preprint arXiv:2406.13794}, 2024.
\bibitem[Sabate-Vidales and Šiška(2023)]{sabate2023variablefees}
Marc Sabate-Vidales and David Šiška.
\newblock The case for variable fees in constant product markets: An
agent-based simulation.
\newblock In \emph{Financial Cryptography and Data Security. FC 2022
International Workshops}, Lecture Notes in Computer Science, 2023.
\bibitem[Sepp et~al.(2024)Sepp, Lipton, and Lucic]{sepp2024unified}
Artur Sepp, Alex Lipton, and Vladimir Lucic.
\newblock Unified approach for hedging impermanent loss of liquidity provision.
\newblock \emph{Available at SSRN}, 2024.
\bibitem[Spooner et~al.(2018)Spooner, Fearnley, Savani, and
Koukorinis]{spooner2018market}
Thomas Spooner, John Fearnley, Rahul Savani, and Andreas Koukorinis.
\newblock Market making via reinforcement learning.
\newblock In \emph{Proceedings of the 17th International Conference on
Autonomous Agents and MultiAgent Systems}, pages 434--442, 2018.
\end{thebibliography}