Skip to main content
This guide is currently React only.

Overview

Sending USDC, or other ERC-20 tokens, is one of the most common actions taken by wallet users on Ethereum-based chains. This guide will walk you through how to send USDC using Dynamic’s embedded wallets.

Step 1: Get the USDC Contract Address

To send USDC, you’ll need the contract address for USDC. The address is different for each network, so make sure you get the correct address for the network you’re targeting. You can go to Circle’s website to look up the USDC address on both main networks and test networks.

Step 2: Format the Transaction Data

USDC, and other ERC-20 tokens, are smart contracts. In order to send these tokens, your transaction needs to call the transfer function on the contract, which takes in two parameters:
  • to: The address of the recipient
  • value: The amount of tokens to send
When formatting the transaction data, you must define the expected interface of the function you’re calling by providing an ABI. You can use helper packages like viem to provide the ABI and encode the function parameters. Additionally, each ERC-20 token defines a decimals value, which is the number of decimal places for the token. For USDC, the decimals value is 6. First, ensure you have the required dependencies installed for your platform: Install the viem package for handling EVM transactions and ERC-20 token transfers:

Step 3: Send the Transaction

You can send the transaction using Dynamic’s wallet APIs. Below are examples for React, React Native, and Swift. Use the useDynamicContext hook with wallet clients to send USDC transactions using the writeContract method:
React

Important Considerations

Gas Fees

  • EVM Networks: Gas fees are paid in the native token (ETH, MATIC, etc.)
  • Gasless Transactions: Some networks support gasless USDC transfers using account abstraction in React and React Native.

USDC Decimals

  • EVM USDC: 6 decimal places
  • Always use parseUnits(amount, 6) when converting amounts

Error Handling

Always implement proper error handling for failed transactions:

Best Practices

  1. Always validate addresses before sending transactions
  2. Check USDC balance before attempting transfers
  3. Implement proper error handling and user feedback
  4. Test on testnets before deploying to mainnet
  5. Consider gas fees when calculating transfer amounts
  6. Use transaction simulation to show users exactly what will happen
Last modified on March 30, 2026