This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

An arbitrage driven price dynamics of Automated Market Makers in the presence of fees

Joseph Najnudel School of Mathematics, University of Bristol, BS8 1TW, Bristol, United Kingdom [email protected] Shen-Ning Tung Department of Mathematics, National Tsing Hua University, Hsinchu 300, Taiwan [email protected] Kazutoshi Yamazaki School of Mathematics and Physics, the University of Queensland, Brisbane QLD 4072 Australia [email protected]  and  Ju-Yi Yen Department of Mathematics, University of Cincinnati, Cincinnati, OH 45221, USA [email protected]
Abstract.

We present a model for price dynamics in the Automated Market Makers (AMM) setting. Within this framework, we propose a reference market price following a geometric Brownian motion. The AMM price is constrained by upper and lower bounds, determined by constant multiplications of the reference price. Through the utilization of local times and excursion-theoretic approaches, we derive several analytical results, including its time-changed representation and limiting behavior.

1. Introduction

Automated Market Makers (AMMs) [2, 3] are innovative algorithms that utilize blockchain technology to automate the process of pricing and order matching on decentralized exchanges. Their foundation on blockchain and the employment of smart contracts enable users to buy and sell crypto assets securely, peer-to-peer, without the dependency on intermediaries or custodians.

A critical distinction between AMMs and traditional centralized limit order book models is their mechanism for price determination. While an order book model derives prices through the intentions of individual buyers and sellers, an AMM determines prices based on the available liquidity in its pool. This pool, called the “liquidity pool”, consists of funds deposited by users, known as liquidity providers (LPs). These providers “lock in” varying amounts of two or more tokens into a smart contract, making them available as liquidity for other users’ trades. The barrier to entry for becoming an LP is low; one merely needs a self-custody wallet and a stock of compatible tokens.

A critical cost encountered by LPs in AMMs is adverse selection. This challenge primarily stems from arbitrageurs capitalizing on disparities between the lagging prices within AMMs and the real-time market prices often observed on centralized exchanges. Prominent studies, including [5, 4], delve into this concern by quantifying the losses experienced by LPs due to arbitrage. They employ a metric known as ‘loss-versus-rebalancing’ (LVR) to measure the impact.

This paper presents a model of AMM pricing dynamics based on the following assumptions:

  1. a)

    A reference market with infinite liquidity and no trading costs exists, where the reference market price p=(pt)t0p=(p_{t})_{t\geq 0} follows a geometric Brownian motion.

  2. b)

    The AMM applies a fixed trading fee tier of (1γ)%(1-\gamma)\%, proportional to the trading volume. This fee can range from 1 basis point (bp) to 100 basis points (bps). Notably, Uniswap v3 offers options such as 1 bp, 5 bps, 30 bps, and 100 bps. Our focus is on the worst-case scenario, assuming that all trades within the pool are motivated by arbitrage.

  3. c)

    Arbitrageurs actively monitor the market, initiating trades whenever they identify arbitrage opportunities.

These assumptions integrate elements from two sources: [5], which focuses on continuous arbitrage without fees, and [4], which considers discrete arbitrage with fees. In our model, we address continuous arbitrage while incorporating the impact of fees.

From assumptions a)–c), we deduce the following relationships between the reference market price pp and AMM price p~\tilde{p}:

  • Under Assumptions a) and b), an arbitrage opportunity exists when pt<γp~tp_{t}<\gamma\tilde{p}_{t} or pt>1γp~tp_{t}>\frac{1}{\gamma}\tilde{p}_{t} (see [1, §2.4]).

  • According to Assumption b), the AMM price p~t\tilde{p}_{t} remains stable within the range of γptp~t1γpt\gamma p_{t}\leq\tilde{p}_{t}\leq\frac{1}{\gamma}p_{t}, termed the no-arbitrage interval. This follows immediately from the first assertion.

  • Assumption c) implies that arbitrage actions occur only when pt=γp~tp_{t}=\gamma\tilde{p}_{t} or pt=1γp~tp_{t}=\frac{1}{\gamma}\tilde{p}_{t}, hence p~\tilde{p} changes only at these times.

Refer to caption
Figure 1. Figure 1

In Figure 1, a sample path of the logarithm of p~\tilde{p} is provided, along with the logarithm of pp and the lower and upper bounds log(γp)\log(\gamma p) and log(γ1p)\log(\gamma^{-1}p), respectively. It is pushed upward (resp., downward) at times when it coincides with the lower (resp., upper) bound, and it stays constant at all other times.

