A leveraged Uniswap v3 pseudo delta neutral farming vault structured product.
We built a leveraged Uniswap v3 pseudo delta neutral farming vault that works in the following manner: (1) User makes a deposit in a stablecoin, e.g. 100 USDC. (2) The vault borrows, say, $200 worth of USDC and ETH from Homora Bank on Optimism, and the combined $300 worth of tokens are provided as liquidity into a Uniswap V3 position on Optimism. Our vault contract calculates the optimal Uniswap V3 position price range to choose such that the overall position is delta neutral, i.e. the borrowed ETH amount equals the ETH token amount in the Uniswap V3 liquidity position. (3) The vault is able to rebalance itself back to delta-neutrality in response to ETH price movement. (4) The vault can also collect trade fees earned from Uniswap V3 LP position and reinvest the collected yield.
Overall, this structured product automates the setup, management, and wind-down of a pseudo-delta-neutral leveraged Uniswap V3 farming strategy.
Smart contract language: Solidity Development Framework: Hardhat Network forking Optimism Mainnet EVM Network: Optimism Node provider: Alchemy
We first derived the mathematical model for choosing the optimal Uniswap v3 position price range and opening the leveraged liquidity position with minimum swap. We then developed our vault smart contract that interacts with Alpha Homora's v2 contract on Optimism (closed source).