Hyperfoundation

Hyperfoundation supports Hyperliquid, where HIP-2 automates liquidity on USDC spot order books

Hyperfoundation supports Hyperliquid, whose HIP-2 mechanism adds automated liquidity to eligible USDC-quoted spot order books. Known as Hyperliquidity, this strategy helps newly deployed tokens establish a market during early price discovery. HIP-1 defines the native token and its spot trading framework; HIP-2 supplies protocol-managed orders within that framework. Other participants can place orders on the same book, so available trading depth extends beyond the automated strategy. Initial USDC funding, token inventory and price settings determine its starting configuration. Those inputs explain how a market begins trading, how orders change after fills and which limits remain relevant to actual execution.

Key takeaway: A narrow gap between HIP-2 price levels does not guarantee enough liquidity for a large spot order.

Seeded USDC changes the starting buy side

When a deployer increases the number of seeded levels, more positions in the initial price range begin as USDC-funded bids instead of token-backed asks. The parameter nSeededLevels controls this choice. Funding a bid provides buying capacity at its assigned price; allocating tokens to an ask provides selling capacity.

Token inventory

Sell-side orders require base-token inventory. The genesis allocation determines the tokens available to Hyperliquidity, separately from balances that the deployer assigns to other holders.

USDC-funded bids

Funding each price level

Each additional seeded bid needs USDC equal to its level price, in USDC per token, multiplied by its base-token quantity.

Genesis supply effect

With nOrders fixed, additional seeded bids reduce Hyperliquidity's genesis token supply. Bid funding and token allocation must therefore fit the overall genesis supply.

Price priority connects HIP-2 with the wider order book

When automated and participant orders occupy the same market, the matching rules determine which liquidity a trade reaches first. HyperCore matches orders in price-time priority. A better-priced order takes priority, while arrival time distinguishes orders at the same price. The strategy contributes liquidity within that shared ordering.

HIP-2's ladder starts at startPx, then multiplies each previous rounded level by 1.003 and rounds again. This creates 0.3% intervals before rounding. nOrders determines the number of levels, while orderSz determines the base-token quantity of a full order. Together, these settings describe a finite range of quotes. They do not measure every other participant's available liquidity or establish an externally verified token value.


From token configuration to automatic spot orders

A HIP-1 launch with Hyperliquidity connects token allocation, market registration and strategy settings before automatic order maintenance takes over. Parameter design precedes the deployment calls. The core API deployment sequence contains five actions; preparation and later protocol refresh surround that sequence.

Overview: From token configuration to automatic spot orders
Stage Action or resulting state Dependency or limit
Parameter preparation Choose supply allocations, order size, range and seeded bids. Token inventory and USDC funding must fit the configuration. Test the exact deployment on testnet before paying mainnet deployment gas.
Token registration registerToken2 registers the token specification. The deployment auction determines the gas payment.
Genesis allocations userGenesis records initial balance allocations. Amounts use the token's smallest integer units.
Token genesis genesis creates the token with its maximum supply. The supply checksum must agree with recorded allocations.
Spot pair registration registerSpot establishes the base and quote pair. HIP-2 support requires a USDC-quoted pair.
Strategy registration registerHyperliquidity records the strategy parameters. The parameters refer to the registered spot market.
Automatic refresh Protocol execution updates orders as balances change. The eligible-block timing rule and order acceptance conditions apply.

Token allocation alone does not describe a live liquidity strategy. Market registration identifies where its orders belong, and strategy registration supplies the settings that govern them. Once active, Hyperliquidity requires no user maintenance transactions. This automation concerns its own quotes; other market participants manage their orders separately.


Token precision determines valid order quantities

When token quantities enter trading actions, the token's size precision determines which order sizes the book accepts and how prices must be represented. szDecimals sets size precision, while weiDecimals describes the conversion from smallest integer units to readable token amounts. Genesis balances use those integer units. The HIP-2 orderSz parameter uses a readable token quantity, not an integer wei allocation.

Spot prices allow up to five significant figures and at most 8 - szDecimals decimal places. Integer prices remain valid regardless of their significant-figure count. Size values must follow the asset's szDecimals. These constraints make an unrounded price calculation different from an accepted order price. The token metadata supplies its precision settings, so display formatting alone does not establish the quantity that a trading request can represent.


Block timing governs replenishment after fills

When fills change the strategy's balances, its update schedule determines when the protocol recalculates the orders that those balances can support. HIP-2 refreshes on a block whose timestamp is at least 3 seconds beyond the previous update block. This is a block-triggered interval, not a promise that a submitted trade finishes within that duration.

Graphic: Hyperfoundation: Block timing governs replenishment after fills

View image file

The update targets full asks plus any nonzero partial remainder. Fully filled tranches become full-sized orders on the side with available balance, except for the single partial order when it exists. Post-only order acceptance limits the strategy's placement assurance: the book rejects a post-only order that would immediately match existing liquidity.

A resting order waits for matching demand. Its presence establishes available liquidity, while a fill records an actual exchange of assets.


Does HIP-2's price ladder cap spot slippage?

HIP-2's price ladder does not cap slippage for an order that consumes liquidity across several levels of the spot book. Adjacent quote spacing describes the configured range. Execution also depends on the quantity resting at the prices that a trade can reach.

The best bid and ask describe the nearest available buying and selling prices. Their spread says little about the quantity available beyond those prices. Depth describes that additional quantity, and it can change as participants add orders, cancel them or trade against them.

An order that matches across multiple ask levels pays different prices for different portions of the purchase. Its average execution price reflects those portions together. The same relationship applies to a sale that reaches several bid levels. A tight initial spread can therefore coexist with substantial price impact.

