Skip to main content

Depositing USDC

:::warning No vault on testnet today The V1 vault and MockUSDC on Arbitrum Sepolia were retired on 2026-11-25, and Vault V2 (HyperEVM, chain 998) is not deployed yet. On network: 'testnet', vault.deposit throws ConfigError: tradingVault is not deployed on testnet yet before it builds any transaction. It also refuses the retired V1 vault and MockUSDC if you pass them through contracts. This page describes how deposits work once a vault is configured. :::

const { txHash, explorerLink } = await client.vault.deposit('1000'); // 1,000 USDC

vault.deposit(amount):

  1. Approves the vault to spend exactly amount USDC. This is a separate transaction, sent every time.
  2. Calls deposit(amount, yourAddress) on the vault. Shares are minted to the signer's address.
  3. Returns the deposit transaction's hash and an explorer link.
  • amount is a human-readable USDC string (6 decimals).
  • A privateKey is required. Without one, the call throws ConfigError.
  • A failed approval or deposit throws ContractError.

Things to know about vault deposits​

  • Price. Shares are priced at the current share price, which is the agent-written NAV / total shares. See Share Price.
  • Deposit pause. The app pauses deposits while the on-chain price is catching up. The SDK does not check this, so check the share price yourself before a large deposit.
  • No limits or fees. There is no minimum deposit and no deposit fee.
  • No cross-chain method. The SDK has no cross-chain deposit method. See Cross-Chain Deposits.

Reading your position afterwards​

const shares = await client.vault.balance(address); // v7N7D shares
const price = await client.vault.sharePrice(); // USDC per share
const value = Number(shares) * Number(price);

Next: Withdrawing.