Skip to main content

Auto-Deposit

The Mina SDK provides automatic deposit functionality that transfers bridged USDC from HyperEVM to your Hyperliquid L1 trading account.

Overview

When autoDeposit is enabled, the SDK handles the complete flow:
  1. USDC Arrival Detection - Monitor HyperEVM for bridged USDC
  2. Deposit Execution - Transfer USDC to Hyperliquid L1 via CoreDepositWallet
  3. L1 Confirmation - Wait for deposit to appear in trading account
This eliminates manual steps and provides a seamless bridge-to-trade experience.

Auto-Deposit Flow

Configuration

Enable auto-deposit in the Mina client configuration:

Detection Methods

detectUsdcArrival()

Monitors for USDC arrival on HyperEVM after a bridge transaction.

snapshotUsdcBalance()

Creates a balance snapshot before bridging for accurate arrival detection.

Deposit Execution

executeDeposit()

Executes a deposit from HyperEVM to Hyperliquid L1.

L1 Confirmation

monitorL1Confirmation()

Monitors for deposit confirmation on Hyperliquid L1.

Constants

Key constants for the auto-deposit flow:
The minimum deposit amount is 5 USDC. Deposits below this amount will fail.

Complete Auto-Deposit Flow Example

Manual Deposit Flow

If auto-deposit is disabled, you can manually handle deposits:

Error Handling

Next Steps

Slippage

Configure slippage settings

Configuration

Full configuration options