Liquidity provider positions in Uni v3/v4 only collect fees when the price is in range.
How long does the price remain within a given range (in expectation)?
1/7 A short 🧵
TLDR; E[time-in-range] = halfWidth^2/σ^2, & we can use this to find the realized volatility of a pool!

2/7 We will consider positions centered at the current price at time T=0 and monitor how long it takes the price to move a certain number of ticks up or down.
In the example below, a position is minted on Jan. 1st 2022 and the price crossed ±2%, ±3%, ±5%, and ±10% in <6 days

4/7 While crossing times do seem to converge for short exit times (see 10, 20, 30bps), it turns out that the average waiting time scales as the square of the range h: waitTime ~ h^2.
I'm deriving why this relationship exists based on work by Andersen 2008 and @SinclairEuan 2014

5/7 This h^2 law is a consequence of the price *ticks* following a Brownian Motion with normally distributed steps: in a BM, the average displacement after a time t scales as σ*t^2, where σ=volatility.
This relationship can be inverted to estimate σ from average crossing times!

7/7 Key insights:
- The average time spent within a range ±h scales as (h/σ)^2
- E[first exit time] can be used to develop resilient and efficient volatility estimators
- The volatility calculation in the ETH-USDC pool can highlight volatile macro events
2.25K
11
The content on this page is provided by third parties. Unless otherwise stated, OKX is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.