LP Wealth Growth in Uniswap
Preliminaries
- \(X_t, Y_t \) are the quantities of numeraire and asset held by the LPs in the AMM
- The price process of the asset is defined as \(S_0 = 1, S_t = S_{t-1}e^{\delta U_t}\)
- \(\{U_i\}_{i \in \mathbb{N}}\) are i.i.d random variables s.t. \(\mathbb{P}[U_i = 1] = p, \ \mathbb{P}[U_i = -1] = 1-p\)
- The implicit price given by the curve at time \(t\) is given by \(S_t^{\ast} = \frac{X_t}{Y_t}\)
- Percentage fee: \((1 - \gamma)\), we constrain \(\gamma\) to be of the form \(e^{- k_{\gamma} \delta}, k_{\gamma} \in \mathbb{Z}\)
- Trading equation \((X_t + \Delta X_t)^{\gamma} (Y_t - \Delta Y_t) = X_t^{\gamma} Y_t\)
- Note that this is equivalent to \((X_t + \gamma\Delta X_t) (Y_t - \Delta Y_t) = X_t Y_t\)
Markov Chains
- A stochastic model describing a sequence of possible events in which the probability of each event depends only on the current system state.
- A discrete-time Markov chain is a sequence of random variables \(X_1, X_2, X_3, \ldots \) s.t.
Credits: https://setosa.io/ev/markov-chains/
Markov Chains
- State space: \(S = \{A, B\}\), Transition matrix \(P \in \mathbb{R}_{[0, 1]}^{|S| \times |S|}\)
- Stationary distribution: A probability distribution \(\pi = (p_A, p_B)\) that remains unchanged in the Markov chain as time progresses.
- Clearly, \(\pi\) is the left eigenvector of P for the eigenvalue \(\lambda = 1\).
- For the above \(P\), we would have \(\pi = \left(\frac{5}{8}, \frac{3}{8}\right)\)
Implicit Price Manipulation
- Suppose at time \(t\), we have \(S_t = \gamma^{-1}\left(\frac{X_t}{Y_t}\right) e^{\delta} = \gamma S_t^{\ast} e^{\delta}\)
- We wish to bring the implicit price to \(S_{t+1}^{\ast} = \left(\frac{X_t}{Y_t}\right) e^{\delta}\) by trading \(\Delta Y_t\) for \(\Delta X_t\)
- Thus, we have
- Similarly, if \(S_t = \gamma \left(\frac{X_t}{Y_t}\right) e^{-\delta}\) and we pull the implicit price to \(S_{t+1}^{\ast} = \left(\frac{X_t}{Y_t}\right) e^{-\delta}\)
Price as Markov Process
- Recall, we traded \(\Delta Y_t\) for \(\Delta X_t\) when \(S_t = \gamma^{-1} S_t^{\ast} e^{\delta} \implies S_t > \gamma^{-1} S_t^{\ast} \)
- Similarly, we traded \(\Delta X_t\) for \(\Delta Y_t\) when \(S_t = \gamma S_t^{\ast} e^{-\delta} \implies S_t < \gamma S_t^{\ast} \)
Not profitable
Get \(\Delta Y_t\) for \(\Delta X_t\)
Get \(\Delta X_t\) for \(\Delta Y_t\)
\(0\)
\(\delta\)
\(-\delta\)
\(k_{\gamma}\delta\)
\(-k_{\gamma}\delta\)
\(\dots\)
\(\dots\)
\(k_{\gamma}\delta+\delta\)
\(-k_{\gamma}\delta-\delta\)
- Thus, \(M_t = \text{log}\left(\frac{S_t}{S_t^{\ast}}\right)\) is a Markov process with \(S = \{-k_{\gamma}\delta, \dots, -1, 0, 1, \dots, k_{\gamma}\delta\}\).
- A trade occurs when \(M_t\) stays on one of the two end states.
- Let's construct the transition matrix \(P\) and find a stationary distribution \(\pi\)
Price as Markov Process
- Let's construct the transition matrix \(P\) and find a stationary distribution \(\pi\)
\(-k_{\gamma}\delta\)
\(-k_{\gamma}\delta + \delta\)
\(-k_{\gamma}\delta + \delta\)
\(-k_{\gamma}\delta\)
\(\ldots\)
\(k_{\gamma}\delta\)
\(k_{\gamma}\delta\)
\(\ldots\)
\(-k_{\gamma}\delta + 2\delta\)
\(1-p\)
\(p\)
\(0\)
\(1-p\)
\(1-p\)
\(p\)
\(1-p\)
\(p\)
\(p\)
\(0\)
\(0\)
\(p\)
\(0\)
Constant Growth of Invariant
- After each trade the product \(C_t = X_tY_t\) is increased by the same factor \(K_{\gamma}\)
- If \(N_t\) trades occur until time \(t\), the wealth in the AMM at time \(t\) in the absence of fees is
Expected Geometric Return for LPs
- The wealth of LPs at time \(t\) is given as \(W_t = Y_t S_t + X_t\). Expected wealth is
But we have,
\(m\) (constant)
\(\because \ K_{\gamma}^{-\frac{N_t}{2}}(Y_t S_t^{\ast} + X_t) = 2(S_t^{\ast})^{\frac{1}{2}} \)
Asymptotic Geometric Return for LPs
Average number of trades during an interval of time while in the stationary distribution of the Markov chain.
Let \(\pi = \left[\pi(-k_{\gamma}\delta), \dots, \pi(-k_{\gamma}\delta) \right]\)
\(\mathbb{E}(N_t) = nt [(1 - p)\pi(-k_{\gamma}\delta) + p\pi(k_{\gamma}\delta)]\), \(\frac{1}{n}\) is the time interval
Therefore, we finally have a closed form expression for the wealth growth of LPs!
Understanding Volatility Drag
Geometric Brownian Motion
- Stock prices in traditional finance are modeled using GBM
- \(\mu \Delta t\) - the expected returns of the stock
- \(\sigma \sqrt{\Delta t} \varepsilon\) - models the random fluctuations of the stock price
- On solving the above SDE, we note that \(S_t\) is log-normally distributed
Volatility
Random process
Markov process
Drift
Price Process as a GBM
- For the price process \(S_t\) of the asset \(Y_t\), we have
- Mean: \(\mathbb{E}(\text{log}(S_t)) = \delta p + (-\delta)(1 - p) = \delta(2p-1)\)
- Variance: \(\mathbb{V}(\text{log}(S_t)) = \mathbb{E}((\text{log}(S_t))^2) - (\mathbb{E}(\text{log}(S_t)))^2 = \delta^2 - \delta^2(2p-1)^2 = 4\delta^2 p(1-p)\)
- Let us assume that \(\delta\) depends on \(\Delta t = \frac{1}{n}\). For \(S_t\) to be GBM, we must have
- Thus, we get \(\delta_n \approx \frac{\sigma}{\sqrt{n}}\) and \(p_n \approx \frac{1}{2} + \frac{d}{2\sigma \sqrt{n}} \) where \(d = \left(\mu - \frac{\sigma^2}{2} \right)\).
LP Wealth Growth
- For a time interval \(\Delta_t = \frac{1}{n}\) and let \(a = \frac{1-p}{p}\), the growth rate of LP wealth is
- The wealth of LP at time \(t\), given by \(W_t = X_t + S_t Y_t\)
- The factor by which the price \(S_t\) can change
- Fee percentage \(1 - \gamma\), note that \(\gamma \rightarrow 1\)
- Substituting \((p_n, \delta_n)\) from previous slide, we can obtain LP wealth growth for a continuous case.
- Case I: \(p = \frac{1}{2} \implies d = 0\). Substituting \(\delta_n = \frac{\sigma}{\sqrt{n}}\) for \(n \rightarrow \infty\)
Convergence to Continuity
- The LP wealth increases in \(\gamma \in [0,1]\)
- For \(\gamma \rightarrow 1\), the return is
- The un-rebalanced portfolio is zero!
Convergence to Continuity
- Case II: \(p > \frac{1}{2}\). Substituting \(p_n\) and \(\delta_n\)
- The LP wealth decreases in \(\gamma \in [0,1]\) if \(4d > \sigma^2\). \(\gamma \rightarrow 0\) gives best possible growth \(d\).
- The wealth increases in \(\gamma \in [0,1]\) if \(4d < \sigma^2\). \(\gamma \rightarrow 1\) gives best growth \(\frac{d}{2} + \frac{\sigma^2}{8}\).
\(\frac{4d}{\sigma^2} > 1\)
\(\frac{4d}{\sigma^2} < 1\)
Summary
\(p = \frac{1}{2}\)
\(p > \frac{1}{2}\)
HOLDers
LPs
\(0\)
\(\mu - \frac{\sigma^2}{2}\)
\(3\sigma^{2}> 4\mu\)
\(3\sigma^{2} < 4\mu\)
\(\frac{\sigma^2}{8}\)
\(\frac{1}{2}\left(\mu - \frac{\sigma^2}{4}\right)\)
\(3\sigma^{2}= 4\mu\)
\(\mu - \frac{\sigma^2}{2}\)
\(\mu - \frac{\sigma^2}{2}\)
- Therefore, LPs always do either equal or better than HODLers!
- For LPs to always do better, we must that: \(3\sigma^2 > 4\mu\) and \(\mu > \frac{\sigma^2}{4}\). Thus,
Volatility Drag
- When \(p > 0.5\), the expected growth rate of the price of the asset is
- Here the term \(-\frac{\sigma^2}{2}\) is known as the volatility drag.
- In the same case of \(p > 0.5\), if we have \(\frac{2\sqrt{\mu}}{\sqrt{3}} < \sigma < 2\sqrt{\mu},\) we have
Within that range, being a Uniswap LP will eventually make you rich, and in fact richer than you could become by holding any unrebalanced portfolio consisting of cash and the asset.
- LP Wealth paper Authors
Uniswap LP Growth and Volatility Drag
By Suyash Bagad
Uniswap LP Growth and Volatility Drag
Some deep diving about the volatility drag in prices in Uniswap.
- 69