Our work is inspired by the unpublished paper by Tassy and White [7]. While the context in the cited work specifically addresses Constant Product Market Makers, our model can be directly applied to all AMMs. The key contribution of this paper is the detailed probabilistic description of the considered AMM price process, underpinned by the local time of the Brownian motion. The logarithm of p~\tilde{p} can be seen as a concatenation of the running infimum and supremum processes of the market price, with appropriate shifting. By leveraging the classical results on the Skorokhod equation of a reflected Brownian motion, expressed in terms of Brownian local times, several analytical results concerning p~\tilde{p} can be derived. Of particular interest is the well-posedness of such a process, its time-changed representation, and its asymptotic behavior. To the best of our knowledge, this paper represents the first study of this stochastic process, motivated by its applications in AMM.

The remainder of the paper is structured as follows: First, we present a precise mathematical construction of our AMM price process. Subsequently, we explore two distinct approaches to analyze the process under consideration in this study.

2. AMM price process

We assume the market price p=(pt)t0p=(p_{t})_{t\geq 0} (normalized in such a way that it is equal to 11 at time 0, and with the appropriate unit of time) is given by a geometric Brownian motion p=expBp=\exp B for a standard Brownian motion B=(Bt)t0B=(B_{t})_{t\geq 0}, and the AMM price p~\tilde{p} is constrained by the inequalities

γpp~γ1p\gamma p\leq\tilde{p}\leq\gamma^{-1}p

where the parameter γ(0,1)\gamma\in(0,1) is related to the fees of the AMM. These inequalities are equivalent to

(2.1) BtcUtBt+cB_{t}-c\leq U_{t}\leq B_{t}+c

where, for t0t\geq 0, UtU_{t} is logp~\log\tilde{p} at time tt, BtB_{t} is logp\log p at time tt, and c:=log(γ1)>0c:=\log(\gamma^{-1})>0; see Figure 1.

The process U=(Ut)t0U=(U_{t})_{t\geq 0} is chosen in such a way that U0=B0=0U_{0}=B_{0}=0, and UU remains constant at any time where this is compatible with the inequalities (2.1). More precisely, it is constant except when it is pushed up by the process (Btc)t0(B_{t}-c)_{t\geq 0} or pushed down by (Bt+c)t0(B_{t}+c)_{t\geq 0} in order to preserve the inequalities (2.1).

The precise description is described as follows, using a sequence of stopping times. If BB reaches cc before c-c (we call this event AA), then we define, by induction:

  • T0T_{0} as the infimum of t0t\geq 0 such that Bt=cB_{t}=c.

  • For all k0k\geq 0, T2k+1T_{2k+1} is the first time tT2kt\geq T_{2k} such that BtsupT2kstBs=2cB_{t}-\sup_{T_{2k}\leq s\leq t}B_{s}=-2c.

  • For all k0k\geq 0, T2k+2T_{2k+2} is the first time tT2k+1t\geq T_{2k+1} such that BtinfT2k+1stBs=2cB_{t}-\inf_{T_{2k+1}\leq s\leq t}B_{s}=2c.

By the well-known property of the reflected Brownian motion, Tm+1TmT_{m+1}-T_{m} is finite, and so is TmT_{m} almost surely (a.s.) for each m0m\geq 0. Then, we define (Ut)t0(U_{t})_{t\geq 0} as follows:

  • Ut=0U_{t}=0 for 0tT00\leq t\leq T_{0}.

  • For all k0k\geq 0 and T2k<tT2k+1T_{2k}<t\leq T_{2k+1}, Ut=supT2kstBscU_{t}=\sup_{T_{2k}\leq s\leq t}B_{s}-c.

  • For all k0k\geq 0 and T2k+1<tT2k+2T_{2k+1}<t\leq T_{2k+2}, Ut=infT2k+1stBs+cU_{t}=\inf_{T_{2k+1}\leq s\leq t}B_{s}+c.

Informally, UU is pushed up by BcB-c in the intervals of time [T2k,T2k+1][T_{2k},T_{2k+1}] and pushed down by B+cB+c in the intervals of time [T2k+1,T2k+2][T_{2k+1},T_{2k+2}]. Similarly, if BB reaches c-c before cc (event AcA^{c}), then we define:

  • T0T_{0} as the infimum of t0t\geq 0 such that Bt=cB_{t}=-c.

  • For all k0k\geq 0, T2k+1T_{2k+1} is the first time tT2kt\geq T_{2k} such that BtinfT2kstBs=2cB_{t}-\inf_{T_{2k}\leq s\leq t}B_{s}=2c.

  • For all k0k\geq 0, T2k+2T_{2k+2} is the first time tT2k+1t\geq T_{2k+1} such that BtsupT2k+1stBs=2cB_{t}-\sup_{T_{2k+1}\leq s\leq t}B_{s}=-2c.

