You click Send, Swap or Deposit, and the wallet or your script stops with ERC20: transfer amount exceeds balance. It looks like a gas or network problem, but it isn’t. The token contract checked your balance, found it too low for the amount you asked to move, and refused. Here’s what the error means, why it shows up even when you’re sure you hold the tokens, and how to fix it as a wallet user or as a developer.
Short answer: “ERC20: transfer amount exceeds balance” means the token contract’s balanceOf(sender) is lower than the amount being transferred, on that exact contract and chain. It’s the revert message used by OpenZeppelin 4.x ERC-20 tokens. OpenZeppelin 5.x throws the custom error ERC20InsufficientBalance(sender, balance, needed) instead. To fix it, check that you’re on the right chain and token contract, scale the amount with the token’s real decimals, and send no more than the balance the contract actually reports.
What “ERC20: transfer amount exceeds balance” actually means
The EIP-20 token standard says transfer “SHOULD throw if the message caller’s account balance does not have enough tokens to spend.” Most tokens use OpenZeppelin’s implementation for this check. In OpenZeppelin Contracts 4.9’s ERC20.sol, the internal _transfer function contains this line:
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
Three details matter here:
- “Sender” means the address whose tokens move. For
transfer, that’s whoever calls the token. If a smart contract (a router, vault or your own contract) makes the call, the contract’s balance is checked, not your wallet’s. - The balance belongs to one specific contract on one specific chain. USDT on Core and USDT on Ethereum are different contracts with separate balances.
- The amount is in raw base units. Contracts don’t know about “10 USDT”. They see an integer, and the token’s
decimals()value says how to read it.
A revert undoes the whole transaction. If it gets mined, you still pay gas for the work done before the revert. Wallets usually catch the problem during gas estimation first, which is why you may see it inside a broader “execution reverted” error.
OpenZeppelin v4 vs v5: revert string vs custom error
OpenZeppelin 5.0 “replaced revert strings and require statements with custom errors,” according to the official changelog. In the current ERC20.sol, the check now sits in _update:
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
The error is declared in IERC6093.sol, which follows the ERC-6093 custom errors standard, as error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed). Its 4-byte selector, which we computed with cast sig "ERC20InsufficientBalance(address,uint256,uint256)", is 0xe450d38c.
| Token built with | What you see | Revert data starts with |
|---|---|---|
| OpenZeppelin 4.x | ERC20: transfer amount exceeds balance | 0x08c379a0 (Error(string)) |
| OpenZeppelin 5.x | ERC20InsufficientBalance(sender, balance, needed), or raw data if the tool can’t decode it | 0xe450d38c |
The v5 error is easier to debug because it carries the sender’s real balance and the amount needed. If your wallet only shows “execution reverted” with hex data starting with 0xe450d38c, you’re looking at the same problem.
Exceeds balance vs insufficient allowance
These two errors are easy to mix up:
- Exceeds balance: the owner simply doesn’t hold enough tokens. This can happen in
transferortransferFrom. - Insufficient allowance: the owner may hold plenty, but the spender (a DEX router, for example) wasn’t approved for that much. This only happens in
transferFrom. In v4 the message isERC20: insufficient allowance. In v5 it’sERC20InsufficientAllowance.
If you’re seeing the allowance version, read our guide to the ERC20 insufficient allowance error. Approving more won’t fix a balance problem.
Common causes
1. Wrong decimals
This is the most common developer mistake. Many tokens use 18 decimals, but not all of them. EIP-20 even marks decimals() as OPTIONAL. Core’s USDT reports decimals() = 6, so 1 USDT is 1000000. If you build the amount with 18 decimals (1000000000000000000), you’re asking for a trillion USDT. See our guide to USDT and USDC on Core for the official addresses.
2. Wrong token contract or wrong chain
Your wallet might show a balance for a bridged or different version of the token, while the dApp uses another contract address. Or your script might point at the wrong RPC. Core’s bridge resources page lists USDT on Core mainnet at 0x900101d06a7426441ae63e9ab3b9b0f63be145f1. The other USDT addresses on that page belong to other chains.
3. A contract sends tokens it doesn’t hold
If your contract calls token.transfer(to, amount), the token checks the contract’s own balance. A common bug is expecting a user’s tokens to be there when the contract never pulled them in with transferFrom first.
4. Fee-on-transfer and rebasing tokens
Some tokens take a fee on every transfer, so the receiver gets less than the amount sent. If a contract receives 100 tokens and then tries to forward 100, it may only hold 98, and the forward reverts. With rebasing tokens, balances change over time, so a balance you read a moment ago can already be out of date.
5. Stale balance, pending transactions, or “max”
Front ends cache balances. If an earlier transaction that spends the same token is still pending, or a “Max” button rounded up, the amount can end up slightly higher than the on-chain balance. The fix is to re-read the balance right before you send.

