Skip to main content

Overview

Mayan supports direct Hyperliquid (HyperCore) deposits and withdrawals through the Swap SDK. You can:
  • Deposit β€” swap from any supported token on any supported chain into a HyperCore USDC balance.
  • Withdraw β€” move USDC out of a HyperCore balance back to an EVM chain.
A HyperCore account is identified by an ordinary EVM-style 0x… address β€” the same address the user signs with. HyperCore holds USDC in two distinct balances, and every deposit/withdrawal targets one of them:
  • USDC (spot) β€” the Hyperliquid spot balance.
  • USDC (perps) β€” the Hyperliquid perpetuals (collateral) balance.
Both directions are built on Mayan Swift v2. Deposits and withdrawals construct their own fixed payloads internally (see Zaps / Custom Payloads); you do not need to craft them. Only USDC is supported on the HyperCore side today. From an integrator’s perspective, HyperCore deposits and withdrawals are just another cross-chain swap route: you call the same fetchQuote and swapFromEvm / swapFromSolana entry points with hypercore as the toChain (deposit) or fromChain (withdraw), and consume the resulting Quote exactly as you would for any other pair.
Requires @mayanfinance/swap-sdk v14.3.0 or later.

HyperCore token identifiers

When you fetch a quote, the HyperCore side is addressed with these toToken / fromToken values: You can always discover these dynamically from the Tokens API (fetchTokenList('hypercore')) instead of hard-coding them.

Deposit (into HyperCore)

Bridge/swap from a source chain into a HyperCore USDC balance. This is a normal signed transaction on the source chain (so the user needs gas there); the SDK and Mayan relayer handle the rest, crediting the chosen HyperCore balance.

1. Fetch a quote

Set toChain: 'hypercore' and toToken to the spot or perps identifier. The returned quote is a SWIFT quote whose toToken.name is 'USDC (spot)' or 'USDC (perps)'.
  • The input token can be anything Mayan supports on the source chain (native ETH, USDC, etc.); Mayan swaps it to USDC and deposits it.
  • gasDrop is not supported for HyperCore deposits and is ignored.
  • HyperCore deposits do not accept a caller-supplied payload β€” passing one throws. The route builds its own fixed payload.
  • HyperCore enforces a minimum deposit (around 5 USDC of output). Size amountIn64 so the expected output clears it.

2. Execute the deposit

Use the regular swapFromEvm (or swapFromSolana) β€” there is no extra signing step. Pass the user’s HyperCore address (the 0x… account) as destinationAddress.
For a contract-level integration, build the unsigned transaction with getSwapFromEvmTxPayload instead. Solana sources are supported via swapFromSolana; depositing from HyperEVM uses a mono-chain quote and the same swapFromEvm entry point.
Sui β†’ HyperCore is temporarily disabled. Calling createSwapFromSuiMoveCalls with toChain: 'hypercore' throws. A dedicated entry point will ship in a future release.

3. Track the deposit

A deposit returns a normal TransactionResponse. Track it on the Explorer API by transaction hash and watch clientStatus (INPROGRESS β†’ COMPLETED / REFUNDED):

Withdraw (out of HyperCore)

Move USDC out of a HyperCore balance to an EVM chain. Withdrawals are gasless: the user signs an EIP-712 typed-data message instead of sending an on-chain transaction, and the SDK submits it to the Mayan relayer. No source-chain gas is required.

1. Fetch a quote

Set fromChain: 'hypercore' and fromToken to the spot or perps identifier, and pass { gasless: true }. HyperCore withdrawals must be gasless SWIFT quotes β€” the returned quote carries an hcSwiftWithdraw object.
You can withdraw to any supported destination token/chain (e.g. ETH or USDC on Base).

2. Execute the withdrawal

Call the same swapFromEvm. Because quote.fromChain === 'hypercore' and the quote is a gasless SWIFT quote, the SDK builds the HyperliquidTransaction:SendToEvmWithData EIP-712 message, has the signer sign it, submits it to the relayer, and returns an orderId string (no on-chain tx).
  • Withdrawals must use a gasless SWIFT quote. Passing a non-gasless quote (or a non-SWIFT quote) throws Only SWIFT gasless quotes are supported from hypercore withdraw.
  • Unlike deposits, a custom payload is supported and is appended to the order’s hook data.
  • You only specify the final toChain / toToken in the quote; the SDK and relayer handle delivery to that destination.

3. Track the withdrawal

swapFromEvm returns an orderId (e.g. HCS_WITHDRAW_0x…) for HyperCore withdrawals. Track it on the Explorer API via the order-id endpoint (not the trx endpoint used for deposits) and watch clientStatus: