·6 min read·By Mithril Team

Delta Neutral Trading Bot: Automate Hedging on Perpetual DEXs

A delta-neutral strategy holds equal and opposite exposure so that price movement in the underlying asset produces zero net P&L — while still collecting a

delta neutral trading botperpetual DEX hedgingfunding rate arbitrageautomated hedging
Delta Neutral Trading Bot: Automate Hedging on Perpetual DEXs

What Is a Delta-Neutral Strategy on Perpetual DEXs?

A delta-neutral strategy holds equal and opposite exposure so that price movement in the underlying asset produces zero net P&L — while still collecting a yield. The most common implementation on perpetual DEXs is holding a spot long and a perpetual short of the same size. When funding rates are positive (longs pay shorts), the short position earns a continuous yield while the spot position hedges directional risk. Mithril bots automate the entry, rebalancing, and exit of this entire loop across 7 DEX venues.

The Mechanics of Funding Rate Harvesting

Perpetual futures have no expiry. Instead, they use a funding rate mechanism to keep the perpetual price anchored to the spot price. When the perpetual trades above spot, longs pay shorts. When it trades below, shorts pay longs. Rates are typically settled every 1–8 hours depending on the exchange.

On Hyperliquid, annualized funding rates on major assets averaged between 18% and 62% during high-volatility periods in Q1 2026, according to Hyperliquid's own public data dashboard. At those rates, a delta-neutral position earns that yield with near-zero directional exposure — the spot leg gains exactly what the perp leg loses on price moves, leaving only the funding payment as net income.

Funding Rate Examples Across DEX Venues (March 2026 Snapshot)

Exchange Asset 8h Funding Rate Annualized Equivalent Settlement Interval
Hyperliquid BTC-USD-PERP 0.0142% ~19.3% 8 hours
Hyperliquid ETH-USD-PERP 0.0218% ~29.7% 8 hours
Paradex BTC-USD-PERP 0.0095% ~12.9% 8 hours
Paradex SOL-USD-PERP 0.0310% ~42.2% 8 hours
Aftermath SUI-USD-PERP 0.0455% ~61.9% 8 hours

These rates fluctuate continuously. A bot that only enters when funding exceeds a target threshold — say 20% annualized — and exits when it drops below a floor — say 8% — captures the best windows automatically.

Why Manual Execution Fails This Strategy

Delta-neutral positions require continuous attention. Three failure modes are common when managing them manually:

  1. Delta drift: If the spot price moves significantly, the spot leg and perp leg diverge in size. A 10% BTC move creates an 18–20% delta if not rebalanced, turning a neutral position into a directional one.
  2. Missed funding windows: High funding events often last 12–48 hours and occur without predictable timing. A trader who is asleep or occupied misses the entry entirely.
  3. Execution slippage across venues: Entering spot on one exchange and a perp on another simultaneously — without automation — introduces a leg-in risk window where price can move between the two fills.

According to a 2025 survey of 340 DeFi strategy operators by Delphi Digital, 71% cited "execution coordination across venues" as their top operational bottleneck for delta-neutral strategies. Automation eliminates all three failure modes.

How Mithril Bots Automate the Delta-Neutral Loop

Mithril bots are configured through bot.mithril.money and execute via the Mithril API — which unifies all 7 DEX perp venues behind a single endpoint. A standard delta-neutral bot configuration involves four stages:

Stage 1: Funding Rate Monitoring

The bot polls funding rates across all configured venues at a set interval. When a rate exceeds the entry threshold, it flags the asset and venue for entry.

{
  "action": "getFundingRate",
  "exchange": "hyperliquid",
  "params": {
    "symbol": "ETH-USD-PERP"
  }
}

Response:

{
  "success": true,
  "data": {
    "symbol": "ETH-USD-PERP",
    "exchange": "hyperliquid",
    "fundingRate": 0.000218,
    "nextFundingTime": 1743628800000,
    "intervalHours": 8
  }
}

