Skip to main content

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):

  1. Deposit — You deposit 3 UBTC and receive LP tokens representing your pool share
  2. 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
  3. Market making begins — The EVM pool starts providing liquidity for swaps, earning trading fees
  4. 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):

  1. Fee & price calculation — Using oracle prices, liquidity imbalance, order size, and mark-oracle premium, the protocol calculates the dynamic fee and quote price
  2. Swap execution — The swap executes against EVM pool liquidity at the oracle-derived price
  3. Hedge request — Within the same transaction, a hedge order is submitted through CoreWriter
  4. Hedge execution — The hedge order executes on HyperCore ~800–1000ms later, restoring the pool's delta exposure
info

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)

  1. Submit request — LP tokens are transferred to the Withdrawer contract and your withdrawal amount is locked at the current oracle price
  2. 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
  3. 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:

  1. Submit request — LP tokens are sent to the Executor
  2. Keeper execution — The keeper processes the withdrawal with a fresh oracle price in the next block
  3. 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

NEUTRALBULL
ExposureStablecoin (delta-neutral)Token (delta-1)
Hedge DirectionShortLong
GoalCancel spot exposure (Δ0)Amplify to full token exposure (Δ1)
EarnsTrading fees + funding feesTrading fees
PaysFunding 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:

KeeperRole
RebalancerMaintains target EVM/Core weight (default 2/3 + 1/3)
ReconcilerCorrects hedge drift from partial fills or ADL
ExecutorProcesses queued deposits and withdrawals with fresh oracle prices
MIFactor UpdaterCalibrates market impact fee sensitivity from order book state
Execution Fee UpdaterMonitors gas fees and updates deposit/withdraw execution fees
Oracle UpdaterMaintains push oracle data for stablecoin pricing in the fee module
PauserMonitors market conditions and pauses operations if needed

Next Steps