How to fix it as a wallet or dApp user
- Check the network. Make sure your wallet is on the chain where the tokens actually are.
- Check the token contract. Open the token on a block explorer such as Core Scan and compare its contract address with the one the dApp uses.
- Enter slightly less than your full balance. Avoid “Max” on fee-on-transfer or rebasing tokens.
- Wait for pending transactions to confirm or be replaced, then refresh the page.
- Check whether you’re the sender. For deposits that go through a vault or router, read the dApp’s docs. Some flows require tokens to be in a specific account or sub-account first.
How to fix it as a developer
Read the real balance and decimals
cast call reads state without sending a transaction:
cast call $TOKEN "decimals()(uint8)" --rpc-url $RPC
cast call $TOKEN "balanceOf(address)(uint256)" $SENDER --rpc-url $RPC
cast parse-units 25 6 # 25 tokens with 6 decimals = 25000000
Build amounts from decimals(), never a hardcoded 18
In ethers v6, use parseUnits with the decimals the token reports:
const decimals = await token.decimals();
const amount = ethers.parseUnits("25", decimals);
const bal = await token.balanceOf(sender);
if (bal < amount) throw new Error("Not enough tokens");
Simulate before you send
Run the call as the sender with cast call --from against a local fork. That way nothing reaches the live chain. Our guide to forking Core mainnet with Anvil covers the setup.
Decode the error
cast decode-error turns raw revert data into something readable. For a v5 token:
cast decode-error --sig "ERC20InsufficientBalance(address,uint256,uint256)" 0xe450d38c...
In ethers v6, a contract Interface that includes the error ABI can parse the same data with interface.parseError(data).
Test it in Foundry
Foundry’s expectRevert cheatcode accepts either the revert string or the encoded custom error:
// OpenZeppelin 4.x token
vm.expectRevert(bytes("ERC20: transfer amount exceeds balance"));
token.transfer(bob, tooMuch);
// OpenZeppelin 5.x token
vm.expectRevert(abi.encodeWithSelector(
IERC20Errors.ERC20InsufficientBalance.selector, alice, bal, tooMuch));
token.transfer(bob, tooMuch);
What we saw on Core USDT (local fork test)
In a local Anvil fork test on 19 Nov 2026 (Foundry 1.9.0, forked from rpc.coredao.org, chain ID 1116), we only used eth_call. No transactions were sent to mainnet and no real keys were used. The USDT contract at 0x9001…45f1 returned name “Tether USD” and 6 decimals. Here’s what came back:
- A
transferof 1 USDT from an address holding no USDT reverted with the v4-style stringERC20: transfer amount exceeds balance. The revert data started with0x08c379a0, not the v5 selector. - From an address holding 128.37024 USDT, sending its exact balance succeeded in simulation, and sending 1 base unit more reverted with the same message.
- From that same address, an amount built with 18 decimals for “1 USDT” reverted, while
1000000(6 decimals) succeeded. - A
transferFromwith no approval returnedERC20: insufficient allowance.
So on Core mainnet, expect the plain-text message from USDT rather than the 0xe450d38c custom error. This describes the error format only. We didn’t audit the contract.
FAQ
Does this error mean my tokens are gone?
No. It only means that this contract, on this chain, reports a lower balance for the sending address than the amount requested. Check the network, the contract address and the decimals first.
Will paying more gas fix it?
No. It’s a token rule, not a gas problem. Raising the gas limit or gas price doesn’t change the balance check.
What is error 0xe450d38c?
It’s the selector of ERC20InsufficientBalance(address,uint256,uint256), the OpenZeppelin 5.x version of this same error.
Why does it fail when I click Max?
The displayed balance may be stale or rounded, or the token may charge a transfer fee. Enter a slightly smaller amount.
Disclaimer: This article is for educational purposes only and isn’t financial or investment advice. Always double-check contract addresses, and test on a fork or testnet before you send real funds.
