Cash-and-Carry Basis Trade on Hyperliquid: Step-by-Step
A practical walkthrough of executing a cash-and-carry basis trade using Hyperliquid perps shorted against spot — covering margin requirements, roll timing, and cross-venue execution to lock in the basis spread as near-risk-free yield.
The cash-and-carry basis trade is one of the cleanest yield sources in crypto: buy spot, short the perpetual, collect the funding rate differential. On Hyperliquid the mechanics are tight enough — deep liquidity, low fees, on-chain settlement — that the trade is worth running systematically rather than occasionally. Here is how we actually build and manage it.
What You Are Actually Capturing
A Hyperliquid perpetual continuously converges to the index price via an 8-hour funding payment. When the market is in contango — perp premium over spot — longs pay shorts. Your position is:
- Long spot (e.g. SOL on a CEX or DEX with good liquidity)
- Short perp at equal notional on Hyperliquid
The delta cancels. What remains is the funding rate accrual minus fees minus borrow cost on the spot leg. On a crowded long market this annualises at 15–40% APR on the notional. On quieter days it compresses to 5–8%. The job is to stay in when the rate is attractive and exit cleanly when it is not.
Funding on Hyperliquid pays every hour (not 8-hourly like Binance), which matters for compounding math and for deciding whether a partial-day hold is worth the transaction cost.
Sizing and Margin Requirements
Hyperliquid operates a cross-margin account by default. For a clean basis book you want isolated margin per position so a liquidation on one leg does not cascade. Switch the perp position to isolated before entry.
The short leg on a 1× delta-neutral structure requires roughly 12–15% initial margin at 5× leverage for most mid-cap assets. Leave a buffer: fund the isolated account to 20% of notional to absorb a 10–15% adverse move before you need to top up. At 5× leverage a 10% rally in the underlying sends the perp margin ratio toward the maintenance threshold — you must post more margin or the spot gain becomes a forced rebalance event.
Practical sizing rule: never let the short leg exceed 80% of the maximum isolated margin you are willing to lock. Keep the remaining 20% in USDC on Hyperliquid as a ready top-up buffer. This avoids on-chain latency risk when the market moves fast.
Entry Execution
Do not market-order both legs simultaneously and call it a day. The round-trip fee on Hyperliquid is 0.035% maker / 0.1% taker per side. At 1× the fee drag on a 30-day hold is roughly 0.2% round-trip — marginal. The risk is slippage asymmetry: if you lift the perp offer then miss the spot bid, you are short basis for a few seconds and exposed to gap risk.
The sequence that works in production:
- Leg spot first using a limit order within 3 bps of mid. Spot fills are deterministic once on the book.
- Leg the perp short immediately after spot confirms. Use a limit at best-bid or post-only to capture maker rebate. Accept a 1–2 minute window of naked long spot — this is the tightest exposure you will have.
- Record the achieved basis (perp entry minus spot entry). If the basis at fill is below your minimum threshold, exit both legs. Do not rationalise a bad entry.
For larger size (above $200k notional) split into 3–5 tranches over 10-minute intervals to avoid moving the perp mid against yourself.
Roll and Exit Timing
The position has no natural expiry — this is a perp, not a dated future — so you define the roll. Exit when any of these conditions are met:
- Funding flips negative: even one hour of negative funding on an otherwise positive-funding day erodes the edge. If the 4-hour TWAP of the funding rate drops below your fee breakeven (approximately 0.005% per hour for a taker entry), close.
- Basis compresses to under 1.5× fees: the trade is not worth holding through volatility for sub-par yield.
- Spot-perp spread inverts: sometimes the perp trades below spot during a liquidation cascade. Close the short, hold spot, and re-enter later.
The /services/bots infrastructure we run for clients monitors funding every 60 seconds and triggers a close signal automatically when the rate drops through threshold — human latency on these decisions costs real money.
Hedging the Residual Risks
The trade is not risk-free. Three residual exposures matter:
Spot custody risk. If your spot leg sits on a CEX, exchange insolvency is a real tail. We hold spot on-chain (Drift or Jupiter limit orders for SOL, bridged USDC for stablecoin collateral) and accept slightly wider spreads.
Liquidation gap risk. A 20%+ candle in seconds can gap through your isolated margin buffer before the top-up transaction lands. Mitigate with a tighter buffer (30% margin ratio target rather than 20%) or by sizing below maximum.
Funding rate manipulation. On lower-liquidity assets a coordinated long can push funding to 0.3%+ per hour briefly, then unwind — leaving you with a position entered at a rate that will not persist. Stick to the top 5 assets by Hyperliquid open interest. SOL-PERP and ETH-PERP have deep enough books that funding manipulation is expensive.
Net APR Reality Check
A representative live trade on SOL-PERP as of recent months:
| Component | Rate (annualised) |
|---|---|
| Funding income | +22% |
| Entry/exit fees (30-day hold) | -2.4% |
| Spot opportunity cost (vs T-bill) | -4.5% |
| Net APR | ~15% |
That 15% is on notional, not on posted margin. If you run 5× leverage on the short leg the return on margin is closer to 60% — but so is the liquidation risk if you do not manage the buffer. Most production implementations we run sit at 3–4× on the perp leg for a net margin return of 35–45%.
If you want this running as a fully automated, monitored strategy rather than a manual spreadsheet exercise, talk to us — we build and operate exactly this class of infrastructure.
Need a bot like this built?
We design, build and run trading bots on Solana, Hyperliquid and Polymarket.
Start a projectMore from the blog
Public vs Paid RPC: How to Run a Fair Benchmark
A fair comparison of public and paid RPC endpoints must account for quotas, workload, freshness and support guarantees.
Read articleRPC Benchmark Percentiles Explained: p50, p95 and p99
Why averages hide the latency spikes that break trading bots, wallets and production blockchain applications.
Read articleHyperliquid REST vs WebSocket Benchmark: What to Measure
A benchmark plan for Hyperliquid market data that separates request latency from streaming freshness and recovery.
Read article