Pricing uniswap v3 with stochastic process, Part3

zelos
zelos-research
Published in
4 min readJun 5, 2024

After the mathematical derivations in the previous two posts, we obtained the desired τ distribution. In this section, we will present a simplified pricing formula.

notion and assumptions

price:

stop time:

V3

We also require liquidity providers to exit liquidity provision when the price reaches the boundary. Additionally, we assume that fees can only be extracted when exiting liquidity. We define the stopping time as τ, with its probability density function as:

We will now summarize the assumptions we have made:

  1. The price follows a geometric Brownian motion with μ=0.
  2. Liquidity provision can only be exited when the price reaches the market boundary.
  3. The obtained fees cannot be reinvested.

Now, let’s proceed with the pricing of liquidity.

Pricing

handle LP part first:

In the first article, we discussed the probabilities of P(S(τ)=L) and P(S(τ)=H) being −a/ba​ andb/b-a, respectively. Adding the fee component, we substitute and obtain:

Model1

Here we insert a discussion of an extremely simplified example with the following additional assumptions.

  1. The geometric mean of the market range is S0, HL=1.
  2. The interest rate r is 0.

For the LP term, e^(rτ) = 1, the integral term for LP is

Substituting L=H^−1

Combining these, we have:

Our rudimentary pricing model is now complete, and we can already identify some issues from the first term representing the LP. As H→∞, the first term does not converge. Additionally, the second term representing the fee is always greater than 0. This means that under this model assumption, the optimal market range is (0,∞). This can be easily explained by the fact that when r=0, $1 is equivalent to any distance away from $1. In essence, we are taking a weighted average between 0 and ∞.

model2

After the derivation above, we have gained some understanding of how to calculate. Now, let’s introduce some new assumptions: the geometric mean of the market range is S0​, HL=1. There is a risk-free interest rate r≠0.

Similarly

Let’s start with the simple fee part:

For the LP part, we substitute and get

Adding them together, we have the pricing formula for LP:

This formula may not look friendly, but it is continuously differentiable. We will discuss Greeks and how to select the optimal market range in the next article. As a conclusion, we use Mathematica to plot the relationship between H and V.

We can see that in some cases, there is an optimal “H”, while in others there is not. We will discuss the specific situations and how to use the pricing formula in the next post.

--

--