Subaccount Isolation, Agent Wallets & Builder Primitives
Hyperliquid provides native institutional account primitives that enable isolated portfolio management, session-based Agent Key delegations for automated trading bots, and on-chain Builder Codes for ecosystem revenue sharing.
1. Agent Wallets (Session Key Delegation)
A primary security risk in automated algorithmic trading is exposing private keys with full withdrawal permissions on cloud servers. Hyperliquid solves this through Agent Wallets (API Wallets) (official subaccounts documentation):
[Master Wallet (Hardware / MetaMask)]
│
▼ EIP-712 "ApproveAgent" Signed Action
┌────────────────────────────────────────────────────────┐
│ Agent Key (Ephemeral Cloud Keypair) │
│ ✔ Place & Cancel Orders │
│ ✔ Modify Leverage & Margin │
│ ❌ CANNOT Withdraw Funds │
│ ❌ CANNOT Transfer Collateral to External Addresses │
└────────────────────────────────────────────────────────┘
Even if an API server or trading bot is compromised, the attacker can never steal or withdraw user funds; they only possess the ephemeral capability to trade, which can be revoked instantly with a single transaction from the Master wallet.
2. Isolated Subaccount Architecture
Institutional desks and traders often manage multiple trading strategies (e.g., delta-neutral basis arbitrage, trend following, and high-frequency market making) that require separated risk pools. Hyperliquid supports up to 10 native subaccounts per master address (see REST API specs):
- Zero Cross-Contamination: A liquidation in Subaccount #2 will never impact the collateral or active positions in Subaccount #1 or Master.
- Instant Internal Transfers: Users can transfer USDC collateral between subaccounts instantly with zero gas fees.
- Independent API Keys: Each subaccount can have its own dedicated Agent Wallet keypair.
3. Builder Codes & On-Chain Fee Sharing
Developers who build frontend terminals, algorithmic execution vaults, or Telegram/Discord trading bots on Hyperliquid can register a Builder Code (see Builder Code Docs). When users trade through a builder's interface, a configurable portion of the trading fee (up to 0.01% / 1 bps) is automatically routed to the builder's treasury on-chain, creating a sustainable monetization model for ecosystem developers.
🔗 Official External References & Primary Sources
To verify facts, technical formulas, and architectural parameters presented in this chapter, consult the following primary sources:
- Official Subaccounts & Delegation Docs ↗ Detailed guide to creating subaccounts and delegating agent keys.
- Builder Codes Specification ↗ How to register builder codes and earn fee rebates on third-party frontends.
- REST API & Python SDK Reference ↗ Code examples for setting up agent wallets and signing subaccount requests.
- Hyperliquid Node.js SDK on GitHub ↗ Official TypeScript/Node.js SDK with subaccount helpers.
- EIP-712 Typed Data Specification ↗ Ethereum standard used for agent key approvals and message signing.
- Hyperliquid Official Discord ↗ Developer community channel for building integrations and SDK questions.