Skip to main content
The CoreDepositWallet contract on HyperEVM allows you to deposit USDC from HyperEVM to HyperCore. This topic describes the contract interface and the available deposit functions.
To move USDC from HyperEVM to HyperCore, always call one of the CoreDepositWallet deposit functions (deposit, depositFor, or depositWithAuth). Only USDC is supported.Sending USDC or any tokens directly to the CoreDepositWallet contract address doesn’t trigger a deposit on HyperCore. The funds are permanently stuck.

Deposit functions

The CoreDepositWallet provides three entry points for depositing USDC from HyperEVM into HyperCore. All deposits credit a user’s balance on HyperCore, on either the perps or spot DEX.

deposit function

The deposit function transfers USDC from the caller’s address and credits the same address on HyperCore, after the caller has approved the CoreDepositWallet to spend their tokens. Signature:
Parameters: Token pull: Uses transferFrom(msg.sender, address(this), amount) → requires prior ERC-20 approve from the msg.sender to the core deposit wallet. Who is credited: The msg.sender of the transaction on HyperEVM is credited on HyperCore. Examples: ERC-20 Approval:
Depositing to the perps DEX:
Depositing to the spot DEX:
Note: If the destination DEX value is not supported (spot or perps), the deposit is credited to the sender’s spot balance.

depositFor function

The depositFor function transfers USDC from the caller but credits a specified recipient address on HyperCore. This allows deposits on behalf of another user. Signature:
Parameters: Token pull: Uses transferFrom(msg.sender, address(this), amount) → requires prior ERC-20 approve from the msg.sender to the core deposit wallet. Who is credited: The recipient address passed to the function is credited on HyperCore. Examples: ERC-20 Approval:
Depositing to the perps DEX:
Depositing to the spot DEX:
Note: If the destination DEX value is not supported (spot or perps), the deposit is credited to the recipient’s spot balance.

depositWithAuth function

The depositWithAuth function allows depositing USDC using a pre-signed ERC-3009 authorization. This enables a deposit where the token transfer is authorized offchain and executed onchain without requiring a prior approve call. Signature:
Parameters:
  • amount: The USDC amount being deposited from HyperEVM to HyperCore
  • authValidAfter, authValidBefore, authNonce, v, r, s: EIP-3009-style authorization fields for receiveWithAuthorization
  • destinationDex: The HyperCore destination dex index. Accepted values are:
    • 0 → default perps DEX
    • type(uint32).max → spot DEX
Token pull: Calls token.receiveWithAuthorization(...), no prior approve needed. Who is credited: The msg.sender which has to match the from address from the receiveWithAuthorization is credited on HyperCore. receiveWithAuthorization details:
  • ERC: ERC-3009
  • Function Signature: ReceiveWithAuthorization
  • Parameters:
Example: The example below illustrates how to generate an ERC-3009 authorization:
The example below illustrates how to call the depositWithAuth function with the authorization data:
Note: If the destination DEX value is not supported (spot or perp), the deposit is credited to the authorizer's spot balance.