Skip to main content

Contracts

Mainnet Alpha

These are the current Hypercall Mainnet Alpha contract addresses. Launch scope is intentionally constrained while the venue widens.

Hypercall's on-chain components are deployed on Hyperliquid L1 (HyperEVM). The system uses a modular architecture with separate contracts for account management, order processing, and option token handling.

Architecture Overview

User / ManagerEOA or Smart ContractOrders / ActionsExchangeMain Entry Point • Upgradeable Proxy• Creates Accounts (BeaconProxy)• Custodies USDC• RSM Sequencer entry• Liquidation auctionsAccountPer-user BeaconProxy• Custodies collateral• Manager + Agent keysProcessorAction Encoding• ActionCaster encoding• USD → HYPE conversionRegistryOption Token Management• Deploys option ERC20s• Token validationCoreWriterWrites actions to HyperCoreSettlement LayerLEGENDUser callsInternal callsSettlement

Contract Responsibilities

Exchange

The Exchange is the main entry point and uses an upgradeable proxy pattern.

Responsibilities:

  • Creates user Accounts via BeaconProxy pattern
  • Custodies deposited USDC on HyperCore (insurance fund + option positions)
  • Entry point for RSM Sequencer for on-chain actions/requests
  • Handles option ERC20 deposits and withdrawals (bridging between HyperEVM and RSM ledger)
  • Tracks and resolves full liquidation auctions
  • Emits events with raw ActionCaster actions

Key Functions:

  • createAccount() - Creates a new account with caller as manager
  • deposit(account, token, amount) - Deposits tokens into an account
  • addApiWallet(account, apiWallet) - Authorizes an API wallet for trading
  • hlRequestOrder(...) - Places HyperLiquid perp/spot orders via ActionCaster
  • hlRequestCancel(...) - Cancels HyperLiquid orders
  • hlActionSendAsset(...) - Sends assets from Account to recipient
  • hcActionWithdrawToken(...) - Withdraws tokens from Exchange to Account
  • hcActionWithdrawOption(...) - Withdraws options to HyperEVM recipient
  • rsmCommandRebalance(...) - RSM-initiated reduce-only orders
  • rsmCommandRepay(...) - RSM-initiated debt repayment

Account

Each user has their own Account contract (BeaconProxy pointing to shared implementation).

Responsibilities:

  • Custodies collateral on HyperCore side for traders/MMs using non-USDC assets
  • Has a single manager who can add multiple agent keys
  • Agent keys can only sign orders/cancels; other actions require manager signature
  • Entry point for managers for all account-associated actions

Key Concepts:

  • Manager: The account owner who can authorize agents and sign withdrawals
  • Agent Keys: Authorized signers for order placement/cancellation only
  • API Wallets: Authorized addresses that can submit orders on behalf of the account

Deposits:

  • Option ERC20s are deposited by calling Exchange.deposit()
  • Other assets are bridged to HyperCore using the asset's HyperEVM → HyperCore bridge
  • USDC deposits into "Option USDC position" are done via HyperCore transfer from Account to Exchange

Processor

The Processor handles signature verification and action encoding.

Responsibilities:

  • Reconstructs signer addresses from signatures
  • Encodes actions into ActionCaster format
  • Converts USD amounts to HYPE for deposit calculations

Key Functions:

  • hlRequestOrder(...) - Processes order requests
  • hlRequestCancel(...) - Processes cancel requests
  • hlActionSendAsset(...) - Processes send asset actions
  • rsmCommandRebalance(...) - Processes RSM rebalance commands
  • rsmCommandRepay(...) - Processes RSM repay commands
  • usdToHype(amountUsd) - Converts USD to HYPE based on spot price

Registry

The Registry manages option token deployment and validation.

Responsibilities:

  • Deploys option ERC20 tokens
  • Source of truth for "is this ERC20 a supported option token"
  • Whitelisted addresses can deploy new option tokens

Future Guardrails:

  • Allowed set of underlyings
  • Allowed expiry timestamps
  • Allowed strike granularity

Action Types

HyperLiquid Requests

Requests that interact with HyperLiquid's order book:

ActionSignerDescription
hlRequestOrderAgent/API WalletPlace perp/spot orders
hlRequestCancelAgent/API WalletCancel orders by OID
hlRequestCancelByCloidAgent/API WalletCancel orders by CLOID

Manager Actions

Actions that require the account manager's signature:

ActionDescription
hlActionSendAssetSend assets from Account to recipient
hcActionWithdrawTokenWithdraw tokens from Exchange to Account
hcActionWithdrawOptionWithdraw options to HyperEVM address

RSM Commands

Commands signed by the RSM signer (no manager consent required):

CommandDescription
rsmCommandRebalancePost reduce-only orders to increase USDC balance
rsmCommandRepayForce USDC transfer from Account to Exchange

Signature Verification

  • Exchange verifies RSM signer signatures
  • Account verifies manager and agent signatures
  • RSM commands are passed without manager signature (RSM signer is trusted)

Liquidation Auctions

When an account becomes undercollateralized:

  1. RSM Sequencer triggers a full liquidation auction
  2. Anyone can bid by supplying the requested USDC amount
  3. Winner becomes the new Account manager
  4. RSM Sequencer can stop ongoing auctions if conditions change

Deployed Addresses

Mainnet Alpha

ContractAddressDescription
Exchange0xE6b7FaA216cabb2b38B392f577C9c826378b2240Main exchange contract
Exchange Implementation0xeEf31f6c8F2EFABba61C99d9efBEf4e6429024CfExchange implementation behind the proxy
Account Implementation0xa8E861eAE5Bc47beDcF4896C7c5c676f563F5f1CAccount implementation
Account Beacon0x1b96D6a48d1fB34dC45953697414656D2851Ca93Account beacon
Fetcher0x8654912Eae1554662665C13EeD4f1D8A4b028aDBRead helper contract
Option Token Implementation0x6D0C7a116f9561A8De692c23c4C11682738ed206Option token implementation
Option Token Beacon0xfb320352B25Dba7f139EA9Bf8966891CCa12dC35Option token beacon
Factory0x2CeeAC2E032e4cCb05FF744619BfAb8cC75efE1bAccount factory
Router0xF41FF41B6F007dE851ACc9F43Bd2f597Da741E2DFunding and routing helper
Option Registry0x8C8efdd5F78C25215d03c8BbD5D1f6f0F1BB0598Option token registry
Option Registry Implementation0xF222421a93df1086E329503723b3cC4c30546C46Option registry implementation behind the proxy

Mainnet Configuration

ParameterAddress or ValueDescription
USDC0xb88339CB7199b77E23DB6E890353E22632Ba630fHyperEVM USDC used by Hypercall
Core Deposit0x6B9E773128f453f5c2C60935Ee2DE2CBc5390A24HyperCore deposit helper
RSM Signer0x502E7fAbF34E84EeB115C34FE947b79A94dF886ECurrent operator-controlled RSM signer
Sequencer0x56a2924217C91EB4d6989Cf4C7b4dF03020E8944Current sequencer
Legacy Sequencer0x8640A393730Fa671CF1C71CF5fcD2F8E299C44f7Legacy sequencer

Source Code

Contract source code will be made available after audit completion.