Price sensitivity under Uniswap

20 Views Asked by At

Question. Under the uniswap pricing rule, what determines how much the price of an asset increases when you buy that asset?

Note. while this is a mathematical question, answering it requires an understanding of uniswap. For this reason, I apologise if this question is not best suited to this site!

My (not very successful) attempt.

My understanding of uniswap: Suppose there are two assets, yes shares and no shares (as in the linked post). The automated market maker (AMM) holds reserves of both, denoted $y$ and $n$. If I want to buy \$1 of yes shares, I will convert this into 1 yes share and 1 no share, send these shares to the AMM, and receive back more than 1 yes share. The AMM will give me back the number of yes shares that ensures that the product $y n$ remains equal to a constant $k$. In other words, I will give the AMM 1 no share, and the AMM will give me (on net) how ever many yes shares it needs to ensure that $y n$ doesn't change (recalling that $y$ and $n$ are the AMM's reserve of yes and no shares). These rules implicitly define the price of yes shares to be \begin{equation} p = \frac{n}{n + y} \end{equation}

Analysis. Let's consider a small purchase of yes shares (costing $\Delta$). This will increase $n$ by $\Delta$ and decrease $y$ by some amount. What amount? Since $yn$ is held constant, we have that \begin{equation} \frac{d}{dn} y(n) n = y(n) + n y’(n) = 0 \iff y’ = -\frac{y}{n} \end{equation} Following the change in $y$ and $n$, the price changes by \begin{equation} \frac{dp}{dn} = \frac{y(n)-n y'(n)}{(y(n)+n)^2} \end{equation} Plugging in our expression for $y'$, I get the fairly simple expression \begin{equation} \frac{dp}{dn} = \frac{2 y}{(n+y)^2} \end{equation} This seems to be correct. However, it shows that price sensitivity depends on $y$ and $n$, and I struggle to understand what these depend on (presumably, not just the initial constant $k$ but also the history of trades?) Also, in practice, price sensitivity seems to be depend a lot on the price: for example, if the price is near 1, it's hard to increase it. Is there an easy way to see this?