Root Cause
Papertrade, a synthetic perpetuals venue on HyperEVM (Hyperliquid L1), settled all positions against Hyperliquid's live BBO (best-bid-offer) midpoint — a single-block spot-market quote — with no manipulation-resistance mechanisms:
- No time-weighted average price (TWAP) or median lookback
- No maximum single-block deviation circuit-breaker
- No open-interest cap relative to oracle liquidity depth
- Oracle and trading venue share the same underlying market (reflexive risk)
// Simplified vulnerable oracle pattern
function getSettlementPrice() external view returns (uint256) {
// Returns Hyperliquid BBO midpoint at this exact block —
// no TWAP, no staleness check, no deviation guard
return hyperliquidOracle.getSpotMidpoint(ASSET);
}
function closePosition(uint256 positionId) external {
uint256 exitPrice = getSettlementPrice(); // live midpoint — manipulatable
_settle(msg.sender, positionId, exitPrice);
}
Because an actor with sufficient Hyperliquid capital can widen the BBO or move the inside quote for a single block, and because Papertrade entry and exit both read this raw midpoint, the attacker could arbitrarily set their entry and exit prices on Papertrade by moving the Hyperliquid market at the right moment.
Attack Steps
| Step | Hyperliquid Action | Papertrade Action | Direction |
|---|---|---|---|
| 1 | Buy heavily, move mid-price up | Open large long just before buy | Long |
| 2 | Mid-price rises | Close long at inflated midpoint | Profit |
| 3 | Sell heavily, move mid-price down | Open large short just before sell | Short |
| 4 | Mid-price falls | Close short at deflated midpoint | Profit |
| 5–N | Repeat ~305 times over ~8 hours | 296 wins, 9 losses | $1.28M net |
The attacker's final 30 shorts were liquidated (~$450K loss), capping total profit at ~$1.28M. Some reports speculate the team manually intervened to block the final batch of closes.
Impact
- Attacker Net Gain: ~$1.28M
- House Pool Loss: Protocol's liquidity pool absorbed the losses
- Date: October 10, 2026 (within first ~8 hours of mainnet launch)
- Chain: HyperEVM (Hyperliquid L1)
- Attacker Profile: Pre-existing Hyperliquid trader with $14B all-time volume, $13M+ PnL — capital sufficient to move the oracle
- Response: Papertrade tightened open-interest caps post-incident; no contract upgrade announced
Lessons for Auditors
-
Single-block spot midpoints are manipulable by capitalized actors. Any oracle derived from a live order-book midpoint without TWAP or lookback is exploitable by anyone who can move the underlying market temporarily. Use a TWAP of at least several minutes, or a multi-source aggregate.
-
Bound OI relative to oracle manipulation cost. Maximum position size on a synthetic venue should be set so the expected profit from moving the oracle by X% is less than the cost of that manipulation (i.e., slippage + fees on the underlying market). Audit whether this relationship holds at launch-day liquidity levels.
-
Reflexive oracles amplify risk. When the settlement oracle is the same venue where the attacker trades to manipulate prices, the attacker extracts profit from the synthetic protocol while the manipulation cost is partly offset by their own Hyperliquid P&L. Prefer oracles on markets the attacker cannot profitably move in isolation.
-
Launch-day OI limits must account for thin liquidity. Protocols should constrain OI much more aggressively at launch, scaling up only as oracle depth (liquidity on the source market) grows. A staggered OI ceiling tied to VWAP depth metrics is one mitigation.