Overview
This guide shows how to use Magic’s Embedded Wallet to send USDC on Base. Users authenticate with Magic, and your app builds and sends the ERC-20 transfer transaction through the wallet’s provider — no backend required.Prerequisites
Before starting, ensure you have:- A Magic Publishable API Key from your Magic Dashboard
- A Base RPC endpoint (e.g., from Alchemy or QuickNode)
- USDC on Base in the user’s wallet
- ETH on Base for gas fees (typically fractions of a cent)
How It Works
- User authenticates with Magic
- Magic SDK creates an Embedded Wallet for the user
- Your app builds an ERC-20
transfercall with the recipient and amount - The transaction is sent via the wallet’s provider and confirmed on-chain
Setting Up the Client
Initialize Magic and create viem clients connected to Base.TypeScript
Contract Setup
Define the USDC address and the minimal ERC-20 ABI needed for transfers.TypeScript
Sending USDC
Call the ERC-20transfer function to send USDC to any address.
TypeScript
Checking Balance
Read the user’s USDC balance before or after a transfer.TypeScript
Contract Addresses
Key addresses on Base (chain ID 8453):TypeScript
Base has both native USDC (
0x8335...) and bridged USDbC (0xd9aA...). This guide uses native USDC, which is the standard token on Base.Key Dependencies
Troubleshooting
Transfer reverts
Transfer reverts
Symptoms: The transfer transaction fails or reverts on-chain.Solutions:
- Check that the user has sufficient USDC balance on Base
- Verify the recipient address is valid (not the zero address)
- Ensure the user has ETH on Base for gas fees
Wrong token sent
Wrong token sent
Symptoms: Tokens were sent but don’t appear as USDC in the recipient’s wallet.Solutions:
- Confirm you’re using the native USDC address (
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), not bridged USDbC - Check the transaction on Basescan to verify the token contract
Transaction stuck or slow
Transaction stuck or slow
Symptoms: Transaction is pending for a long time.Solutions:
- Base transactions typically confirm in 2-3 seconds
- Check Basescan for the transaction status
- If the network is congested, the transaction will still confirm — just wait
Resources
Magic Embedded Wallets
Learn about Magic’s Embedded Wallet product
Base Documentation
Official Base network documentation
EVM Transaction Signing
Guide for signing transactions with Magic wallets
USDC on Base
Learn about Circle’s USDC stablecoin