This article in the series discusses how Uniswap position are similar/dissimilar to trading options.
What is an option?
According to Investopedia, “options are financial derivatives that give buyers the right, but not the obligation, to buy or sell an underlying asset at an agreed-upon price and date.”
Options have a parameters such as strike price, direction (put or call), and expiry date. The asset price & strike price determines the moneyness of options:
- In the money (ITM): for put options, this means that the asset price falls below the option’s strike price. For call options, this means that the asset’s price is above the strike price.
- Out of the money (OTM) — the opposite.
- At the money (ATM) — strike price matches the asset price.
ITM at expiry does not necessarily mean that the option buyer is in profit: option writers aim to sell options for a profit, consequently buying an option requires paying a fixed upfront cost, called the premium.
Accurately determining the fair value of premia and the resale prices of options is some galaxy brain stuff. At least this was the case before the Black-Scholes model was developed. Afterwards everyone could just take the B-S formula, put some numbers in it, and get the fair-market price out. As a result, the TradFi option trading activity exploded.
There are many criticisms of the Black-Scholes model as vulnerable to tail risks and Black Swan events. However, it gives traders clear, unambiguous numbers that are accurate enough in normal, everyday conditions, and match our intuitions — for instance, that the premia should be higher for more volatile assets. Moreover, the model gives not just the fair-market price of an option, but also its Greeks, which are important for hedging and risk management.
The Black-Scholes model allows to go the other direction, too. This is the so-called implied volatility: if you see the price of an option, it’s direction and expiry time, you can compute at what volatility that would be a fair price. If the implied volatility is less than the real volatility of the asset, the option is underpriced by the market; if the opposite is true, it’s overpriced and probably a good sell.
Options allow to easily take extremely varied and complex bets. For instance, let’s say you don’t know whether the market will go up or down, but believe that there will be some turbulence. You can buy both put and call options, and benefit from the volatility itself increasing. Depending on the strike price put+call gives either a straddle or a strangle: see below.
Uniswap positions as options
LPs are most profitable in crab markets, when price is moving sideways, and most risky when large price moves happen. Buying a straddle or a strangle is therefore a way how to insure an LP position — it’s a bet on volatility, with delta-neutral outlook (no need to guess which direction the price will move).
- If the price moves in range, the LP position is likely in profit;
- If there is a large price move up or down, then the straddle or strange option position is likely to be in profit.
But there’s a deeper connection between LP positions and options. A concentrated liquidity (CL) position’s value function has the same shape as covered call option strategy value, which has the same shape as short put option strategy. Creating Uniswap CL positions <=> writing covered calls <=> writing put options. (“<=>” here means similarity, not equality!)
However, not all aspects are similar: see below.
Several notes on the Greeks
The figure above shows the values LP position Greeks obtained via straightforward math: by taking the LP position’s value function and calculating it’s partial derivatives with respect to price, time, volatility, and risk-free rate.
To remind, the value functions are:
Under the straightforward interpretation, the time, volatility and risk-free rate partial derivatives are zero, since these variables are not part of the pool’s value function. For instance, as V(LP) does not depend on the a σ variable, its partial derivative ∂V/∂σ is zero.
However, this interpretation does not accurately model the future value of LP’s position. A more accurate model for volatile pairs is:
V(LP) = V_initial(LP) — LVR(LP, σ, T) + fees(LP, σ, T),
- LVR(LP, σ, T) is the loss versus rebalancing or, in other words, the expected value of the divergence loss, and
- fees(LP, σ, T) is the expected fee income of the position by the time T.
Both fee income and LVR depends on the position’s concentration level, the volatility of the pair, and the passage of time. For example, for a full-range position the instantaneous LVR is equal to σ² / 8. The expected value of LVR over time T is equal to T · σ² / 8. Alternatively, the volatility σ here can be thought of as a function of time, σ(T) = σ_unit · sqrt(T), then σ(T)² / 8 directly describes the component LVR(LP, σ, T) for full-range positions.
Side note: replacing LVR(LP, σ, T) in the model above with a divergence loss (DL) term actually may give a more universal model that works also for stable pairs. For volatile pairs LVR = EV(DL), but for stable pairs EV(DL) is close to zero, and LVR is nonzero. The LVR for stable pairs reflect the opportunity costs of the LP, not the actual PnL of the LP position.
Some argue that the volatility (vega) risk is therefore proportional to ∂LVR/∂σ + ∂fees/∂σ. The LVR metric grows with σ²: a more volatile asset pair has a higher expected LVR. The fee income also tends to be higher for more volatile pairs, but the exact amount of course depends on the market and cannot be easily quantified with a formula.
On the other hand, when the implied volatility rises, the LP is able to withdraw their liquidity at par without incurring any loss (unlike an option seller in the same situation!) So the vega of the LP still effectively is zero, even when LVR is taken into account.
The theta (time) risk of LP position in general is zero, unless the position is locked for a fixed duration in some staking protocol. Check this article for more analysis.
Examples: Uniswap v3 positions as options
OTM short put / covered call
The current price of ETH is $2200. A user bets on ETH staying in the range or going up and places $2000 USDC in the USDC/ETH pool, at a highly concentrated liquidity position with strike price K=$2000, where K=√(PriceUpper⋅PriceLower).
The image below shows some example payoffs. When price decreases to ~$2000, swap fees are collected.
OTM short call / covered put
Simulating a short call requires one more step. The user starts by depositing $3000 in a lending protocol, which they use to borrow 1 ETH for the LP position. The strike price once again is K=$2000. Now the main risk is price going up, since the borrowed ETH will be sold at the strike price. This strategy is suitable for hedging long ETH exposure elsewhere.
Other types of positions
- Single-sided LP using owned ETH to is similar to an ITM short put.
- Single-sided LP using borrowed USDC is similar to an ITM short call.
- Using normal, double sided LP positions is similar to a combined portfolio of one ATM/near OTM put & one call, since the double sided position can be thought of as two single-sided ones.
- A wide range position can be conceptualized as the sum of multiple options with different strike prices.
Example: hedging Uniswap positions with options
The idea is to choose and buy a portfolio of options that summed together give the inverse payoff to the LP position. Once you understand the analogy between LP positions and options, it’s possible to use it to select an appropriate option portfolio.
A tricky aspect is that traditional options expire; you’ll need to re-buy them periodically, even if the asset price does not change.
Existing work that you can use a starting point:
- A blog post from Panoptic research covers the options strategy at a high level and discusses the pros and cons of hedging via options vs. hedging via perpetuals.
- The paper “Delta Hedging Liquidity Positions on Automated Market Makers” discusses the same idea in a more formal way and provides an algorithm (code here) for finding a set of options to hedge a given position.
- Mathematics of Constant Product Automated Market Makers by Dr. B. Pennington includes formulas for full-range position replicating option portfolio, among other things.
- CK.eth has a series of articles on “Uniswap Insights” with math, visualizations, and and links to Desmos calculators. This article is the one most related to options.
The upcoming release of Uniswap v4 is going to open up new possibilities for hedging — it can be automated via hooks! Some developers have already developed a proof-of-concept demo of automated hedging for v4 LP positions, via buying options on Lyra: check a tweet here, and the code here.
Pricing Uniswap positions as options
One way how to detect profitable pools is to assume the options analogy, look for pool’s implied volatility metric, and compare it with the real volatility of the asset (calculated from the asset’s price history). Guillaume Lambert has generalized the notion of implied volatility to LP positions.
Computing the implied volatility of a Uniswap position
Prof. Lambert provides the following formula in his blog post “On-chain Volatility and Uniswap v3”:
To get yearly volatility, one must further multiply by sqrt(365).
Based on the formula I developed a Python script to check mainnet pools — check that code first before asking further question about the formula! Here are the results for the USDC/ETH 0.3% pool:
974288 USDC locked in the current tick range
Jul 06, 2023: USDC volume=14508783 IV=44.24%
Jul 07, 2023: USDC volume=7171080 IV=31.10%
Jul 08, 2023: USDC volume=3406566 IV=21.43%
Jul 09, 2023: USDC volume=3173268 IV=20.69%
Jul 10, 2023: USDC volume=8702852 IV=34.26%
The implied volatility is significantly below both the historical volatility (~70% over the last year from July 1, 2022) of ETH and the implied volatility seen on real options markets. Assuming that the Uniswap pool implied volatility interpretation is correct, this suggests that the Uniswap v3 LPs are underpricing the risks.
This article unlike my other article isn’t going to have any experimental results related to hedging. Why?
- The amount of possible options strategies is vast;
- The offer of options in DeFi is, on the contrary, quite limited and in early stages;
- Moreover, new protocols & products are coming out soon that may significantly change the situation.
Among the new protocols:
- Panoptic aims to be the option protocol in DeFi, and is launching in 2023. As Uniswap OGs, they have pioneered the “Uni positions as options” concept.
- Smilee Finance models LPs as options sellers and transforms their position to a portfolio of options, which can then be sold for so-called impermanent gain. Unlike Panoptic, it’s a synthetic product, without real underlying Uniswap positions, and unlike other protocols in the list they enable non-perpetual (expiring) options. They’re rolling out a concentrated liquidity (CL) impermanent gain product soon.
- Gamma Swap is a protocol that offers so-called “GammaSwap Perpetuals”, which despite their name share many characteristics with perpetual options.
- Numoen is a new protocol that aims to apply the structure of perpetual futures to options to get perpetual options.
- Infinity Pools is a new perp protocol (for lack of a better term), but due to the characteristics of their perps they share a lot of similarities with options: for example, they product is going to have no liquidations and up to 1000x leverage, and they’re utilizing CL positions under the hood and sharing the payoff between LPs and traders in ways similar to option sellers and buyers.
Uniswap LPs will be able to:
- Supply liquidity to these protocols, for an additional income. This is going to give a similar payoff shape, but introduce additional income, in form of fees paid out by the protocol.
- Hedge their LP positions by using these protocols to take opposite side bets, e.g. bets with positive gamma payoffs.
- What are Options? Types, Spreads, Example and Risk Metrics, Investopedia.
- Calculating Implied Volatility from Uniswap V2 & V3. Daniel Alcarraz, GammaSwap Labs.
- The Trojan Horse of DeFi (Part 2): Uniswap as options market. GammaSwap Labs, 2023.
- On-chain Volatility and Uniswap v3. Guillaume Lambert, Panoptic.
- Gamma transforms: How to hedge Squeeth using Uni V3. Guillaume Lambert, Panoptic.
- Panoptic Options Trading Strategies Series: Part I — The Basics, Jesper Kristensen, Panoptic.
- Yewbow Interface. Shows implied volatility of Uniswap v3 pools.
- How to hedge ANYTHING (including Uni v3 LP positions) with options. Brandon Ly, Panopotic, 2023.
- There’s an analogy between Uniswap positions and options. Uniswap liquidity providers (LPs) have similar payoffs to option writers: LPing with their own assets is similar to writing puts, while LPing with borrowed assets is similar to writing calls.
- Unlike option sellers who receive their premiums upfront, Uniswap LPs only receive their premiums if the option ever goes in the money (ITM).
- Exciting new developments are occurring right now, related to the emergence of DeFi protocols that offer perpetual options and related financial instruments. These new instruments are going to open up new opportunities for LPs, including both additional income and additional hedging possibilities.
Disclaimer. This post is for general information purposes only. 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 article was written in the author’s free time and is not related to his professional activity or his employer. This post reflects the current opinions of the author, which are subject to change without being updated.