Then,

  • Ut=0U_{t}=0 for 0tT00\leq t\leq T_{0}.

  • For all k0k\geq 0 and T2k<tT2k+1T_{2k}<t\leq T_{2k+1}, Ut=infT2kstBs+cU_{t}=\inf_{T_{2k}\leq s\leq t}B_{s}+c.

  • For all k0k\geq 0 and T2k+1<tT2k+2T_{2k+1}<t\leq T_{2k+2}, Ut=supT2k+1stBscU_{t}=\sup_{T_{2k+1}\leq s\leq t}B_{s}-c.

Proposition 1.

The process U:=(Ut)t0U:=(U_{t})_{t\geq 0} is the only continuous process with finite variation satisfying the following properties

  1. (a)

    U0=0U_{0}=0,

  2. (b)

    BtcUtBt+cB_{t}-c\leq U_{t}\leq B_{t}+c for all t0t\geq 0,

  3. (c)

    UU is nondecreasing in all intervals where it remains strictly smaller than B+cB+c,

  4. (d)

    UU is nonincreasing in all intervals where it remains strictly larger than BcB-c.

Notice that the last two properties imply that UU is constant on intervals where Bc<U<B+cB-c<U<B+c.

Proof.

The process UU is clearly continuous on \(Tm)m0\mathbb{R}\backslash(T_{m})_{m\geq 0}. A careful look at the definition above shows that UU has no discontinuity at times (Tm)m0(T_{m})_{m\geq 0}. Indeed, on AA,

(2.2) limtT2k+1Ut=limtT2k+1(supT2kstBsBt)+limtT2k+1Btc=2c+BT2k+1c=UT2k+1,limtT2k+2Ut=limtT2k+2(infT2k+1stBsBt)+limtT2k+2Bt+c=2c+BT2k+2+c=UT2k+2,\displaystyle\begin{split}\lim_{t\uparrow T_{2k+1}}U_{t}&=\lim_{t\uparrow T_{2k+1}}\left(\sup_{T_{2k}\leq s\leq t}B_{s}-B_{t}\right)+\lim_{t\uparrow T_{2k+1}}B_{t}-c=2c+B_{T_{2k+1}}-c=U_{T_{2k+1}},\\ \lim_{t\uparrow T_{2k+2}}U_{t}&=\lim_{t\uparrow T_{2k+2}}\left(\inf_{T_{2k+1}\leq s\leq t}B_{s}-B_{t}\right)+\lim_{t\uparrow T_{2k+2}}B_{t}+c=-2c+B_{T_{2k+2}}+c=U_{T_{2k+2}},\end{split}

where the second equalities hold because the supremum and infimum are attained at the hitting times T2k+1T_{2k+1} and T2k+2T_{2k+2} of reflected Brownian motion. The continuity holds in the same way on AcA^{c} as well.

Since UU is monotone on each interval of the form [Tm,Tm+1][T_{m},T_{m+1}] for m0m\geq 0, it has finite variation.

We now show properties (a)-(d) focusing on the case AA. The proof for the other case is similar. We have

  • (i)

    UU is equal to zero on [0,T0][0,T_{0}].

  • (ii)

    For all k0k\geq 0, UU is nondecreasing in [T2k,T2k+1][T_{2k},T_{2k+1}] and nonincreasing in [T2k+1,T2k+2][T_{2k+1},T_{2k+2}].

  • (iii)

    For all k0k\geq 0, UU is equal to BcB-c at time T2kT_{2k} and to B+cB+c at time T2k+1T_{2k+1}.

Indeed, (i) holds by the definition of UU and (iii) is clear from the definitions of the stopping times (Tm)m0(T_{m})_{m\geq 0} (see also (2.2)). (ii) holds by the definition of UU in terms of a piecewise supremum and infimum process, which is piecewise monotone. Now (a) holds by (i) and (b) holds by (ii) and (iii).

It remains to show (c) and (d); we only provide proof for (d) as that for (c) is similar. Let J:={t0:Ut>Btc}J:=\{t\geq 0:U_{t}>B_{t}-c\}. By (iii), J[0,)\(T2k)k0J\subset[0,\infty)\backslash(T_{2k})_{k\geq 0}, which is the union of [0,T0)[0,T_{0}) and (T2k,T2k+2),k0(T_{2k},T_{2k+2}),k\geq 0. We know from (i) that UU is constant on [0,T0][0,T_{0}], and from (ii), that UU is nonincreasing in [T2k+1,T2k+2)[T_{2k+1},T_{2k+2}). It is then enough to consider intervals

IJ(k0(T2k,T2k+1])I\subset J\cap\left(\bigcup_{k\geq 0}(T_{2k},T_{2k+1}]\right)

