Uniswap Insights 5 of 6 — LP Hedging 2 - The Greeks

🦄 ck.eth 🦄
7 min readJul 14, 2023
Uniswap Non-linearity of Yield-Convexity-Risk/Theta-Gamma-Volatility. https://www.math3d.org/WvsEXvTWD

TLDR:

  • Solutions for Greeks of Uniswap v2 and v3 are shown.
  • Solutions for hedging Asian, European, Bachelier options with Uniswap v3 available in an interactive desmos file.
  • LP hedging accumulation strategies with desmos shown.
  • History leading to LVR and alternative derivations explained.

Greeks — Uniswap v2

The Greeks tell one the sensitivity of an LP position’s value relative to another variable such as time, volatility, and interest rates. We covered delta and gamma in part 4. LP Greeks can be useful because you can match them to an option’s Greek to cancel out price divergences such as with delta and gamma as price moves, volatility changes, or time flows. The value of the Greek tells one the impact on the price of the LP position.

Interactive desmos file for v2: https://www.desmos.com/calculator/inwy6djhhm

It’s important to note that the Greeks differ for Uniswap from an option in the sense that they run away towards infinities as the price of the LP position falls visualized in dashed lines at x=0 above. In order to cut these tails we can use concentrated ranges with v3.

Greeks — Concentrated LP Range v3

Desmos file for univ3 Greeks: https://www.desmos.com/calculator/l8sqzlwkf5

The narrower we concentrate the range p_a/lower p_b/upper, the more sensitive our delta Δ and gamma Γ become, note that gamma is negative, meaning we have a concave black shape for our LP payoff. Our theta/Θ/expected fees also increases while interest rates sensitivity ρ is largely unaffected.

But while a single LP position’s payoff diagram may match an option, the other Greeks might not.

LP Greeks don’t look like regular options: https://www.desmos.com/calculator/nyuw7sybin

Here we have a put option with a single LP range that we matched, but the other Greeks aren’t fluid.

The trick one can use is instead of trying to find a hedge to an LP position, one first starts with a given option in the market that has a strike price (K) and its implied volatility (σ_iv) and time to expiry (t). Only then one constructs a series of LP positions that follow a lognormal distribution originally inspired by Dan Robinson’s normal distribution liquidity fingerprint for uniswap v3[1]. The granularity of the LP positions matching a lognormal distribution in the price space allows for the smoothing of the Greeks:

Notice how the LP Greeks start to resemble an option. As the price detracts, the multitude of the LP positions allows one to switch to the next range. Going beyond 7 LP positions has diminishing gains.

Strangely enough, it’s very difficult to 100% cancel the payoff with a lognormal distribution (correct me if I’m wrong), but if the lognormal liquidity fingerprint approaches a Dirac delta function, the difference (visualized in red above) does disappear. For example, an Asian option happens to also follow a lognormal distribution, but counter-intuitively, it is more sensitive to price where Δ and Γ are sharper due to the volatility of an Asian option being 1/sqrt(3) of a regular option and so has less of an impact on the payoff divergence:

Using a European put to hedge a portfolio of LP positions versus using its equivalent Asian put to hedge.

One LP position can approximately match a European option yet leaves out the smoothed Greeks, but a series of LP positions smooths the Greeks yet leaves a hill. A tradeoff that may be improved with a potentially adjusted/skewed liquidity fingerprint in the future.

LP Hedging Strategies

On the other hand if one is not interested in trying to cancel the concave LP payoff, then the desmos file: https://www.desmos.com/calculator/khvbqzncg9 can also be used to see how various payoffs can work. Below is an example of the series of payoffs that can arise.

Transitions of Vertical Bearish Spread >> Bearish Put >> Long Straddle of sorts. Note that the put option will steepen over time due to theta decay while the LP position can grow due to fees.

One interesting quirk of v3 I noticed is if one concentrates liquidity exactly 75% or more below the current price for p_a and sets p_b to the current price, then the value of the X asset peaks at 25% which might have some strategic value for someone trying to accumulate.

Helpful v3 tool by Dan Robinson: https://twitter.com/danrobinson/status/1430678225945042945

One can combine such a single range with a market put to get the following payoff https://www.desmos.com/calculator/a8y3pl3t03:

The put option parameters can be extracted from the market. As time goes on, the option will decay in value if the price does not decline rapidly enough.

Such a strategy would be inherently aiming for a price decrease to accumulate for the future while earning fees. Note that without the option it becomes a riskier approach in which case it can make sense only if the executor has incredibly strong conviction about a rebound. None of this is financial advice though, i am just doing math.

History deep dive leading to LVR:

In part 4 I pointed out the relationship between concavity and yield for an LP position and want to expand on this from the lens of history and LP divergence loss/loss-versus-rebalancing(LVR).

Taleb noted that the first person to write down the non-linear relationship of risk and return was Louis Bachelier [1] in “Theory de la Speculation” [2] in 1900. Bachelier attributes its similarity to Fourier’s heat equation [Figure 1]. Coincidentally, Lambert uses Feynman-Kac’s approach used to solve heat equations in solving for the value of a concentrated LP position [3].

Figure 1. Page 46 of ‘Theory de la Speculation’. A constant that is squared, a dt, and a dx²!

Bachelier’s equation is just a slightly rearranged version of the Black-Scholes-Merton equation with the drift rate set to zero [4].

The change in the price of an asset over time is related to volatility and curvature.

The LHS is theta -Θ and the RHS curvature gamma Γ, which just happens to be concave due to the negative sign. Then Angeris, Evans, and Chitra [5] point out that an AMM’s LP position must have a concave payoff function. Everything from Curve’s CSMM [6] to the entire space of symmetric liquidity curves of Forgy & Lau [7] should be concave for LPs.

Since we have a concave equality in our RHS equation, it means an LP position, just by itself, must command a premium. If it doesn’t, the below equality is violated and can be taken advantage of by simply borrowing such an LP position and longing a portion of the underlying to construct a perpetual long straddle and waiting for an increase in volatility.

Bachelier Equivalence / BSM Dynamic Hedging — says that concavity commands a yield and convexity commands a cost. Expressed mathematically:

Yield ∝ Risk times Concavity (negative convexity). BK derivation in Appendix.

While solving for the theta Greek of Uniswap [8], I noticed that by plugging in the second derivative of the LP position into the above formula one gets the same equation as LVR [9].

Eq. 16. If gamma is -L/2sqrt(x)³ in the Bachelier equivalence, one gets the same result.
LVR paper Figure 2 derives the vol²/8 LVR relationship from the nature of the xy=k invariant figure above which gives birth to a concave LP payoff.

This is not a coincidence and different people from different angles have reached this same conclusion. Lambert actually carries the drift rate [10] while others leave it out [11].

Note that all these models assume a Gaussian stemming originally from the Brownian Motion (BM) inside of Ito’s lemma [12] which gives us the − σ²/2 term shown also in Angeris, Evans, and Chitra’s final equation [5], but we know that digital assets, including stablecoins, exhibit Hurst exponents >0.5 implying Fractal BM behavior [13] and Sepp & Rakhmonov also point to the stochastic volatility approach being a fit to the skewed implied volatility structure of digital assets [14].

Examining the tail’s end of returns of the log-log histogram of the longest surviving digital asset we also see a non-Gaussian tail.

Kernel density smoothing of BTC-USD histogram returns in blue.

Given the shape of the histogram we will have to dive deep below the Uniswap v2 uniform full range distribution and past the Gaussian cliff to get to the bottom of an LVR theta fit appropriate for an LP.

Log-log histogram of 50+ distributions. The exponential and power laws await us in the abyss.
  • See you in part 6 continued here!
  • If you learned something, feel free to give this hedgehog a follow on twitter: @CK_2049

Disclaimer: This research is for general information purposes only. The Uniswap Foundation was kind enough to sponsor the publication of this research. It does not constitute investment advice or a recommendation or solicitation to buy or sell any investment and should not be used in the evaluation of the merits of making any investment decision. It should not be relied upon for accounting, legal or tax advice or investment recommendations. This post reflects the current opinions of the author. The opinions reflected herein are subject to change without being updated.

Appendix

Bachelier equivalence derivation.

LVR from Bachelier equivalence of Uniswap LP position.

--

--