GRIMOIRE · HEDGING · PERPS
Hedge Adept
Maintains a delta-neutral perp leg to immunise LP and farming positions from directional drift.
What it does
LP and farming positions carry directional exposure to the underlying. The Hedge Adept opens an offsetting perp short, sized to neutralize that exposure, and rebalances it as the underlying position drifts.
Strategy
- Compute the current delta of the watched position (e.g. an LP).
- Target delta is whatever
targetDeltaspecifies — typically 0 for full neutrality. - If the live delta diverges from target by more than
rebalanceDriftPct, adjust the perp leg. - Respect
maxLeverage— never increase position size to chase delta if that means crossing the leverage cap.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
targetDelta | 0 | Desired net delta to maintain. |
rebalanceDriftPct | 5 | Drift from target before rebalancing. |
maxLeverage | 2 | Hard cap on leverage. Never crossed for delta chase. |
fundingGuardBps | 50 | Annualised funding cost above which agent pauses. |
Venues
- Synthetix v3 Perps — native on Base, deepest ETH liquidity.
- Vertex — broader asset coverage.
- Hyperliquid — best for niche perps.
Risks
Example intent
typescriptimport { defineIntent, WETH, BASE } from "@magicscodes/sdk";
import { hedgeAdept } from "@magicscodes/spells";
export const lpHedge = defineIntent({
goal: "Maintain delta-neutral exposure on the ETH leg of my LPs",
budget: { collateralUsd: 5000n },
bounds: {
chains: [BASE],
venues: ["synthetix", "vertex", "hyperliquid"],
targetDelta: { asset: WETH, value: -1.0 }, // short 1 ETH equivalent
rebalanceDriftPct: 5,
maxLeverage: 2,
fundingGuardBps: 40,
},
cadence: {
checkEveryMin: 10,
notifyOn: ["rebalance", "funding-warning", "halt"],
},
agentHint: hedgeAdept,
});