a sub-interval of (T2k,T2k+1]k0(T_{2k},T_{2k+1}]_{k\geq 0} at which Ut>BtcU_{t}>B_{t}-c. For tIt\in I, for some k0k\geq 0, Ut=supT2kstBscU_{t}=\sup_{T_{2k}\leq s\leq t}B_{s}-c and Ut>BtcU_{t}>B_{t}-c, thus, the supremum of BB on [T2k,t][T_{2k},t] is not reached at tt. This implies that supT2kstBs\sup_{T_{2k}\leq s\leq t}B_{s} remains constant for tIt\in I, and thus UU is constant, and then nonincreasing, in II, completing the proof of (d).

It remains to prove that the properties stated in Proposition 1 uniquely determine UU.

Let U1U^{1} and U2U^{2} be two distinct processes satisfying the conditions (a)-(d), and let

(2.3) S:=inf{t0:Ut1Ut2}.\displaystyle S:=\inf\{t\geq 0:U^{1}_{t}\neq U^{2}_{t}\}.

We assume S<S<\infty and derive contradiction.

Necessarily, by (a), (c) and (d), U1=U2=0U^{1}=U^{2}=0 until the first time where BB reaches {c,c}\{-c,c\} which is strictly positive, and thus S>0S>0. By the definition of SS as in (2.3), Ut1=Ut2U^{1}_{t}=U^{2}_{t} for all t[0,S)t\in[0,S), and by the continuity of U1U^{1} and U2U^{2}, we also have US1=US2=:USU^{1}_{S}=U^{2}_{S}=:U_{S}.

Suppose

(2.4) US1BS=US2BS=USBS0.\displaystyle U^{1}_{S}-B_{S}=U^{2}_{S}-B_{S}=U_{S}-B_{S}\geq 0.

By this, continuity of BB and UU and (b), we have Btc<UtjBt+cB_{t}-c<U^{j}_{t}\leq B_{t}+c for j=1,2j=1,2 on the interval [S,S+u][S,S+u] for sufficiently small u>0u>0. For j{1,2}j\in\{1,2\}, let us define the following processes on [S,S+u][S,S+u]:

Atj\displaystyle A_{t}^{j} :=USUtj,\displaystyle:=U_{S}-U^{j}_{t},
Yt\displaystyle Y_{t} :=Bt+cUS,\displaystyle:=B_{t}+c-U_{S},
Ztj\displaystyle Z_{t}^{j} :=Yt+Atj=Bt+cUtj.\displaystyle:=Y_{t}+A_{t}^{j}=B_{t}+c-U^{j}_{t}.

By (b), YS0Y_{S}\geq 0 and Ztj0Z_{t}^{j}\geq 0, and AtjA_{t}^{j} is continuous and vanishes at the starting time SS.

Moreover, the variation of AjA^{j} is carried by the set of times where Zj=0Z^{j}=0. Indeed, AjA^{j} changes only when UjU^{j} changes, or equivalently, only when UjU^{j} is equal to BcB-c or B+cB+c, and then only when Uj=B+cU^{j}=B+c since we know that Uj>BcU^{j}>B-c on the interval [S,S+u][S,S+u]. From this last property and (d), UjU^{j} is nonincreasing in [S,S+u][S,S+u], which implies that AjA^{j} is nondecreasing in this interval. By Skorokhod’s lemma (see Lemma 2.1, Chapter VI of [6]; Lemma 3.1.2, Chapter 3 of [8]), AjA^{j} is uniquely determined by YY on the interval [S,S+u][S,S+u], and thus A1=A2A^{1}=A^{2}, which implies that U1=U2U^{1}=U^{2} on the interval [S,S+u][S,S+u]. This contradicts the fact that SS is the infimum of times where U1U2U^{1}\neq U^{2} as in (2.3). This contradiction shows that S=S=\infty, i.e. one cannot have two distinct processes satisfying the assumptions of Proposition 1. Similar argument holds for the complement case of (2.4).

Now, let W=(Wt)t0W=(W_{t})_{t\geq 0} be another standard Brownian motion, and let F:[c,c]F:\mathbb{R}\to[-c,c] be the triangle wave function with period 4c4c such that

F(x)={2cxfor x[3c,c]xfor x[c,c]2cxfor x[c,3c]F(x)=\left\{\begin{array}[]{ll}\cdots&\cdots\\ -2c-x&\textrm{for }x\in[-3c,-c]\\ x&\textrm{for }x\in[-c,c]\\ 2c-x&\textrm{for }x\in[c,3c]\\ \cdots&\cdots\end{array}\right.

The derivative of FF is 11 in the interval ((4k1)c,(4k+1)c)((4k-1)c,(4k+1)c) and 1-1 in the interval ((4k+1)c,4k+3)c)((4k+1)c,4k+3)c), for all kk\in\mathbb{Z}. The second derivative of FF in the sense of the distribution is

2k(δ(4k1)cδ(4k+1)c)2\sum_{k\in\mathbb{Z}}(\delta_{(4k-1)c}-\delta_{(4k+1)c})

