Docs: Architecture

Start

Architecture

Three parts: the contracts on Elysium, a Rust bundler service, and this site. This page shows how they connect and what keeps working when one of them is down.

Three parts

Browserpasskey prompt, SDK, session keyThis site/api/bundler /api/metrics/api/priceshipid-bundlersimulate, approve gas, bundle,receipts, metricsHyperliquidallMidsWebSocketPublic Elysium RPCElysium, chain 99901EntryPoint v0.7HipAccountHipPaymasterFactoryHipStake0x100 P-256JSON-RPC over HTTPSallow-listed methodseth_call, send bundledirect readsbalances, nonce,account address
Write path in accent: browser to site proxy to bundler to the RPC. Read path dashed: the browser reads chain state straight from the public RPC, so pages keep working when the bundler is down.

The contracts hold every rule that protects funds. The bundler is a convenience: it simulates, pays the bundle transaction and signs paymaster approvals, but it cannot act as an account. The site is the page that asks your passkey to sign and a thin proxy to the bundler.

Contracts

ContractRole
HipAccountThe account. ERC-4337 v0.7, owned by up to 8 passkeys, with session keys and guardian recovery. Not upgradeable, no admin.
HipAccountFactoryDeploys EIP-1167 clones of HipAccount at a CREATE2 address derived from the first passkey and the rpId. No owner.
HipPaymasterPays gas for HIP-ID accounts after a signer approval, within on-chain daily caps.
HipStakeStake $ID to raise an account's daily sponsored budget. Deployed; the token is not set because $ID has not launched.
HipHelloThe first action of a new account: a numbered, public hello. Holds nothing, no owner.
P256GasProbeMeasures one P-256 verification through the precompile and through Solidity in the same call.
El1CoreOrdersHyperCore orders from an account, for when EL1 precompiles go live. Written, not deployed. See EL1.

Addresses and the owner's exact powers are on Contracts and owner powers.

Bundler service

services/hipid-bundler is a Rust service built on tokio, alloy and axum. It does four jobs:

  • Validation. It runs the official EntryPointSimulations v0.7.0 contract over the EntryPoint address with an eth_call state override, against live chain state.
  • Sponsorship. It estimates gas limits and signs the HipPaymaster approval with the paymaster signer key.
  • Bundling. It preflights handleOps with eth_call, drops any failing operation, sends one transaction per bundle and polls its receipt every 150 ms.
  • Prices. It keeps a live copy of Hyperliquid mid prices from the public allMids WebSocket and serves it at /v1/prices.

At startup it refuses to run unless three checks pass: the RPC reports the configured chain id, the paymaster's on-chain signer() equals its own signer address, and its locally computed paymaster hash equals the contract's getHash for a test operation. A mismatch in that hash would make every sponsorship fail on-chain, so it stops instead. Full details are on Bundler API.

The site

The site is a Next.js App Router app. It talks to two things:

  • The bundler, through the site's own routes. POST /api/bundler forwards JSON-RPC to the bundler after checking every method against an allow-list of the eight bundler methods. GET /api/metrics and GET /api/prices forward to the bundler's /metrics and /v1/prices.
  • The chain, directly. Balances, nonces, account addresses, paymaster usage and contract state are read by the browser from the public Elysium RPC with viem. These reads never touch the bundler.

Bundler offline

If the bundler cannot be reached, every proxied route answers HTTP 503 with a reason:

{ "error": "bundler offline", "reason": "..." }

Pages show "bundler offline" for the parts that need it (sending an operation, live metrics, prices) and keep showing everything read from the chain. Nothing on-chain depends on the bundler being up. Your account, its funds and its passkeys are unaffected, and any signed operation can be submitted to the EntryPoint by anyone, including you.

Requests are bounded at the site

The proxy accepts a single request or a batch of up to 20, rejects any method outside the allow-list with JSON-RPC error -32601, and gives the bundler 45 seconds to answer.

Where trust sits

The passkey is the only key that can change an account or move funds without limits. A session key can act only within the scopes it was granted. The bundler and the paymaster signer can delay or refuse service, and the paymaster signer can spend sponsor gas up to the daily caps, but neither can sign as you. The Threat model goes through each case.