Pricing

Pricing Model & Implied Volatility

This section presents the mathematical framework for pricing Timelock positions by equating option premia with liquidity provider fee collection, ultimately deriving implied volatility from Uniswap market data.

Pricing Mechanisms Overview

Pricing can be implemented using multiple approaches:

  1. Standard Black Scholes Model Option Price - taking IV off-chain and price on-chain

  2. Standard Black Scholes Model Option Price - taking IV and price both derived from the pool

  3. Multiple of Swap fees forward calculated - not timed

  4. Borrowing Rate forward calculated - not timed

Premium Pricing

This is a new derivative which does not have a predefined pricing mechanism. However, it bears close resemblance to an ATM call long or a future long+ put position.

Standard Black-Scholes-Merton Model

The standard pricing mechanism for a call option is given by the Black-Scholes-Merton model as:

C=N(d1)St−N(d2)Ke−rtC=N(d1​)St​−N(d2​)Ke−rt

Where:

d1=ln⁡(StK)+(r+σ22)tσtandd2=d1−σtd1​=σt​ln(KSt​​)+(r+2σ2​)t​andd2​=d1​−σt​

Parameters:

  • CC = call option price

  • NN = CDF of the normal distribution

  • StSt​ = spot price of an asset

  • KK = strike price

  • rr = risk-free interest rate

  • tt = time to maturity

  • σσ = volatility of the asset

In an ATM call option, K=StK=St​, so d1d1​ and d2d2​ become:

d1=(r+σ22)tσtd1​=σt​(r+2σ2​)t​d2=d1−σt=(r+σ22)tσt−σt=rtσtd2​=d1​−σt​=σt​(r+2σ2​)t​−σt​=σt​rt​

The pricing formula becomes:

C(St,t)=St⋅N((r+σ22)tσt)−St⋅e−rt⋅N(−rtσt)C(St​,t)=St​⋅N​σt​(r+2σ2​)t​​−St​⋅e−rt⋅N(σt​−rt​)

For crypto assets, we use risk-free rate r=0r=0, so the formula simplifies to:

For d1d1​ and d2d2​ with r=0r=0:

d1=(0+σ22)tσt=σt2d1​=σt​(0+2σ2​)t​=2σt​​d2=d1−σt=σt2−σt=−σt2d2​=d1​−σt​=2σt​​−σt​=−2σt​​

Final simplified formula:

C(St,t)=St⋅(N(σt2)−N(−σt2)−1)C(St​,t)=St​⋅(N(2σt​​)−N(2−σt​​)−1)

This simplified formula eliminates the complexity of interest rate calculations while maintaining the core pricing mechanics for decentralized finance applications.

We introduce optimization that accounts for pool utilization to accurately reflect market dynamics. This approach is inspired by peer-to-pool mechanism protocols, most notably AAVE.

U=Assets utilized (locked())Total Assets (locked() + free())U=Total Assets (locked() + free())Assets utilized (locked())​

Where:

  • UU = utilization rate of the pool

  • UoptimalUoptimal​ = variable rate parameter (optimal utilization threshold)

If U<UoptimalU<Uoptimal​:

premium=C(St,t)premium=C(St​,t)

If U>UoptimalU>Uoptimal​:

premium=C(St,t)+(U−Uoptimal)⋅C(St,t)1−Upremium=C(St​,t)+1−U(U−Uoptimal​)⋅C(St​,t)​

When pool utilization exceeds optimal levels, premiums increase exponentially to incentivize additional liquidity provision and manage risk exposure.

Calculate the daily return of an asset where PtPt​ is the close price at day tt:

Daily Return=ln⁡(PtPt−1)Daily Return=ln(Pt−1​Pt​​)

Mean of Daily Returns:

μ=1N∑t=1NDaily Returntμ=N1​t=1∑N​Daily Returnt​

Variance of Daily Returns:

Variance=1N−1∑t=1N(Daily Returnt−μ)2Variance=N−11​t=1∑N​(Daily Returnt​−μ)2

Standard Deviation (Sigma):

σ=Varianceσ=Variance​