where δx\delta_{x} denotes the Dirac measure at xx. By Itô-Tanaka formula,

F(Wt)=βtVt,t0,F(W_{t})=\beta_{t}-V_{t},\quad t\geq 0,

where (βt)t0(\beta_{t})_{t\geq 0} is a standard Brownian motion,

Vt:=k(Lt(4k+1)cLt(4k1)c),t0,V_{t}:=\sum_{k\in\mathbb{Z}}(L^{(4k+1)c}_{t}-L^{(4k-1)c}_{t}),\quad t\geq 0,

with LtxL^{x}_{t} denoting the local time of WW at time tt and level xx\in\mathbb{R}.

Remark 1.

The processes (βt)t0(\beta_{t})_{t\geq 0} and (Vt)t0(V_{t})_{t\geq 0} are continuous and enjoy the following properties:

  1. (a)

    V0=0V_{0}=0.

  2. (b)

    (Vt)t0(V_{t})_{t\geq 0} has paths of finite variation, since it is the difference of two nondecreasing processes, given by sums of local times at different levels.

  3. (c)

    For all t0t\geq 0, Vtβt=F(Wt)[c,c]V_{t}-\beta_{t}=-F(W_{t})\in[-c,c], so βtcVtβt+c\beta_{t}-c\leq V_{t}\leq\beta_{t}+c.

  4. (d)

    In an interval K:={t:Vt<βt+c}=[0,)\{t:F(Wt)=c}K:=\{t:V_{t}<\beta_{t}+c\}=[0,\infty)\backslash\{t:F(W_{t})=-c\}, WW does not reach levels congruent to c-c modulo 4c4c (these levels corresponding to values of xx\in\mathbb{R} such that F(x)=cF(x)=-c). Local times at levels (4k1)c(4k-1)c for kk\in\mathbb{Z} are constant on KK, which implies, from the definition of VV, that VV is nondecreasing on KK.

  5. (e)

    In an interval K:={t:Vt>βtc}=[0,)\{t:F(Wt)=c}K^{\prime}:=\{t:V_{t}>\beta_{t}-c\}=[0,\infty)\backslash\{t:F(W_{t})=c\}, WW does not reach levels congruent to cc modulo 4c4c. Local times at these levels are constant on KK^{\prime}, which implies that VV is nonincreasing on KK^{\prime}.

From Proposition 1, and the corresponding uniqueness property, the process (Vt)t0(V_{t})_{t\geq 0} can be recovered from (βt)t0(\beta_{t})_{t\geq 0} in the same way as (Ut)t0(U_{t})_{t\geq 0} has been constructed from (Bt)t0(B_{t})_{t\geq 0}. Since (Bt)t0(B_{t})_{t\geq 0} and (βt)t0(\beta_{t})_{t\geq 0} are both Brownian motions, (Bt,Ut)t0(B_{t},U_{t})_{t\geq 0} has the same joint distribution as (βt,Vt)t0(\beta_{t},V_{t})_{t\geq 0}.

We provide two descriptions of the processes discussed here using different time changes, the inverse local times and the hitting times.

Time change with inverse local times

We define the following linear combination of local times:

(t:=kLt(2k+1)c)t0,\left(\mathcal{L}_{t}:=\sum_{k\in\mathbb{Z}}L^{(2k+1)c}_{t}\right)_{t\geq 0},

and its inverse process (σ)0(\sigma_{\ell})_{\ell\geq 0} given by

σ:=inf{t0,t>}.\sigma_{\ell}:=\inf\{t\geq 0,\mathcal{L}_{t}>\ell\}.

Note that t\mathcal{L}_{t}\nearrow\infty as tt\to\infty, thus σ<\sigma_{\ell}<\infty for all 0\ell\geq 0 a.s.

Since \mathcal{L} is an additive functional of the Brownian motion WW (see [6], Chapter X), by the strong Markov property, the time-changed Brownian motion (Wσ)0(W_{\sigma_{\ell}})_{\ell\geq 0} is a continuous-time Markov chain. Moreover, since the variation of (t)t0(\mathcal{L}_{t})_{t\geq 0} is supported on the set of times where WW is in E:={(2k+1)c,k}E:=\{(2k+1)c,k\in\mathbb{Z}\}, we have that the Markov chain (Wσ)0(W_{\sigma_{\ell}})_{\ell\geq 0} takes its value only in EE. This process can only jump between consecutive values in EE. Indeed, if (Wσ)0(W_{\sigma_{\ell}})_{\ell\geq 0} jumps between non-consecutive values xx and yy in EE at some 0\ell\geq 0, then the path (Wt)σtσ(W_{t})_{\sigma_{\ell-}\leq t\leq\sigma_{\ell}} starts at xx, ends at yy, without accumulating local time at levels in EE strictly between xx and yy: this event occurs with probability zero. Similarly, the starting point Wσ0W_{\sigma_{0}} can only be cc or c-c. Thus, the following results are immediate.

