Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hypernode-docs.polynode.dev/llms.txt

Use this file to discover all available pages before exploring further.

HyperLiquid maintains a comprehensive exchange state that encompasses all market data, user accounts, and protocol configuration. The state is organized around a central structure called the locus, which contains market context, execution state, and all active order books.

Top-level state structure

The complete exchange state is organized around the locus and a set of top-level components that manage protocol-wide concerns.

Locus

The locus is the core container for all exchange execution state:
locus:
  context:
    initial_height        genesis block height
    height                current block height
    round                 current consensus round
    time                  current block timestamp
    next_oid              next available order ID
    next_lid              next available liquidation ID
    next_twap_id          next available TWAP order ID
    system_nonce          monotonic system nonce
    hardfork              active hardfork version

  perp_dexs[]             array of perpetual DEX order books
  spot_books              spot market order books
  agent_tracker           agent authorization tracking
  sub_account_tracker     sub-account management
  allowed_liquidators     addresses authorized to liquidate
  bridge                  L1<>Arbitrum bridge state
The context fields are updated every block and provide the global reference point for all execution. The next_oid, next_lid, and next_twap_id counters are monotonically increasing and guarantee unique identifiers across the lifetime of the exchange.

Top-level components

Alongside the locus, the protocol maintains several top-level components:
ComponentPurpose
fee_scheduleFee tiers and maker/taker rates
gas_auctionPriority transaction auction state
perp_deploy_gas_auctionPerp market deployment auction
spot_pair_deploy_gas_auctionSpot pair deployment auction
hyper_evmHyperEVM execution state
app_hash_vote_trackerConsensus hash voting across validators
user_to_evm_statePer-user EVM account state
multi_sig_trackerMulti-signature wallet tracking
reserve_accumulatorsLending interest accumulation
partial_liquidation_cooldownLiquidation rate limiting per account
evm_enabledHyperEVM feature flag
validator_l1_stream_trackerValidator L1 stream state
distribute_funding_guardFunding distribution safety guard
update_funding_guardFunding rate update safety guard
The hardfork field in the context tracks which protocol version is active. Hardfork transitions are coordinated across all validators and activate new features or change execution semantics at a specific block height.

Safety guards

The protocol maintains a set of safety guards that protect exchange integrity and enforce operational limits. These guards can be updated through governance actions.
GuardPurpose
max_order_distance_from_anchorMaximum price deviation from anchor price. Prevents orders at extreme prices that could cause adverse fills.
scheduled_freeze_heightBlock height at which the exchange state freezes for scheduled maintenance.
cancel_aggressive_orders_at_open_interest_cap_guardAutomatically cancels aggressive orders when a market’s open interest cap is reached.
post_only_until_timeEnforces post-only mode until a specific timestamp. Used during new market launches to allow the order book to build before aggressive orders are permitted.
post_only_until_heightEnforces post-only mode until a specific block height. Alternative to the time-based guard.
spot_disabledKill switch that disables all spot trading across the exchange.
max_hlp_withdraw_fraction_per_dayLimits daily HLP vault withdrawals as a fraction of total vault value. Prevents liquidity drain.
hlp_start_of_day_account_valueTracks HLP account value at the start of each day for withdrawal limit calculations.
The post_only_until_time and post_only_until_height guards are commonly active during new market launches. During this period, only limit orders that add liquidity are accepted. Market orders and crossing limit orders are rejected.

Ledger deltas

Every action on HyperLiquid produces a ledger delta that records all resulting balance changes. Ledger deltas provide a complete audit trail of every state mutation.

Deposits and withdrawals

Delta typeDescription
depositUSDC deposit credited to an account
welcomeBonusBonus credited on first deposit

Vault operations

Delta typeDescription
vaultCreateNew vault creation
vaultGeneral vault state change
vaultDepositDeposit into a vault
vaultWithdrawWithdrawal from a vault
vaultDistributionProfit/loss distribution to vault depositors
vaultLeaderCommissionCommission paid to vault leader
requestedUsdRequested USD amount for vault operation
commissionCommission amount
closingCostCost of closing a vault position
basisCost basis tracking
netWithdrawnUsdNet withdrawn USD amount
accountValueAccount value at time of operation
leverageTypeLeverage configuration
liquidatedPositionsPositions liquidated within a vault

Funding

Delta typeDescription
fundingFunding payment credited or debited
fundingRateFunding rate applied

Transfers

Delta typeDescription
destinationTransfer destination account
accountClassTransferTransfer between account classes (cross/isolated)
subAccountTransferTransfer between sub-accounts
spotTransferSpot token transfer
usdcValueUSDC equivalent value of a transfer

Fees and gas

Delta typeDescription
nativeTokenFeeFee paid in native HYPE token
gossipPriorityGasAuctionPriority gas auction fee
GasAuctionDetailsDetailed gas auction breakdown

Token operations

Delta typeDescription
spotGenesisInitial spot token allocation
rewardsClaimStaking or points reward claim
accountActivationGasGas fee for account activation

Account management

Delta typeDescription
activateDexAbstractionDEX abstraction activation for an account
dexDEX-related state change
sourceDexSource DEX in a cross-DEX operation
destinationDexDestination DEX in a cross-DEX operation
isDepositBoolean flag indicating deposit vs withdrawal

Lending

Delta typeDescription
borrowLendBorrow or lend operation
interestAmountInterest accrued on a position

Per-block execution data

Each committed block produces a set of structured outputs that capture everything that happened during execution:
OutputDescription
node_tradesExecuted trades with price, size, and participants
node_fillsFill events for matched orders
node_twap_statusesTWAP order progress and completion updates
node_raw_book_diffsRaw order book changes (additions, removals, modifications)
node_order_statusesOrder lifecycle updates (placed, partially filled, cancelled)
misc_eventsProtocol events that do not fit other categories
hip3_oracle_updatesHIP-3 oracle price feed updates
system_and_core_writer_actionsSystem-level actions including EVM bridge operations
evm_block_and_receiptsHyperEVM block data and transaction receipts
The node_raw_book_diffs output provides the lowest-level view of order book mutations and is the basis for reconstructing the full order book state from a snapshot plus incremental updates.