How It Works
HyperAMM is a dual-system AMM that integrates Hyperliquid's EVM environment with its Core perpetual exchange. This page explains the high-level architecture and lifecycle of key operations.
Architecture Overview
HyperAMM operates across two systems:
- HyperEVM — Valantis sovereign pools hold 2/3 of pool liquidity. Users interact with smart contracts here for swaps, deposits, and withdrawals.
- HyperCore — Holds 1/3 of pool liquidity as collateral for perpetual positions used for delta hedging.
The protocol maintains a 2/3 EVM + 1/3 Core liquidity composition at all times, automatically rebalancing when needed.
Deposit Lifecycle
Here's what happens when you deposit into a pool (using a UBTC-USDC BULL pool as an example, equivalent to Δ1 BTC exposure):
- Deposit — You deposit 3 UBTC and receive LP tokens representing your pool share
- Rebalance to Core — 1 UBTC (1/3) is bridged to HyperCore, sold for USDC, deposited into a perpetual account, and a long 1 BTC position is opened to maintain BTC exposure
- Market making begins — The EVM pool starts providing liquidity for swaps, earning trading fees
- Automated rebalancing — As prices move and weights diverge, the protocol automatically rebalances — no action needed from you
Swap Lifecycle
When a user swaps tokens (e.g., selling BTC for USDC):
- Fee & price calculation — Using oracle prices, liquidity imbalance, order size, and mark-oracle premium, the protocol calculates the dynamic fee and quote price
- Swap execution — The swap executes against EVM pool liquidity at the oracle-derived price
- Hedge request — Within the same transaction, a hedge order is submitted through CoreWriter
- Hedge execution — The hedge order executes on HyperCore ~800–1000ms later, restoring the pool's delta exposure
The hedge is requested atomically within the swap transaction via CoreWriter. This is a unique capability of Hyperliquid's EVM ↔ Core integration.
Withdrawal Lifecycle
Two withdrawal paths are available:
Queued Withdrawal (no fee)
- Submit request — LP tokens are transferred to the Withdrawer contract and your withdrawal amount is locked at the current oracle price
- 3-day queue — The request enters a FIFO queue. During this period, keepers unwind the corresponding hedge position on HyperCore and bridge assets back to EVM
- Claim — After 3 days and once sufficient liquidity is available, claim your tokens
The withdrawal amount is determined at request time, not at claim time. Once submitted, the request cannot be cancelled.
Instant Withdrawal (small fee)
If the pool has sufficient EVM-side liquidity, you can withdraw immediately:
- Submit request — LP tokens are sent to the Executor
- Keeper execution — The keeper processes the withdrawal with a fresh oracle price in the next block
- Tokens delivered — Base tokens are sent to your wallet
A small withdrawal fee is charged and stays in the pool for remaining LPs. Instant withdrawal availability depends on current pool liquidity after reserving for pending queued withdrawals.
Pool Types
| NEUTRAL | BULL | |
|---|---|---|
| Exposure | Stablecoin (delta-neutral) | Token (delta-1) |
| Hedge Direction | Short | Long |
| Goal | Cancel spot exposure (Δ0) | Amplify to full token exposure (Δ1) |
| Earns | Trading fees + funding fees | Trading fees |
| Pays | — | Funding fees |
NEUTRAL composition (300 USD position):
- 100 USD: 1/3 in spot token on EVM (e.g., UBTC, UETH, HYPE)
- 100 USD: 1/3 in USDC on EVM
- 100 USD: 1/3 in USDC on Core
- -100 USD: 1/3 short perp position on Core (USDC on Core used as collateral)
BULL composition (300 USD position):
- 100 USD: 1/3 in spot token on EVM
- 100 USD: 1/3 in USDC on EVM
- 100 USD: 1/3 in USDC on Core
- +200 USD: 2/3 long perp position on Core (USDC on Core used as collateral)
Keeper System
Seven automated keepers maintain pool health:
| Keeper | Role |
|---|---|
| Rebalancer | Maintains target EVM/Core weight (default 2/3 + 1/3) |
| Reconciler | Corrects hedge drift from partial fills or ADL |
| Executor | Processes queued deposits and withdrawals with fresh oracle prices |
| MIFactor Updater | Calibrates market impact fee sensitivity from order book state |
| Execution Fee Updater | Monitors gas fees and updates deposit/withdraw execution fees |
| Oracle Updater | Maintains push oracle data for stablecoin pricing in the fee module |
| Pauser | Monitors market conditions and pauses operations if needed |
Next Steps
- Quick Start — Start using HyperAMM
- Oracle-Based AMM — Deep dive into the pricing mechanism
- Pool Types — Understand NEUTRAL vs BULL in detail