Proposition 2.

The process (Wσ)0(W_{\sigma_{\ell}})_{\ell\geq 0} satisfies the following properties:

  1. (a)

    It starts at cc with probability 1/21/2, and at c-c with probability 1/21/2.

  2. (b)

    It jumps by 2c2c or 2c-2c, the rate of all possible jumps being the same, again by symmetry.

Now, let us compute the rate of jumps. By translation invariance and the strong Markov property, the probability of having no jump during an interval of length \ell is equal, for a Brownian motion BB, its local time LBL^{B} at level zero and its inverse local time τ:=inf{t0:LB>}\tau_{\ell}:=\inf\{t\geq 0:L^{B}>\ell\}, 0\ell\geq 0 :

[max{|Bs|,sτ}<2c]\displaystyle\mathbb{P}[\max\{|B_{s}|,s\leq\tau_{\ell}\}<2c]
=([max{Bs,sτ}<2c])2since the negative and positive excursions of B are independent\displaystyle=\left(\mathbb{P}[\max\{B_{s},s\leq\tau_{\ell}\}<2c]\right)^{2}\ \text{since the negative and positive excursions of $B$ are independent}
=([Linf{t0,Bt=2c}B>])2=([BESQ2(2c)>])2by Ray-Knight theorem\displaystyle=\left(\mathbb{P}[L^{B}_{\inf\{t\geq 0,B_{t}=2c\}}>\ell]\right)^{2}=\left(\mathbb{P}[\text{BESQ}_{2}(2c)>\ell]\right)^{2}\ \text{by Ray-Knight theorem}

where BESQ2\text{BESQ}_{2} denotes a squared Bessel process of dimension 22. Hence, for a standard exponential variable 𝐞{\bf e},

[max{|Bs|,sτ}<2c]\displaystyle\mathbb{P}[\max\{|B_{s}|,s\leq\tau_{\ell}\}<2c]
=([2×𝐞×2c>])2\displaystyle=\left(\mathbb{P}[2\times{\bf e}\times 2c>\ell]\right)^{2}
=(e/4c)2=e/2c.\displaystyle=\left(e^{-\ell/4c}\right)^{2}=e^{-\ell/2c}.

Hence, the sum of the rates of jump by 2c2c and 2c-2c is equal to 1/2c1/2c, and then each of the two possible jumps has a rate 1/4c1/4c by symmetry.

We have

Vσ=k(Lσ(4k+1)cLσ(4k1)c)V_{\sigma_{\ell}}=\sum_{k\in\mathbb{Z}}(L_{\sigma_{\ell}}^{(4k+1)c}-L_{\sigma_{\ell}}^{(4k-1)c})

and

σ=k(Lσ(4k+1)c+Lσ(4k1)c).\mathcal{L}_{\sigma_{\ell}}=\sum_{k\in\mathbb{Z}}(L_{\sigma_{\ell}}^{(4k+1)c}+L_{\sigma_{\ell}}^{(4k-1)c}).

In an interval of values of \ell where WσW_{\sigma_{\ell}} remains constant and equal to (4k1)c(4k-1)c for a given kk\in\mathbb{Z}, the variations of VσV_{\sigma_{\ell}} are opposite to the variations of σ=\mathcal{L}_{\sigma_{\ell}}=\ell, since the only local time which varies in the corresponding sums is the local time at level (4k1)c(4k-1)c. Similarly, in an interval of values of \ell where WσW_{\sigma_{\ell}} remains constant and equal to (4k+1)c(4k+1)c for a given kk\in\mathbb{Z}, the variations of VσV_{\sigma_{\ell}} are equal to the variations of \ell. Hence, (Vσ)0(V_{\sigma_{\ell}})_{\ell\geq 0} is the difference of time spent by the Markov process (Wσ)0(W_{\sigma_{\ell}})_{\ell\geq 0} at levels congruent to cc modulo 4c4c, minus the time spent at levels congruent to c-c modulo 4c4c. If we reduce (Wσ)0(W_{\sigma_{\ell}})_{\ell\geq 0} modulo 4c4c and divide it by cc, we get a Markov chain, (Y)0(Y_{\ell})_{\ell\geq 0}, on the two-state space {1,1}\{-1,1\}, with its starting point uniform in this space, and rate of jumps equal to 1/2c1/2c. Then, (Vσ)0(V_{\sigma_{\ell}})_{\ell\geq 0} is the difference of time spent at state 11 by this Markov process, minus the time spent at state 1-1, i.e. the integral of the Markov chain: Vσ=0(1{Ys=1}1{Ys=1})𝑑sV_{\sigma_{\ell}}=\int_{0}^{\ell}(1_{\{Y_{s}=1\}}-1_{\{Y_{s}=-1\}})ds.

