Deploying a perp dex (HIP-3)
A HIP-3 perp dex is created by one signed registerAsset2 action with a non-null schema, from an account with 500k HYPE in its own staking account.
The first registerAsset2 fixes what can never change. In one signature it names the dex, picks its collateral token and oracle updater, and lists its first asset. No action changes the collateral, a dex name is never released, and cross margin on an asset is permanent. Standard: HIP-3.
From stake to trading in 5 steps
Section titled “From stake to trading in 5 steps”1. Hold the stake
Section titled “1. Hold the stake”The deployer needs 500k HYPE (100 on testnet) in its own HyperCore staking account for at least 183 days after deployment. Delegated and undelegated both count: several testnet dexes run on undelegated HYPE alone. It does not also count towards a HIP-4 venue and cannot be borrowed, even through a staking link (deployer economics).
2. Check the auction
Section titled “2. Check the auction”Assets after the first 3 go through a Dutch auction shared by every dex, with HIP-1 parameters (see the numbers):
{ "type": "perpDeployAuctionStatus" }{ "startTimeSeconds": 1747656000, "durationSeconds": 111600, "startGas": "500.0", "currentGas": "500.0", "endGas": null }Prices are in HYPE (the HIP-1 page states the shared parameters in HYPE; testnet showed currentGas 500 on 2026-09-20). maxGas, in HYPE wei, caps what you pay: omit it to pay the current price, or set 0 to spend one of the 7 reserve deployments the docs allow today, without waiting. A maxGas of 0 always spends a reserve, even with the auction open, so query first.
3. Create the dex and its first asset
Section titled “3. Create the dex and its first asset”registerAsset2 with a non-null schema creates the dex and its first asset. A live testnet creation, dex name changed:
{ "type": "perpDeploy", "registerAsset2": { "assetRequest": { "coin": "abc:BTC", "szDecimals": 4, "oraclePx": "65000", "marginTableId": 10, "marginMode": "normal" }, "dex": "abc", "schema": { "fullName": "ABC perps", "collateralToken": 0, "oracleUpdater": null } }}| Field | Meaning |
|---|---|
coin |
the asset’s full name, dex:COIN |
szDecimals |
size decimals; see below for how to choose |
oraclePx |
the starting oracle price, a decimal string |
marginTableId |
the margin table, which alone sets maximum leverage |
marginMode |
strictIsolated, noCross or normal |
dex |
2 to 4 lowercase characters |
schema.fullName |
the dex’s display name |
schema.collateralToken |
token index of the collateral; 0 is USDC |
schema.oracleUpdater |
the address allowed to push prices; null means the deployer |
With size open interest capped at 1B units, the docs suggest a smallest increment worth 1 to 10 USD at the starting price. Here, 0.0001 BTC at 65000 is worth 6.5 USD.
4. Add more assets
Section titled “4. Add more assets”Send registerAsset2 again with the same dex and schema: null, one asset per call; the fourth and later pay the auction.
5. Open trading
Section titled “5. Open trading”Every new asset starts halted until the deployer sends:
{ "type": "perpDeploy", "haltTrading": { "coin": "abc:BTC", "isHalted": false } }One early codebase declared its dex live without this step. Start the oracle loop before anyone trades (operating a perp dex).
marginMode replaced onlyIsolated
Section titled “marginMode replaced onlyIsolated”registerAsset2 replaces the original registerAsset’s onlyIsolated: boolean with marginMode:
marginMode |
Meaning |
|---|---|
strictIsolated |
isolated only, and isolated margin cannot be withdrawn from an open position |
noCross |
isolated only |
normal |
no restriction |
One SDK claims normal does not exist; a testnet dex used it on 2026-07-22. meta still reports the deprecated onlyIsolated alongside marginMode.
The numbers
Section titled “The numbers”| Parameter | Value |
|---|---|
| Stake | 500k HYPE mainnet, 100 HYPE testnet, at least 183 days |
| Dexes per deployer | 1 |
| Free assets | first 3 per dex |
| Auction | 31 hours, floor 500 HYPE, shared across dexes |
| Reserve deployments | 7 now; 7 + 0.2 * n_auction_deployments |
maxGas unit |
HYPE wei, 1e8 per HYPE |
| Dex name | 2 to 4 lowercase characters (registerAsset2); up to 6 in the legacy docs |
| Max leverage per tier | 1 to 50 |
| Tiers per margin table | at most 3 |
| Size open interest cap | 1B units per asset, constant |
| Asset id | 100000 + perp_dex_index * 10000 + index_in_meta |
Getting the action accepted
Section titled “Getting the action accepted”- Explicit nulls. Nullable keys must be present as
null; omitting one has produced a 422Failed to deserialize. Worse, a client that drops the key before signing makes the exchange hash its canonical MessagePack withoracleUpdateras nil, recover a different address and report an unknown user (debugging signatures). - Account checks come first. An unfunded key gets
User or API Wallet ... does not existorMust deposit before performing actionsbefore any stake error. - One namespace. A HIP-4 venue cannot take a dex name (or
spot), and no dex can take a registered venue name. Spot deployer labels must also be unique across perp dexes. - Signing. Every list of tuples is sorted before signing; key order and trailing zeros are hashed (signing).
- The legacy docs page still has
registerAsset, 6-character dex names and nomarginMode.
Running it once it exists
Section titled “Running it once it exists”- Leverage. Tooling defaults to different
marginTableIds: set it deliberately (insertMarginTableif none fits) and checkmaxLeverageinmeta. - Names.
metawith{"dex": "abc"}returns prefixed names; prefixing again gaveabc:abc:BTCin one codebase.perpDexslists dexes in index order, entry 0null(validator-operated), differently per network, so key caches by network. - Collateral is per dex. In Standard mode, traders and the deployer fund a dex by
sendAssetinto its name. - Testnet collateral failed. On 2026-09-20 no new testnet dex could be created: token 0 gave
Invalid perp DEX, 5 other tokensCollateral asset not supported, whatever the name,maxGas, margin table, margin mode and schema. Unresolved; the docs say any quote asset works.
To run the dex day to day, see operating a perp dex. For addressing, see asset ids and naming; for what margin modes mean to traders, margin.