Asset encoding cheat sheet
Every asset id, coin name, token index, system address and decimals rule on Hyperliquid, with the formula that produces each and a worked example.
Use these tables to turn a market or token into the id, string or address an action expects. The reasoning behind each scheme is on asset ids and naming.
Asset ids for orders and cancels
Section titled “Asset ids for orders and cancels”Orders and cancels carry an integer asset a; info requests and WebSocket subscriptions take a coin string, derived from a different index.
| Market | Asset id (a) |
Coin string | Example |
|---|---|---|---|
| Validator-operated perp | index in meta.universe |
the name in meta, for example BTC |
BTC is asset 0 on mainnet |
| Spot pair | 10000 + index in spotMeta.universe |
@{index}; the legacy pair keeps PURR/USDC |
PURR/USDC is asset 10000; mainnet HYPE/USDC is @107, asset 10107 |
| HIP-3 perp | 100000 + perp_dex_index * 10000 + index_in_meta |
dex:COIN |
testnet test:ABC, dex 1, index 0, is asset 110000 |
| Outcome side | 100000000 + 10 * outcome + side |
#<encoding> |
outcome 1, side 0 is #10, asset 100000010 |
perpDexs[0]isnull: the first, validator-operated perp dex.meta {dex}returns names already qualified asdex:COIN; prefixing again producedxyz:xyz:MUin one codebase.- Each network has its own HIP-3 dexes and indices: include the network in cache keys.
- The app remaps some assets: its
BTC/USDCisUBTC/USDCon HyperCore.
Outcome encoding: one number, three spellings
Section titled “Outcome encoding: one number, three spellings”encoding = 10 * outcome + side side is 0 or 1, nothing elseasset id = 100000000 + encoding| Where it appears | Spelling | Outcome 1, side 0 | Outcome 1210, side 0 |
|---|---|---|---|
| Info requests, WebSocket, fills | #<encoding> |
#10 |
#12100 |
Token name, balances in spotClearinghouseState |
+<encoding> |
+10 |
+12100 |
Order asset id; precompiles 0x801 and 0x808 |
100000000 + encoding |
100000010 |
100012100 |
Side 0 is the first sideSpecs entry in outcomeMeta (usually Yes; Long on scalar templates) and is paid settleFraction; side 1 (No; Short) is paid 1 - settleFraction.
- Outcome coins are not in
meta.universebut inspotMetaAndAssetCtxs, keyed by the#coin. - Outcome positions are spot balances;
clearinghouseStateshows nothing for them. activeAssetCtxon an outcome coin replies on the channelactiveSpotAssetCtx.
Token index versus pair index
Section titled “Token index versus pair index”A token index names a token (spotSend, sendAsset, system addresses, most precompiles); a spot pair index names a book (@N coins, asset ids). For one token they differ.
| Token | Network | Token index | Spot pair index | Source |
|---|---|---|---|---|
| USDC | mainnet | 0 | quote asset | measured (spotMeta) |
| PURR | mainnet | 1 | 0 (PURR/USDC) |
docs: HyperEVM transfers, asset ids |
| HYPE | mainnet | 150 | 107 | docs: asset ids |
| HYPE | testnet | 1105 | 1035 | docs: asset ids |
| UBTC | mainnet | 197 | not recorded | measured |
| USDT0 | mainnet | 268 | not recorded | measured (spotMeta) |
| USDH | mainnet | 360 | 230 | SDK code |
| USDH | testnet | 1452 | 1338 | SDK code |
- The spot
indexis not the array position: mainnet@367points at token 479 in a 464-entry token array. - Transfer actions name a token as
"NAME:0x"plus 32 hex characters, such as the docs’PURR:0xc4bf3f870c0e9465323c0b6ed28096c2;tokenDetailstakes the same 34-character hex id.
Dex selectors
Section titled “Dex selectors”| Where | Main perp dex | Spot balance | HIP-3 dex |
|---|---|---|---|
sendAsset, agentSendAsset (sourceDex, destinationDex) |
"" |
"spot" |
the dex name |
CoreWriter action 13 (srcDex, dstDex) |
not recorded | 4294967295 (type(uint32).max) |
not recorded |
Info requests with a dex field |
"" or omitted |
not applicable | the dex name |
System and fixed addresses
Section titled “System and fixed addresses”A token’s system address is 0x20 followed by the token index as a 19-byte big-endian integer; sending to it on either side crosses the token over. HYPE is the exception.
| Address | What it is |
|---|---|
0x2000000000000000000000000000000000000000 |
system address of token 0 (USDC) |
0x2000000000000000000000000000000000000001 |
system address of token 1 (PURR) |
0x20000000000000000000000000000000000000c8 |
system address of token 200 (the docs’ example) |
0x200000000000000000000000000000000000010c |
system address of token 268 (USDT0) |
0x2222222222222222222222222222222222222222 |
HYPE system address; HYPE crosses as native value, not as an ERC20 |
0x3333333333333333333333333333333333333333 |
CoreWriter |
0x0000000000000000000000000000000000000800 to ...0814 |
read precompiles; 0x815 to 0x8ff unassigned (measured 2026-08-17) |
0x4000000000000000000000000000000000000000 plus the dex index |
HIP-3 backstop liquidator; the first HIP-3 dex uses ...0001 |
0xfefefefefefefefefefefefefefefefefefefefe |
Assistance Fund |
0xbbb...b |
portfolio margin backstop liquidator (abbreviated in the docs) |
0x50...00 plus the token index |
AQAv2 system interest address (abbreviated in the docs) |
0x555...5 |
wrapped HYPE (abbreviated in the docs) |
0x6b9e773128f453f5c2c60935ee2de2cbc5390a24 |
the mainnet HyperEVM contract linked to HyperCore USDC (token 0), per spotMeta |
0xb88339cb7199b77e23db6e890353e22632ba630f |
Circle’s USDC on the HyperEVM, the contract the official docs list; not linked to HyperCore token 0 |
0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb |
the HyperEVM contract linked to USDT0 (token 268), the same one HyperEVM lending markets use |
Decimals and units
Section titled “Decimals and units”| Quantity | Rule or unit |
|---|---|
| Perp price | at most 5 significant figures and at most 6 - szDecimals decimals; integer prices always allowed |
| Spot price | at most 5 significant figures and at most 8 - szDecimals decimals; integer prices always allowed |
| Size | a multiple of 10^-szDecimals |
| HIP-1 lot size | 10^(weiDecimals - szDecimals) wei; szDecimals + 5 <= weiDecimals |
| Spot USDC | szDecimals = weiDecimals = 8 |
| Permissionless quote asset | weiDecimals 8, szDecimals 2 |
| Outcome price | whole ticks of 0.00001 from 0.00001 to 0.99999; szDecimals 0 |
| HyperEVM decimals | weiDecimals + evmExtraWeiDecimals, with evmExtraWeiDecimals from -2 to 18 |
| USDC | 8 decimals on HyperCore, 6 on the HyperEVM (evmExtraWeiDecimals = -2) |
| HYPE | 8 decimals on HyperCore (wei 1e8), 18 on the HyperEVM |
| PURR | 5 weiDecimals on HyperCore, 18 on the HyperEVM (evmExtraWeiDecimals = 13) |
CoreWriter action 1 limitPx, sz |
1e8 times the human value |
CoreWriter action 15 wei |
HyperCore wei; USDC is 1e8 |
CoreWriter action 17 wei |
1e8 per contract |
settledValue from 0x814 |
1e8 = 1.0 |
updateIsolatedMargin.ntli, vaultTransfer.usd |
integer, 1e6 = 1 USD |
hip3LiquidatorTransfer.ntl |
integer, 1e6 per collateral token; a multiple of 1e9 (1,000 tokens) |
Order builder.f |
tenths of a basis point: 10 = 1 bp |
approveBuilderFee.maxFeeRate |
percent string, for example "0.001%" |
CoreWriter action 12 maxFeeRate |
decibps: 10 = 0.01% |
gossipPriorityBid.maxGas |
HYPE wei, units of 0.00000001 HYPE |
Order priority {"p": N} |
N / 100000000 of notional; 80000 = 8 bps |
| Precompile perp prices | raw value divided by 10^(6 - szDecimals) |
| Precompile spot prices | raw value divided by 10^(8 - base szDecimals) |
0x812 reserve state |
rates in bps; amounts 1e8 for USDC |
userOutcome amounts |
decimal string, whole contracts, no trailing zero ("100", never "100.0") |
Encoding HYPE, a scalar band, a split and a supply
Section titled “Encoding HYPE, a scalar band, a split and a supply”HYPE on mainnet. Token 150, spot pair 107: coin @107, order asset 10000 + 107 = 10107. Crosses through 0x2222...2222 as native value, 8 decimals on HyperCore and 18 on the HyperEVM.
A testnet scalar band. Outcome 20351: Long (side 0) is asset 100000000 + 203510 = 100203510; Short (side 1) is 100203511.
Split one contract from a contract. Action 17, op 0, outcome 1121:
payload = 0x01 000011 || abi.encode(uint8 0, uint32 0, uint32 1121, uint64 100000000)wei = 100000000 is one contract. question is zero because a split ignores it, and a non-zero unused field drops the whole action.
Supply USDC to lending from a contract. 4,014.923506 USDC at 1e8 is 401492350600 wei, 0x5d7acf1688:
payload = 0x0100000f || abi.encode(uint8 0, uint64 0, uint64 0x5d7acf1688)Op 0 is supply, token 0 is USDC. Withdrawing 10 USDC is op 1, wei = 0x3b9aca00 (1,000,000,000).
For rounding prices and sizes safely, see Precision. System addresses in use, and the crossing fee, are on Moving assets between HyperCore and the HyperEVM.