Skip to main content
This guide shows how to transfer USDC from Arbitrum to HyperCore using the CctpExtension contract.
Fast Transfers from Arbitrum to HyperEVM have no fees, however there is a flat forwarding fee for Arbitrum transfers to HyperCore. Fast Transfer is the default for transfers from Arbitrum to HyperEVM.

Prerequisites

Before you begin, ensure that you’ve:
  • Installed Node.js v22.6+
  • Prepared an EVM testnet wallet with the private key available
  • Funded your wallet with the following testnet tokens:
  • Created a new Node project and installed dependencies:
  • Created a .env file with required environment variables:

Steps

Use the following steps to transfer USDC from Arbitrum to HyperCore.

Step 1. Get CCTP fees from the API

Query the CCTP API for the fees for transferring USDC from Arbitrum to HyperCore. This value is passed to the maxFee parameter in the batchDepositForBurnWithAuth transaction. The following is an example request to the CCTP using source domain 3 (Arbitrum) and destination domain 19 (HyperEVM):
Response:

Step 2. Calculate the USDC amounts minus fees

There is no fee to deposit USDC from Arbitrum to HyperEVM, but there is a flat forwarding fee for the transfer to HyperCore. The forwarding fee is 0.20 USDC (0_200_000 subunits). For a 10 USDC transfer from Arbitrum to HyperCore, the total fee is 0.20 USDC.
The forwarding fee is deducted from your transfer amount. For a 10 USDC transfer, you will receive 9.80 USDC on HyperCore.

Step 3. Sign a ReceiveWithAuthorization transaction on the USDC contract

Create a ReceiveWithAuthorization transaction for the USDC contract with the following parameters:
  • from: Your wallet address
  • to: The CctpExtension contract address
  • value: The amount of USDC to transfer
  • validAfter: The timestamp after which the transaction is valid
  • validBefore: The timestamp before which the transaction is valid
  • nonce: A random nonce
Sign the hash of the transaction with your private key, and derive the v, r, s values. Broadcast the transaction to the blockchain.

Step 4. Sign and broadcast a batchDepositForBurnWithAuth transaction on the CctpExtension contract

Create a batchDepositForBurnWithAuth transaction for the CctpExtension contract with the following parameters:
  • destinationDomain: 19 (HyperEVM)
  • mintRecipient: The CctpForwarder contract address on HyperEVM
  • destinationCaller: The CctpForwarder contract address on HyperEVM
  • maxFee: 0_200_000 (0.20 USDC, from step 2)
  • minFinalityThreshold: 1000 (Fast Transfer)
  • hookData: The hook data to call the CctpForwarder contract on HyperEVM
Always set both mintRecipient and destinationCaller to the CctpForwarder contract address on HyperEVM when you transfer USDC to HyperCore.
  • If destinationCaller is wrong, the forwarder cannot complete the transfer.
  • If mintRecipient is wrong, the minted USDC is not sent to the forwarder.
In either case, funds become permanently stuck and cannot be recovered.
The hookData is the data to execute the forwarder to HyperCore. The following is an example of the hook data:
TypeScript
Once the deposit transaction is confirmed, the USDC is minted on HyperEVM and automatically forwarded to your address on HyperCore. By default (when hyperCoreDestinationDex is 0), deposits credit the perps balance on HyperCore. To deposit to the spot balance, set hyperCoreDestinationDex to 4294967295 (uint32 max value).

Full example code

The following is a complete example of how to transfer USDC from Arbitrum to HyperCore.
script.ts
Run the script: