perp balance to
an external EVM blockchain (such as Arbitrum, Ethereum, or Base) using the
HyperCore API. Withdrawals from HyperCore to EVM chains default to the Fast
Transfer method, due to the fast finality of HyperEVM.
The withdrawal process:
- Debits your HyperCore balance (spot or
perp) - Routes through HyperEVM where USDC is burned via CCTP
- CCTP attests to the burn and mints on the destination chain
- If automatic forwarding is enabled, the recipient receives funds directly
Note: Withdrawals include a HyperCore fee and may include a CCTP forwarding
fee. Ensure your withdrawal amount exceeds these fees.
Important considerations
Keep these things in mind when withdrawing USDC from HyperCore to EVM chains:-
Data field: If the data field is empty, the
CoreDepositWalletautomatically sets a default hook that enables automatic message forwarding on the destination blockchain, provided that the blockchain supports CCTP forwarding. If the data field is not empty, its contents are passed to the CCTP protocol as the value of thehookDatafield. -
Destination caller: The CCTP
destinationCalleris always set to the zero address. Passing your own hook data means that anyone can receive the message on the destination blockchain. -
Withdrawal fees: In addition to the
maxFeecharged by the HyperCore blockchain, an additional fixed forwarding fee may be charged by CCTP if automatic forwarding is enabled. The forwarding fee amount depends on the destination blockchain and can be viewed by querying theCoreDepositWalletsmart contract. Initially, the fee for forwarding to Arbitrum is 0.2 USDC. If the withdrawal includes custom hook data, the forwarding fee is not set and users have to receive the message on the destination blockchain themselves. - Minimum withdrawal amount: If the withdrawal amount is less than the required forwarding fee, the transaction on HyperEVM reverts. Make sure the withdrawal amount is larger than the fees.
Prerequisites
Before you start, you should have:- Installed Node.js and npm on your development machine
- A wallet with USDC balance on HyperCore (spot or
perp) - Your wallet’s private key available
- Created a new Node project and have the following dependencies installed:
ethers
Steps
Use the following steps to withdraw USDC from HyperCore to an EVM blockchain.Step 1. Construct the sendToEvmWithData action
Create a sendToEvmWithData action object with the following parameters:
type:sendToEvmWithDatahyperliquidChain:Mainnet(orTestnetfor testnet)signatureChainId: The blockchain ID used for signing (for example,"0xa4b1"for Arbitrum)token:USDCamount: The amount of USDC in HyperCore minor units (8 decimal places)sourceDex:spotto withdraw from spot balance, or leave blank forperpbalancedestinationRecipient: The recipient address on the destination blockchainaddressEncoding:hexfor EVM chains orbase58for SolanadestinationChainId: The CCTP destination domain ID (for example,3for Arbitrum,0for Ethereum,6for Base)gasLimit: The HyperCore transaction gas limitdata: CCTP hook data (use"0x"for automatic forwarding)nonce: Current timestamp in milliseconds
Step 2. Sign the action using EIP-712
Sign the action using the EIP-712 typed data signing standard. The signature proves that you authorize this withdrawal. The signing domain should include:name:"HyperliquidTransaction:SendToEvmWithData"version:"1"chainId: The chain ID fromsignatureChainId(as a number)verifyingContract:"0x0000000000000000000000000000000000000000"