Annualized Volatility (Implied Volatility)=σdaily returns×365Annualized Volatility (Implied Volatility)=σdaily returns​×365​

This calculation converts daily volatility to annualized terms, which is the standard format for option pricing models.

In order to calculate the fees collected from a Uniswap LP position, we consider the total liquidity amount deployed at a given tick.

We have the following:

  • Total fees accumulated:

    feeRate×(volume per day)feeRate×(volume per day)

    Where feeRate is the percentage fee that spot traders on Uniswap pay when they execute a trade.

  • Fraction of those fees that goes to that LP position of size positionSize:

    positionSizetickLiquiditytickLiquiditypositionSize​

    Here, the position size corresponds to the amount of liquidity a liquidity provider (LP) allocates within a specific price range in the liquidity pool.

  • Finally, we get:

    Total fees at a given tick=feeRate×(volume per day)×positionSizetickLiquidityTotal fees at a given tick=tickLiquidityfeeRate×(volume per day)×positionSize​

The cumulative premia is the integral of theta over the asset's price path S(t)S(t):

Cumulative Premia=∫S(t)θ(St,K,σ)dt=∫+∞0θ(SΔt,K,σ)ΔtdSΔtCumulative Premia=∫S(t)θ(St​,K,σ)dt=∫+∞0​θ(SΔt​,K,σ)ΔtdSΔt​

Where theta (θθ) for an option (assuming a zero interest rate and no dividends) is given by:

θ=−dV(St,t)dt=Sσ8πtexp⁡(−[ln⁡(StK)+σ2t2]22σ2t)θ=−dtdV(St​,t)​=8πt​Sσ​exp(−2σ2t[ln(KSt​​)+2σ2t​]2​)

Note that tt is the time to expiry in traditional finance, whereas we replace it with ΔtΔt in DeFi, representing the time spent in range by an LP position.

The Dirac function, denoted by δ(x)δ(x), is a "pseudo-function" that has the following characteristics:

δ(x)={+∞if x=00otherwiseδ(x)={+∞0​if x=0otherwise​

and

∫Rδ(x)dx=1∫R​δ(x)dx=1

The graph of δ(x)δ(x) can therefore be represented by the entire x-axis and the positive half of the y-axis. With the "Dirac" δ(x)δ(x), we aim to represent an impulse or (infinitely short) point event with finite, non-zero "energy".

Graph of the Dirac distribution δ(x)

Figure 1: Graph of the Dirac distribution δ(x)δ(x).

Important Definition/Theorem (See Appendix 3.2): The Dirac function can also be perceived as the limit, as aa tends to 0, of the following centered Gaussian function:

1ae−(x/a)2.a1​e−(x/a)2.

Approximation of the Dirac delta function using different zero-centered normal distributions

Figure 2: Approximation of the Dirac delta function using different zero-centered normal distributions.

Example: One function commonly used to represent a Dirac delta function is δp(x)=p⋅rect(px)δp​(x)=p⋅rect(px), where:

rect(px)={1for ∣x∣≤12p0otherwiserect(px)={10​for ∣x∣≤2p1​otherwise​

Example of Dirac delta function: Graph of the function δ_p(x) = p rect(px)

Figure 3: Example of Dirac delta function: Graph of the function δp(x)=prect(px)δp​(x)=prect(px)

We aim to approximate the theta function of options by using an approximation of the Dirac function. The Dirac function increasingly resembles the theta function for options as the days to expiration (DTE) approaches 0. The figure below shows the theta of an option as a function of spot price movements for various DTEs: 7 DTE, 1 DTE, and 0.1 DTE.

Graph illustrating the variations in theta across different days until expiration

Figure 4: Graph illustrating the variations in theta across different days until expiration.

Important Remark: The red curve is the theta of a 0.1 DTE traditional option. As ΔtΔt being the time to expiry approaches zero, theta sharpens into a narrow peak which seems to converge towards a Dirac delta function (the rectangle in the example above), i.e. lim⁡t→0θt(S)=δp(S)limt→0​θt​(S)=δp​(S) where p∈Rp∈R is to be found.

To understand how this theta can have a limit resembling a Dirac delta function as t→0t→0, we analyze the components of the two expressions: the theta function and the Dirac delta function:

  1. The Dirac delta function, δ(x)δ(x), is defined such that:

    δ(x)=lim⁡ϵ→01ϵ2πexp⁡(−x22ϵ2).δ(x)=ϵ→0lim​ϵ2π​1​exp(−2ϵ2x2​).

  2. The given equation for theta is:

    θ=Sσ8πtexp⁡(−[ln⁡(SK)+σ2t2]22σ2t).θ=8πt​Sσ​exp(−2σ2t[ln(KS​)+2σ2t​]2​).

  3. We have A(t):=[ln⁡(SK)+σ2t/2]22σ2t.A(t):=2σ2t[ln(KS​)+σ2t/2]2​.

  4. Set x:=ln⁡(SK)x:=ln(KS​) and ϵ2:=σ2tϵ2:=σ2t. Then,

    θ≈t→0K⋅exσ2/2ϵ2πexp⁡(−x22ϵ2).θ≈t→0​K⋅exσ2/2ϵ2π​exp(−2ϵ2x2​).

  5. Setting the limit: As t→0t→0, the function θθ approximates a Dirac delta function centered at St=KSt​=K as seen in Figure 4:

    θ≈t→0K⋅exσ2/2δ(x).θ≈t→0​K⋅exσ2/2δ(x).

  6. We need to make sure that this resulting limit is a Dirac delta function, in other words, it respects the two conditions of the definition of the Dirac delta function:

    a) At x=0x=0, we have that exδ(x)=+∞exδ(x)=+∞ and elsewhere the function equals 0.

    b) To compute the integral of the expression exδ(x)exδ(x) over the entire real line RR, we utilize the sifting property of the delta function. This property states that for any function f(x)f(x) that is continuous at x=ax=a,

    ∫−∞∞f(x)δ(x−a)dx=f(a).∫−∞∞​f(x)δ(x−a)dx=f(a).

    Applying this property to the expression exδ(x)exδ(x), where a=0a=0, we have:

    ∫−∞∞exδ(x)dx=e0=1.∫−∞∞​exδ(x)dx=e0=1.

    Conclusion: Kσ2/2exδ(x)Kσ2/2exδ(x) is a Dirac delta function scaled by Kσ2/2Kσ2/2.

  7. Now, we'll assume that the theta function converges to a Dirac delta that is similar to a rectangle (as seen in Figure 4). Hence, let's determine the optimal Dirac delta function by finding the best p∈Rp∈R in the equation:

    Kexσ2/2δ(x)=p⋅rect(px).Kexσ2/2δ(x)=p⋅rect(px).

Important consequence: The area under both functions, the theta function and the Dirac delta function, are approximately equal, and we proceed to the following calculations:

Keep in mind that the minimum width of the Dirac delta function is intrinsically tied to the tick spacing of a Uniswap v3 pool.

Fee Tier
Tick Spacing
Description

1 bp

1

LP positions can be created with lower and upper prices PaPa​ and PbPb​, respectively, that can be set at any multiple of 1.0001.

5 bps

10

LP positions can be created with lower and upper prices PaPa​ and PbPb​ at any multiple of 1.0010.

30 bps

60

LP positions can be created with lower and upper prices PaPa​ and PbPb​ at any multiple of 1.0060.

100 bps

200

LP positions can be created with lower and upper prices PaPa​ and PbPb​ at any multiple of 1.0200.

Table 1: Uniswap v3 Pool Tick Spacing and LP Position Ranges

Our objective is to achieve the narrowest width possible, which equates to the smallest range of an LP position, dictated by the pool's tick spacing. Given PaPa​ and PbPb​ as the lower and upper bounds of our range, respectively, and considering the width Pb−PaPb​−Pa​, it is helpful to use the following transformation to effectively apply Taylor's expansion:

K=PaPbandr=PaPbK=Pa​Pb​​andr=Pb​Pa​​​

Where KK is the geometric mean of the LP position's price range or alternatively the strike price of the corresponding option and rr is the range factor, a measure of width, of the LP position.

This allows us to express the width of an LP position as:

Pb−Pa=K(r−1r)=K(r2−1)=2K(r−1)asr→1Pb​−Pa​=K(r−r1​)=K(r2−1)=2K(r−1)asr→1

Remark: We take r→1r→1 to represent an extremely narrow LP position, mimicking an option near expiry. We note, however, that the Uniswap v3 smart contracts limit the minimum width to the pool's tick spacing tStS​.

Given that Pa=1.0001taPa​=1.0001ta​ where tata​ is the tick for the upper price, we can further simplify the expression:

2K(r−1)=2K((1+110000)(tb−ta)/2−1)≈2K(1+tb−ta2⋅10000−1)=KtS100002K(r−1)=2K((1+100001​)(tb​−ta​)/2−1)≈2K(1+2⋅10000tb​−ta​​−1)=10000KtS​​

Here, tS=tb−tatS​=tb​−ta​ represents the difference between the ticks for the upper and lower prices. This transformation provides a more useful formulation for our width.

With this newly formulated expression for the width of an extremely narrow LP position, we can find the approximating Dirac function to approximate theta and the cumulative premium of a corresponding option.

  • The area under the theta function is approximately K2σ222K2σ2​ (see Appendix below 3.1).

  • The width of the theta function is K⋅tS1000010000K⋅tS​​.

  • The height of the theta function is: areawidth≈Kσ2⋅100002tSwidtharea​≈2tS​Kσ2⋅10000​

Therefore, p=Kσ2⋅100002tSp=2tS​Kσ2⋅10000​.

Theta is approximated as the height of the approximating Dirac delta function multiplied by the time spent in range. Thus, the cumulative premia is:

Kσ2⋅100002tS×Δt2tS​Kσ2⋅10000​×Δt

Equating Premia with Fees: We assert that the accumulated streaming premia (theoretical) of an option is equal to that of the fees collected from liquidity provision (actual). This aligns with our observation that LP positions behave similarly to options, and hence, their premia received is simply the fees collected by the position. By equating premia with collected fees we have:

Premia=∫S(t)θ(St,K,σ)dt=Total Fees at a Given Tick over Time=Collected FeesPremia=∫S(t)θ(St​,K,σ)dt=Total Fees at a Given Tick over Time=Collected Fees

We substitute and obtain:

Kσ22tS×10000×Δt=feeRate×Volume×positionSize×ΔttickLiquidity2tS​Kσ2​×10000×Δt=tickLiquidityfeeRate×Volume×positionSize×Δt​

Assumptions:

  • The relationship between the tick spacing and the fee rate is as follows: tS=feeRate×20000tS​=feeRate×20000 In fact, tick spacings are 200 for 1% fee rate, 60 for 0.3%, 10 for 0.05% as seen in Table 1.

  • The premia is calculated for one options contract, which corresponds to a position size of SS in terms of the quote asset.

  • The LP position is centered around the current spot price, so the spot price SS is equal to its strike price KK.

With the above assumptions, this simplifies further:

Kσ22×feeRate×20000×10000×Δt=feeRate×Volume×K×ΔttickLiquidity2×feeRate×20000Kσ2​×10000×Δt=tickLiquidityfeeRate×Volume×K×Δt​

Finally, we solve for σσ, the implied volatility:

σIV=2×feeRate×VolumetickLiquidityσIV​=2×feeRate×tickLiquidityVolume​​​

This formula provides the implied volatility derived from market activity, allowing the protocol to price positions based on actual trading data rather than external oracle feeds.

The pricing framework combines several key components:

  1. Black-Scholes adaptation for crypto assets with zero risk-free rate

  2. Pool utilization optimization to reflect market dynamics

  3. Implied volatility calculation from historical price data

  4. Theta approximation using Dirac distributions for LP positions

This comprehensive approach ensures that pricing accurately reflects both theoretical option values and practical market conditions in decentralized finance environments.

Last updated