Autonomous Uniswap V4 LP guardian. Eliminates IL via delta-neutral hedges and cross-chain AVS.
GammaHedge is an autonomous risk-management infrastructure designed to turn Uniswap V4 into a safe haven for institutional and retail liquidity providers. In the current DeFi landscape, LPs suffer from a "forced selling" problem known as Impermanent Loss (IL) and value extraction by arbitrageurs known as Loss-versus-Rebalancing (LVR). GammaHedge solves this by introducing the "Autonomous Guardian"—a sophisticated agent that manages your risk so you don't have to.
The core of the project is a Delta-Neutral yield strategy. When a user provides liquidity to a Uniswap V4 pool, our system automatically calculates their directional exposure (Delta) in real-time. An autonomous agent, acting as a high-frequency risk manager, then opens offsetting positions on perpetual markets to neutralize that risk. What makes GammaHedge unique is its "Agentic" approach to capital efficiency: Active Protection: Unlike static hedges, our agent dynamically rebalances every time the market moves, ensuring protection is always optimal. Secure Re-hypothecation: We utilize EigenLayer AVS logic to securely "recall" idle liquidity from Uniswap JIT (Just-In-Time). This capital is then used as collateral for the protective hedge, meaning the user doesn't need to provide extra funds to be safe. LVR Reclamation: By responding to price updates via Pyth’s low-latency oracle faster than standard AMM blocks, our agent "internalizes" the profit that usually goes to MEV bots and arbitrageurs.
In essence, GammaHedge transforms the risky Uniswap LP position into a stable, high-yield "Delta-Neutral Bond." Users earn pure trading fees from Uniswap, while our autonomous infrastructure ensures their principal remains flat, even during extreme 30% flash crashes. It is the final piece of the puzzle for making Uniswap V4 the world's most capital-efficient, risk-adjusted liquidity layer.
GammaHedge is built as a layered agentic system, where each piece does one job well and the whole thing stays in sync without manual intervention.
At the core is a custom Uniswap v4 hook written in Solidity. We used afterInitialize, afterAddLiquidity, and afterSwap to keep a live view of position delta as liquidity and price move.
The hardest part here was JIT rebalancing. We wanted to temporarily use idle LP liquidity as hedging collateral without closing or disturbing the user’s position. That’s not something v4 gives you out of the box.
The workaround was leaning heavily into the lock / unlock callback pattern. We built an executeRecall flow that calls PoolManager.unlock, briefly “borrows” unused liquidity, routes it to a vault for hedging, and then restores everything so the user’s tick range stays intact. It’s a bit hacky—but it works, and it’s safe.
Earlier we used a normal typescript autonomous agent that monitored the volatility and allowed to move real capital. This was not a good option as it was the only thing that allowed the hedging to flow, without it the protocol would breakdown. We need something more resilient and reliable.
That’s where EigenLayer AVS comes in. The agent behaves like an AVS node and signs every capital movement using EIP-712 typed data. On-chain, the HedgeVault verifies those signatures with ECDSA.recover, so only the authorized agent can trigger recalls or rebalances. No signature, no movement. Bls signature aggregation made it authentic as validation is approved only if all operators report same volatility.
This gives us a clean separation: fast off-chain logic, strict on-chain enforcement.
Reducing LVR meant latency had to be as low as possible. We used Pyth’s pull oracle instead of push-based feeds so the agent can fetch fresh, sub-second price proofs and include them directly in the rebalance transaction.
For execution, we avoided standard swaps entirely. Instead, we integrated Lighter Protocol and built a laddered order adapter that places three limit orders at once—defensive, market, and aggressive. This way, even if price gaps or skips ticks, the agent still catches liquidity instead of missing the move. We earlier thought of using hyperliquid as perp dex, but then lighter was found to have better latency response.
On the user side, LI.FI powers “deposit from anywhere.” One signature kicks off a full bridge + swap flow, no matter where the funds start.
On the agent side, LI.FI acts as a fallback layer. If margin on Base drops too low, the agent can automatically pull USDC from the user’s Arbitrum or Polygon wallet via a LI.FI route—no manual top-ups needed.
The slightly hacky but important part
One of the trickiest pieces was keeping state consistent between the PositionManager and HedgeVault across multiple block confirmations.
To make this scalable, we built a gas-optimized delta loop using unchecked math and cached array lengths. That lets the agent track and manage thousands of positions cheaply enough that fully autonomous hedging actually makes economic sense for users.
Here are the core deployed contracts in our project-
Pool Manager- https://sepolia.arbiscan.io/address/0x5Eaf9FF980Fd9Fd9fb2f590a92435dc6aCB19EcF
HedgeVault- https://sepolia.arbiscan.io/address/0x776120d6E649b72eD087185Dd68e9FE44b94b9b3
GammaHedgedHook-https://sepolia.arbiscan.io/address/0x49931d29a44d66F0C8A3909e389db567Bf90d540
And others like swap router and position manager etc.
Pool Id- 0x8d46363157a56a5b803e8cbe420ca8091490014a94d935b92290e6519633dc2d . Test weth/usdc are used in pools everytime.

