Options Protocol based JIT Pools on Uniswap via V4 Hooks in Swaps
Used a Uniswap v4 hook to create JIT Options from underlying collateral. Holy wow. The hook expects a pair from a user (USDC <-> LOPT-WETH-5000-20260101). The Hook then fetches info about the option from the Option Protocol (https://greek.fi). It finds the underlying collateral (WETH) and fetches prices from Uniswap sqrtPriceX96. Using the price it calculates Black Scholes (check the math, I use a grid of values for math functions). Based on the Black Scholes price, I get the amount needed and Mint() from the options protocol (WETH -> LOPT-WETH). Then I update deltas. and we're off to the races.
Used a Uniswap v4 hook to create JIT Options from underlying collateral. Holy wow. The hook expects a pair from a user (USDC <-> LOPT-WETH-5000-20260101). The Hook then fetches info about the option from the Option Protocol (https://greek.fi). It finds the underlying collateral (WETH) and fetches prices from Uniswap sqrtPriceX96. Using the price it calculates Black Scholes (check the math, I use a grid of values for math functions). Based on the Black Scholes price, I get the amount needed and Mint() from the options protocol (WETH -> LOPT-WETH). Then I update deltas. and we're off to the races.