A limit order constrains execution to its selected price or better, although liquidity may leave part of the order unfilled. Immediate-or-cancel instructions cancel the portion that cannot fill immediately. These order conditions define acceptable execution independently of the mechanism that supplied the resting liquidity.


Additional quotes and separate vault participation

When participants supply additional resting orders, they can improve the available prices or add quantity within a market that already has HIP-2 liquidity. Their quotes enter the same order book. Market-making participation has no designated market-maker program granting special fee terms or latency advantages.

Post-only orders add resting liquidity without executing immediately. The unfilled portion of a good-til-canceled order remains on the book until it fills completely or is canceled, and a limit order can take liquidity when its price crosses existing quotes. In a crowded book, order origin alone does not determine execution priority or whether a particular participant pays maker or taker fees. The matching outcome establishes that role.

Hyperliquidity Provider (HLP) is a separate protocol vault. It runs market-making and liquidation strategies, and depositors share its profit and loss. A vault position represents participation in those strategies. HIP-2 registration parameters configure automated liquidity for a particular spot book. Similar names therefore describe different forms of liquidity provision.

Trading charges remain separate from quote spacing

When a trade matches on a HIP-2-enabled market, the account's applicable spot fee schedule contributes a cost separate from the gap between quoted prices. Maker and taker rates differ. Trading volume and eligible staking discounts can change the rate that applies to an account.

Fee tiers use rolling 14-day volume, with spot and perpetual volume contributing to the same account tier. Their trading schedules remain separate, so a perpetual fee rate does not automatically describe a spot transaction. The standard weighting counts spot volume twice, while pairs between two enabled quote assets receive reduced volume contribution. HYPE staking can affect trading discounts, while HIP-2 order parameters describe liquidity provision.


HYPE's genesis allocation to HIP-2

The November 2024 HYPE genesis allocation reserved 120,000 HYPE for Hyperliquidity. That allocation describes the token distribution at genesis. It does not state a current strategy balance, a standing USDC bid amount or a return for token holders. HYPE staking and tokens assigned to spot liquidity serve separate functions, even though both belong to the same network.

Optional Hyperliquidity and broader quote-asset support

When a token deployment disables Hyperliquidity, its spot market can rely on participant orders instead of receiving funded HIP-2 orders. The genesis setting noHyperliquidity sets the strategy balance to zero. In that configuration, registerHyperliquidity still forms part of deployment, with nOrders set to zero.

The wider spot framework also supports enabled quote tokens beyond USDC. Quote-token eligibility follows separate rules concerning precision, fee share and applicable staking or liquidity requirements. That broader market support does not extend HIP-2's documented USDC scope. A market's quote asset and its liquidity strategy are separate properties. A non-USDC order book therefore needs its own applicable liquidity arrangement.


Consensus protection and token-level permissions

HyperBFT orders the transactions that change HyperCore's trading state. HIP-2 has no separate strategy operator. Consensus protection governs execution; token permissions govern what an account can do with a particular asset. For tokens that enable the deployer's freeze privilege, a frozen address cannot trade, send or receive that token. Automated quoting does not override this token-level restriction.

Onchain orders also expose market activity publicly. Other participants can inspect quotes and trading information, so protocol-managed liquidity does not provide confidentiality for an order-book strategy. Market makers can use this public information when adjusting their own quotes.

Practical questions about Hyperfoundation

Which identifier belongs in the HIP-2 spot parameter?

The spot parameter requires the spot market index, which differs from the base-token index. Successful spot pair registration returns the market index used for Hyperliquidity registration. Token registration identifies the asset, while pair registration identifies its trading market. Reusing the token index for both roles can target the wrong object.

How long can genesis wait after the token deployment gas payment?

The token deployment process has no completion time limit after the initial gas payment. The first registration step is time-sensitive because it participates in the deployment auction. Later setup still needs internally consistent genesis allocations and liquidity parameters. The absence of a later deadline does not correct an incompatible configuration.

Will an incompatible HIP-2 setup trigger a deployment gas refund?

A stuck deployment does not qualify for a refund of token deployment gas. Incompatible Hyperliquidity and total-supply settings can prevent completion after the initial registration payment. Testing the exact configuration on testnet before paying mainnet deployment gas addresses this specific risk; paying the auction cost does not establish that later inputs are compatible.

Does HIP-2 require an ERC-20 contract on HyperEVM?

HIP-2 does not require a separate ERC-20 contract for a native HIP-1 spot token. It manages liquidity within HyperCore's native order-book framework. Linking a HyperCore token to a HyperEVM contract serves a separate interoperability purpose. That linkage can support contract applications and transfers, without making an ERC-20 contract a prerequisite for native Hyperliquidity.

Are Chase orders equivalent to HIP-2 liquidity?

Chase orders and HIP-2 use different automation mechanisms. A Chase order is a post-only limit order that reprices toward the best bid or ask and runs in the browser tab that created it. HIP-2 operates through protocol execution. A Chase order therefore does not become protocol-maintained Hyperliquidity because it updates its price automatically.

Where do base-token trading fees from a HIP-2 market go?

Base-token fees follow the token deployer's configured fee share, independently of HIP-2's quote settings. New deployments default to sending all collected base-token fees to the deployer, who can reduce that share; the remainder burns. This concerns the base-token portion, not all trading fees. For a token deployed before deployer fee sharing was implemented, the deployer can make a one-time increase from zero, after which its share can only decrease and cannot return to exactly zero.

Why can a small spot order fail on a HIP-2-enabled book?

User-submitted spot orders require a minimum notional of 10 units of the quote token. For a USDC-quoted pair, that means 10 USDC of order value. A low token price does not remove the minimum. Invalid price precision or insufficient spot balance can also cause rejection, even when the book contains automated liquidity.

Updated