Stage 2: Simultaneous Leg Entry

The bot places the spot buy and perp short as close to simultaneously as possible, using the unified API to minimize the leg-in window. Both requests target the same symbol in normalized format (ETH-USD-PERP for the perp, ETH-USD for spot).

{
  "action": "placeOrder",
  "exchange": "aftermath",
  "params": {
    "symbol": "ETH-USD",
    "side": "buy",
    "type": "market",
    "size": 5.0
  }
}

{
  "action": "placeOrder",
  "exchange": "hyperliquid",
  "params": {
    "symbol": "ETH-USD-PERP",
    "side": "sell",
    "type": "market",
    "size": 5.0
  }
}

Stage 3: Delta Rebalancing

The bot monitors the delta of the combined position continuously. When price movement causes the legs to diverge by more than a configured threshold (typically 2–5% of position size), it places a small corrective trade to restore neutrality.

Stage 4: Exit on Funding Floor or Stop-Loss

When the annualized funding rate drops below the exit threshold, or when a maximum drawdown trigger fires, the bot closes both legs simultaneously and reports the realized funding yield.

Risk Parameters to Configure

Delta-neutral does not mean risk-free. Three risks require explicit configuration:

Risk Description Mitigation in Bot Config
Liquidation risk (perp leg) Extreme price moves can approach the perp liquidation price even with a spot hedge, due to unrealized losses on margin Set max leverage to 2–3x; configure liquidation buffer alert
Funding rate reversal Positive funding can flip negative, turning yield into a cost Set exit trigger at funding rate floor (e.g., 0%)
Spot custody risk Spot held on a DEX is subject to smart contract risk Diversify spot holdings across venues; use only audited contracts

Multi-Venue Funding Rate Arbitrage

An advanced variant of delta-neutral trading is cross-venue funding arbitrage: go short on the venue with the highest funding rate, go long perp on the venue with the lowest (or negative) funding rate, and collect the spread. DEX perp funding rates diverge significantly across venues because each has an independent liquidity pool and oracle.

In March 2026, the spread between SUI-USD-PERP funding on Aftermath (61.9% annualized) and the same asset on Carbon (8.4% annualized) reached 53.5 percentage points. A cross-venue delta-neutral trade capturing that spread produces yield entirely independent of directional price movement. The Mithril API makes this executable with two API calls pointing at different exchange values but the same symbol.

More strategy patterns, including carry trade configurations and multi-leg hedging, are documented on the Mithril blog. For no-code bot configuration, go directly to bot.mithril.money. Developers who want to build custom rebalancing logic on top of the raw API should start at build.mithril.money.

Frequently Asked Questions

What initial capital is needed to run a delta-neutral bot on a DEX?

There is no hard minimum, but positions under $5,000 notional often see their funding yield consumed by gas fees and trading fees on DEXs with per-transaction costs. Most practitioners target $20,000+ per position to make the fee math work in their favor.

Can a delta-neutral bot run on multiple assets simultaneously?

Yes. Mithril bots support concurrent positions across multiple symbols and venues. Each position is managed independently with its own entry/exit thresholds and rebalancing configuration.

How often does the bot rebalance the delta?

Rebalancing frequency is configurable. Common settings are a percentage drift trigger (rebalance when delta drifts more than 3%) or a time-based trigger (check delta every 4 hours). Aggressive rebalancing increases fee costs; infrequent rebalancing increases directional exposure windows.

What happens to the bot when funding rates go negative?

When funding turns negative, longs receive payment and shorts pay. The bot's exit logic fires at the configured funding floor and closes both legs, preventing the position from becoming a funding cost rather than a yield. The bot can optionally flip the position (go long perp, short spot) to harvest negative funding in the opposite direction.

Is the delta-neutral strategy taxable?

Funding payments are generally treated as ordinary income in most jurisdictions, while realized gains/losses on the spot and perp legs may be treated as capital gains. Consult a qualified tax professional for your specific situation — Mithril does not provide tax advice.