Predy v2 Doc
  • Welcome
  • Predy finance v2
    • Quick Start
    • pVaults
    • Lite Mode
    • Pro Mode
    • Liquidation
    • Trade PnL / pVault Value Chart
  • Product
    • ETH-Perpetual
    • (ETH)²-Perpetual
    • Δ DELTA
    • Γ GAMMA
    • UniV3 LP Hedge
    • Crab Strategy
  • Project
  • Roadmap
  • Governance
  • Audits
  • Contracts version 2.0.1
  • Contracts version 2.0.2
  • FAQ
  • Reference
    • Margin Trading
    • Perpetual Contracts
    • Funding Rate, what is β?
    • The Greeks
    • Testnet Setup
    • Layer Two (Arbitrum)
    • Delta Neutral
  • Developer
    • Subgraph
      • Entities
      • Queries
  • Links
    • Predy finance v2 App
    • Medium
    • Twitter
    • Discord
    • Github
Powered by GitBook
On this page
  • Overview
  • How to Use the Strategy
  • Technical Details
  1. Product

UniV3 LP Hedge

PreviousΓ GAMMANextCrab Strategy

Last updated 2 years ago

Overview

The UniV3 LP Hedge strategy allows a user to select a Uniswap V3 NFT (or specify the ID) and hedge the impermanent loss of that LP position. Predy will create a position that offsets the LP position using a combination of ETH and (ETH)² Perpetuals. This creates a long position, refer to for further details of how the position will perform.

How to Use the Strategy

The UniV3 LP Hedge should be used when you have an LP position that you want to hedge the impermanent loss for. This can be useful if you are generating trading/farm rewards that are greater than the cost of the funding from the UniV3 LP Hedge position, or when you are concerned about short term volatility in the pair.

Technical Details

V=Value of Liquidity Position=ValuewETH+ValueUSDC=2Lp−Lpa−pLpbWhere:Pair=wETH and USDCValuewETH=ValueUSDCp=ETHprice from Chainlinkpa=ETHmin in rangepb=ETHmax in rangeThen,L is calculated:DeltaV=δVδp=L(1p−1pb)GammaV=δVδ2p=−0.5L∗p−3/2 \begin{align*} V&= Value \ of \ Liquidity \ Position \\ &= Value_{wETH} + Value_{USDC} \\ &= 2L \sqrt{p} - L \sqrt{p_a} - p \frac {L}{\sqrt{p_b}} \end{align*} \\ \begin{align*} Where: \\ Pair &= wETH \ and \ USDC \\ Value_{wETH} &= Value_{USDC} \\ p & = ETH_{price} \ from \ Chainlink \\ p_a & = ETH_{min} \ in \ range \\ p_b & = ETH_{max} \ in \ range \end{align*} \\ \begin{align*} \\ Then, L \ is \ calculated: \\ Delta_V &= \frac {\delta {V}}{\delta p} \\ &= L( \frac{1}{\sqrt{p}} - \frac{1}{\sqrt{p_b}}) \\ Gamma_V &= \frac {\delta {V}}{{\delta}^2 p} \\ &= -0.5 L *p^{-3/2} \\ \end{align*}V​=Value of Liquidity Position=ValuewETH​+ValueUSDC​=2Lp​−Lpa​​−ppb​​L​​Where:PairValuewETH​ppa​pb​​=wETH and USDC=ValueUSDC​=ETHprice​ from Chainlink=ETHmin​ in range=ETHmax​ in range​Then,L is calculated:DeltaV​GammaV​​=δpδV​=L(p​1​−pb​​1​)=δ2pδV​=−0.5L∗p−3/2​
ETH−PerpetualUnderlyingAsset=ETHIndexprice=S,(S=ETHprice from Chainlink)Δ Delta=δVδS≈δSδS=1=ConstantΓ Gamma=δVδ2S≈δSδ2S=0where, V=IndexpriceETH2−PerpetualUnderlyingAsset=ETHIndexprice=S2∗110,000,(S=ETHprice from Chainlink)Δ Delta=δVδS≈δS2δS∗110,000=2S∗110,000Γ Gamma=δVδ2S≈δS2δ2S∗110,000=2∗110,000=Constantwhere, V=Indexprice\begin{align*} ETH-Perpetual \\ &Underlying Asset = ETH &\\ &Index_{price} ={S}, (S = ETH_{price} \ from \ Chainlink) &\\ \\ &\Delta \ Delta =\frac {\delta {V}}{\delta S} \approx \frac {\delta S}{\delta S} = 1 = Constant &\\ &\Gamma \ Gamma =\frac {\delta {V}}{{\delta}^2 S} \approx \frac {\delta S}{{\delta}^2 S} = 0 &\\ &where, \ V = Index_{price} &\\ \\ ETH^2-Perpetual \\ &Underlying Asset = ETH &\\ &Index_{price} ={S^2} * \frac{1}{10,000}, (S = ETH_{price} \ from \ Chainlink) &\\ \\ &\Delta \ Delta =\frac {\delta {V}}{\delta S} \approx \frac {\delta {S^2}}{\delta S} * \frac{1}{10,000} = 2S * \frac{1}{10,000} &\\ &\Gamma \ Gamma =\frac {\delta {V}}{{\delta}^2 S} \approx \frac {\delta {S^2}}{{\delta}^2 S} * \frac{1}{10,000} = 2 * \frac{1}{10,000} = Constant &\\ &where, \ V = Index_{price} \end{align*}ETH−PerpetualETH2−Perpetual​UnderlyingAsset=ETHIndexprice​=S,(S=ETHprice​ from Chainlink)Δ Delta=δSδV​≈δSδS​=1=ConstantΓ Gamma=δ2SδV​≈δ2SδS​=0where, V=Indexprice​UnderlyingAsset=ETHIndexprice​=S2∗10,0001​,(S=ETHprice​ from Chainlink)Δ Delta=δSδV​≈δSδS2​∗10,0001​=2S∗10,0001​Γ Gamma=δ2SδV​≈δ2SδS2​∗10,0001​=2∗10,0001​=Constantwhere, V=Indexprice​​​
gamma
that section