HIP-2: Hyperliquidity

Motivation

Though HIP-1 is sufficient as a permissionless token standard, in practice it is often crucial to bootstrap liquidity. One of Hyperliquid's core design principles is that liquidity should be democratized. For perps trading, HLP can quote deep and tight liquidity based on CEX perp and spot prices, but a new model is needed for HIP-1 tokens that are in early phases of price discovery.

Hyperliquidity is inspired by Uniswap, while interoperating with a native onchain order book to support sophisticated order book liquidity from end users. HIP-2 is a fully decentralized onchain strategy that is part of the block transition logic of the Hyperliquid L1. Unlike conventional automated order book strategies, there are no operators. The strategy logic is secured by the same consensus that operates the order book itself.

Hyperliquidity is parametrized by

  1. spot: a spot order book asset with USDC quote returned by a deployment of HIP-1

  2. startPx: the initial price of the range

  3. nOrders: the number of orders in the range

  4. orderSz: the size of a full order in the range

Each Hyperliquidity strategy has a price range defined recursively px_0 = startPx, px_i = floor(px_{i-1} * 1.01). The strategy updates on every block where the block time is at least 3 seconds since the previous update block. After each update:

  1. Strategy targets nFull = floor(balance / orderSz) full ask orders and a balance % orderSz partial ask order if the partial order is nonzero. To the extent that ALO orders are not rejected, these orders are ensured.

  2. Each fully filled tranche is modified to an order of side orderSz on the side with available balance, with the exception of the single partial order from (1) if it exists.

The resulting strategy guarantees a 1% spread every 3 seconds. Like smart-contract based pools on general purpose chains, Hyperliquidity requires no maintenance in the form of user transactions. One key improvement is that Hyperliquidity participates in a general purpose order book. Active liquidity providers can join in liquidity provision alongside Hyperliquidity at any time, allowing markets to adapt to increasing demand for liquidity.

Last updated