Skip to content
All library documents

Reading Trading State and Submitting Actions Through an EVM Interface

Article Hyperliquid docs

Summary

The document explains how an EVM layer can read current trading and account information from a connected exchange core, including positions, balances, vault equity, staking data, oracle prices, and block height. It describes the consistency guarantee for those reads and how returned price values must be scaled to human-readable units. Invalid query inputs can consume the gas allocated to the call, so callers need to validate parameters.

It also outlines a system contract that forwards encoded actions, such as placing or canceling orders, transferring assets, and managing staking or lending operations. Actions include a version and identifier, and some order or transfer requests are deliberately delayed before execution. The guide gives field types and encoding rules for each action, including time-in-force options and conditions for outcome operations. This is an interface reference rather than a trading strategy: it offers no performance evidence, risk model, or guidance on choosing orders, and its examples concern a test environment.

Key ideas

  • Read methods expose account state and oracle data as of EVM block construction.
  • Returned prices require scaling based on the relevant asset precision.
  • Invalid precompile inputs can fail while consuming the call frame's available gas.
  • Encoded actions support order placement, cancellation, transfers, staking, and other account operations.
  • Order actions and vault transfers incur a short on-chain delay before core execution.
  • Action payloads must follow the documented field types and operation-specific constraints.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.