Time change with hitting times

Let us define the sequence of stopping times (Hk)k0(H_{k})_{k\geq 0}, as follows:

  • If WW hits cc before c-c (we call this event 𝒜\mathcal{A}), H0=H1H_{0}=H_{1} is the first hitting time of cc, and for k1k\geq 1,

    Hk+1=inf{t>Hk,|WtWHk|2c}.H_{k+1}=\inf\{t>H_{k},|W_{t}-W_{H_{k}}|\geq 2c\}.
  • If WW hits c-c before cc (or 𝒜c\mathcal{A}^{c}), H0H_{0} is the first hitting time of c-c, and for k0k\geq 0,

    Hk+1=inf{t>Hk,|WtWHk|2c}.H_{k+1}=\inf\{t>H_{k},|W_{t}-W_{H_{k}}|\geq 2c\}.

Between H0H_{0} and H1H_{1}, VV varies as the opposite of the local time of WW at c-c; for k1k\geq 1, between H2k1H_{2k-1} and H2kH_{2k}, VV varies as the local time of WW at WH2k1W_{H_{2k-1}}; for k1k\geq 1, between H2kH_{2k} and H2k+1H_{2k+1}, it varies as the opposite of the local time of WW at WH2kW_{H_{2k}}. We deduce, for all m1m\geq 1,

VHm=j=0m1(1)j1(LHj+1WHjLHjWHj),V_{H_{m}}=\sum_{j=0}^{m-1}(-1)^{j-1}\left(L^{W_{H_{j}}}_{H_{j+1}}-L^{W_{H_{j}}}_{H_{j}}\right),

where we recall LtxL^{x}_{t} denoting the local time of WW at time tt and level xx. Notice that the term j=0j=0 vanishes on 𝒜\mathcal{A}, since H0=H1H_{0}=H_{1} in this case.

All these increments of local time, except the first one if H0=H1H_{0}=H_{1} in the event 𝒜\mathcal{A}, are independent and have the distribution of the local time LT2cBL^{B}_{T^{*}_{2c}} of BB at level zero, where BB is a Brownian motion and

T2c=inf{t>0,|Bt|2c}.T^{*}_{2c}=\inf\{t>0,|B_{t}|\geq 2c\}.

Now, we show that using this approach, one can compute this distribution via Ray-Knight Theorem: for 0\ell\geq 0, LT2cB>L^{B}_{T^{*}_{2c}}>\ell if and only if no excursion of BB before the inverse local time τ\tau_{\ell} reaches 2c2c or 2c-2c, which implies

(LT2cB>)=(no excursion of B reaches ±2c before τ)\displaystyle\mathbb{P}(L^{B}_{T^{*}_{2c}}>\ell)=\mathbb{P}(\text{no excursion of $B$ reaches }\pm 2c\text{ before }\tau_{\ell})
=((no excursion of B reaches 2c before τ))2by independence of excursions\displaystyle=\left(\mathbb{P}(\text{no excursion of $B$ reaches }2c\text{ before }\tau_{\ell})\right)^{2}\ \text{by independence of excursions}
=((inf{t0,Bt=2c}>τ))2\displaystyle=\left(\mathbb{P}(\inf\{t\geq 0,B_{t}=2c\}>\tau_{\ell})\right)^{2}
=((Linf{t0,Bt=2c}B>))2\displaystyle=\left(\mathbb{P}(L^{B}_{\inf\{t\geq 0,B_{t}=2c\}}>\ell)\right)^{2}
=((4c𝐞>))2 by Ray-Knight Theorem\displaystyle=\left(\mathbb{P}(4c{\bf e}>\ell)\right)^{2}\text{ by Ray-Knight Theorem }
=e/2c.\displaystyle=e^{-\ell/2c}.

Hence, LT2cBL^{B}_{T^{*}_{2c}} has the same distribution as 2c𝐞2c{\bf e}. We deduce the equality in distribution, for m2m\geq 2,

VHm=2c(X𝐞0+j=1m1(1)j1𝐞j),V_{H_{m}}=2c\left(-X{\bf e}_{0}+\sum_{j=1}^{m-1}(-1)^{j-1}{\bf e}_{j}\right),

where (𝐞j)j0({\bf e}_{j})_{j\geq 0} is a sequence of i.i.d. standard exponential variables, and XX is an independent, Bernoulli random variable with parameter 1/21/2: X=0X=0 if and only if WW hits cc before c-c (i.e. 𝒜\mathcal{A}).

