Zero to HYPE

T7 · Deploying markets

Running a perp DEX

What a HIP-3 deployer must do around the clock, how sub-deployer keys work, and how real DEXs price assets when markets are closed.

LessonChecked against the live API on 22 Oct 2026

Read first

The official docs for this track.

Then

Tutorials and write-ups worth your time.

Build

Hands-on work for this track.

  • Workbench: Oracle duty simulatorComing
  • Project: Oracle keeper in shadow modeComing

What a deployer signs up for

HIP-3 lets anyone list perps on HyperCore, with its order books and margining, by running their own perp DEX. The deployer defines each market (what the oracle tracks, the contract terms) and then operates it: setting oracle prices, leverage limits, and settling the market when needed.

Who runs a DEX today

Mainnet had 10 HIP-3 DEXs on Oct 21, 2026. Almost all the volume trades stocks, indices, commodities and pre-IPO valuations rather than crypto.

DEX Run by Assets listed 24h volume
xyz trade[XYZ] 135 $4,615M
io EntropyIO 13 $114M
para Paragon 38 $9.3M
mkts Markets by Kinetiq 24 $5.5M
flx, vntl, hyna, km, abcd, cash Felix, Ventuals, HyENA, Kinetiq, ABCDEx, dreamcash 1–25 each about $0

perpDexs lists every DEX with its deployer, oracle updater, fee recipient, sub-deployer grants and per-asset settings.

The deployer’s actions

Every action is an L1 action of type perpDeploy (T3). Every list of pairs must be sorted by its first element before signing.

Action What it does
registerAsset2 Creates the DEX (name: 2–4 lower-case letters) and its first asset. The schema sets the full name, collateral token and an optional oracle updater.
registerAsset Adds another asset
setOracle Pushes prices, the job that never stops (below)
setFundingMultipliers, setFundingInterestRates, setFundingClamps Tune funding per asset: multipliers 0 to 10, clamps 0 to 1%
insertMarginTable, setMarginTableIds, setMarginModes Leverage tiers, and isolated-only or cross margin per asset
setOpenInterestCaps Cap open interest per asset
haltTrading Settle an asset at the mark price, or resume it
setSubDeployers Let another key send specific actions
setFeeRecipient, setDeployerFees, setPerpAnnotation, disableDex Fees, display metadata, shutting the DEX down

The oracle duty

A HIP-3 DEX doesn’t get oracle prices from validators the way the main perps do. The deployer has to push them, with setOracle:

{
  "type": "perpDeploy",
  "setOracle": {
    "dex": "abc",
    "oraclePxs": [["abc:BTC", "84712.9"], ["abc:ETH", "2515.3"]],
    "markPxs": [[["abc:BTC", "84674"], ["abc:ETH", "2514.9"]]],
    "externalPerpPxs": [["abc:BTC", "84680"], ["abc:ETH", "2515"]]
  }
}

The rules:

Keep the deployer key cold

The deployer key controls the stake, so it shouldn’t sit on a server signing every 3 seconds. Hand the work to other keys instead:

trade[XYZ] works this way. On Oct 22, 2026 its xyz DEX had 11 sub-deployer grants, and setOracle was granted to a single dedicated key.

HIP-3* venues are permissioned DEXs (testnet only) with an allowlist of users. They push only spot oracle prices, through a star operation; the external and mark prices are derived on-chain. Their grants are separate: { "hip3Star": "setOracle" }. The ordinary setOracle grant, even the oracle updater’s, doesn’t cover it.

Pricing when the market is closed

A stock perp trades around the clock, but the stock doesn’t. trade[XYZ]’s oracle method handles the gaps in two modes:

What it looks like in practice

hyperkeeper watches DEX oracles from the outside:

The fix is a second key with the same grant, running somewhere else, that sends only while the first is silent.

Ending a market

haltTrading cancels every order and settles every position at the current mark price. The same action resumes the asset, which lets you list dated contracts, one after another, without a new auction each time. Once every asset is settled, the stake can be unstaked.

Cross margin and the backstop

Enabling cross margin on an asset is irreversible, and validators only allow it for assets with enough liquidity, a reliable external oracle, and resistance to manipulation. Each DEX also has an on-chain backstop liquidator at 0x400…00 + dex index. It only takes over positions in cross-margin assets.