For k1k\geq 1, VH2k+1V_{H_{2k+1}} is a sum of 2cX𝐞0-2cX{\bf e}_{0} and of kk i.i.d. variables with the same distribution as 2c(𝐞1𝐞2)2c({\bf e}_{1}-{\bf e}_{2}). These kk variables are centered, with variance equal to 8c28c^{2}, since 𝐞1{\bf e}_{1} and 𝐞2{\bf e}_{2} are independent with variance 11. We get the following central limit theorem:

Proposition 3.

When kk tends to infinity,

VH2k+1c8k𝒩(0,1)\frac{V_{H_{2k+1}}}{c\sqrt{8k}}\longrightarrow\mathcal{N}(0,1)

in distribution.

The increment H2k+1H1H_{2k+1}-H_{1} is itself the sum of 2k2k i.i.d. random variables with the same distribution as T2cT^{*}_{2c}. By the law of large numbers, we have a.s.

H2k+12kk𝔼[T2c].\frac{H_{2k+1}}{2k}\underset{k\rightarrow\infty}{\longrightarrow}\mathbb{E}[T^{*}_{2c}].

Stopping the martingale (Bt2t)t0(B^{2}_{t}-t)_{t\geq 0} at time T2cT^{*}_{2c}, we deduce for all t0t\geq 0, by optional sampling, that

𝔼[Bmin(t,T2c)2]=𝔼[min(t,T2c)].\mathbb{E}[B^{2}_{\min(t,T^{*}_{2c})}]=\mathbb{E}[\min(t,T^{*}_{2c})].

For tt\rightarrow\infty, Bmin(t,T2c)24c2B^{2}_{\min(t,T^{*}_{2c})}\leq 4c^{2} almost surely converges to 4c24c^{2}, and min(t,T2c)\min(t,T^{*}_{2c}) converges to T2cT^{*}_{2c} from below. Applying dominated convergence to the left-hand side and monotone convergence to the right-hand side, we deduce

4c2=𝔼[T2c],4c^{2}=\mathbb{E}[T^{*}_{2c}],

and then almost surely

(2.5) H2k+12kk4c2.\displaystyle\frac{H_{2k+1}}{2k}\underset{k\rightarrow\infty}{\longrightarrow}4c^{2}.

We get

VH2k+1H2k+1=VH2k+1c8k2c(H2k+12k)1/2\frac{V_{H_{2k+1}}}{\sqrt{H_{2k+1}}}=\frac{V_{H_{2k+1}}}{c\sqrt{8k}}\cdot 2c\left(\frac{H_{2k+1}}{2k}\right)^{-1/2}

where the first factor converges to a standard normal distribution by Proposition 3 and the second factor converges almost surely to 11 by (2.5). By Slutsky’s thorem, we get the following:

Proposition 4.

When kk tends to infinity,

VH2k+1H2k+1𝒩(0,1)\frac{V_{H_{2k+1}}}{\sqrt{H_{2k+1}}}\longrightarrow\mathcal{N}(0,1)

in distribution.

This result can be compared to the central limit theorem

Vttt𝒩(0,1),\frac{V_{t}}{\sqrt{t}}\underset{t\rightarrow\infty}{\longrightarrow}\mathcal{N}(0,1),

which is a direct consequence of the inequality

βtcVtβt+c,\beta_{t}-c\leq V_{t}\leq\beta_{t}+c,

where (βt)t0(\beta_{t})_{t\geq 0} is a Brownian motion.

References

  • [1] G. Angeris and T. Chitra. Improved price oracles: Constant function market makers. AFT ’20, page 80–91, New York, NY, USA, 2020. Association for Computing Machinery.
  • [2] A. Capponi and R. Jia. The Adoption of Blockchain-based Decentralized Exchanges. arXiv e-prints, page arXiv:2103.08842, Mar. 2021.
  • [3] E. Gobet and A. Melachrinos. Decentralized Finance & Blockchain Technology. In SIAM Financial Mathematics and Engineering 2023, Philadelphia, United States, June 2023.
  • [4] J. Milionis, C. C. Moallemi, and T. Roughgarden. Automated Market Making and Arbitrage Profits in the Presence of Fees. arXiv e-prints, page arXiv:2305.14604, May 2023.
  • [5] J. Milionis, C. C. Moallemi, T. Roughgarden, and A. L. Zhang. Automated Market Making and Loss-Versus-Rebalancing. arXiv e-prints, page arXiv:2208.06046, Aug. 2022.
  • [6] D. Revuz and M. Yor. Continuous martingales and Brownian motion, volume 293 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin, third edition, 1999.
  • [7] M. Tassy and D. White. Growth rate of a liquidity provider’s wealth in xy=cxy=c automated market makers, 2020.
  • [8] J.-Y. Yen and M. Yor. Local times and excursion theory for Brownian motion, volume 2088 of Lecture Notes in Mathematics. Springer, Cham, 2013. A tale of Wiener and Itô measures.