Ethereum USDT reverts when you call approve(spender, value) with a nonzero value while that spender already has a nonzero allowance. Set the allowance to zero first, then set the new value; this works around TetherToken’s guard, which was added to mitigate the ERC-20 approval race condition.
Say the allowance is 50 USDT and your dapp requests 100. The call to approve(spender, 100) reverts because the current allowance is still nonzero. Calling approve(spender, 0) and then approve(spender, 100) succeeds. The illustrative amounts change, but the spender and token stay the same.
What happens inside USDT’s approve call?
Ethereum mainnet USDT is at 0xdAC17F958D2ee523a2206206994597C13D831ec7. Its verified TetherToken source on Etherscan has an approve check equivalent to require(!((_value != 0) && (allowed[msg.sender][_spender] != 0))). In plain terms, a new nonzero value is accepted only when the existing allowance is zero.
The call takes the spender and requested value as inputs. TetherToken checks that value against the current allowance, then sets the allowance if the check passes. A failed check reverts the call; a successful call returns no value.
That final detail can cause a second, separate failure. The ERC-20 interface declares approve as returning a boolean, but Ethereum USDT’s implementation returns nothing. Solidity 0.4.22 and later check return data when decoding a declared return value. So a typed call through a standard IERC20.approve interface can revert while decoding the missing boolean—even when the current allowance is zero and TetherToken accepted the approval. Because the outer call reverts, its state changes are rolled back too.
For an integration, account for both behaviors: the zero-first allowance rule and the missing return value. A plain typed IERC20.approve call does not handle either case on its own.
OpenZeppelin Contracts v5 removed safeApprove and provides SafeERC20.forceApprove for tokens with this zero-first requirement. It supports tokens that return no value and tries the requested approval; if that call fails, it sets the allowance to zero and retries the requested value. For USDT integrations, I would use forceApprove because it handles both the allowance guard and empty return data. If you implement the equivalent with low-level calls, treat a successful call with empty return data as success, while still handling reverts and explicit false returns.
The EIP-20 Token Standard’s Approval section says that approve overwrites the current allowance and notes that clients should set it to zero before changing it to another value to prevent the race condition. It also says the token contract itself should not enforce that rule for compatibility. USDT’s guard is a token-specific behavior, so integrations must accommodate it.
Related questions
What is the ERC-20 approve race condition?
When an owner changes a nonzero allowance directly, the spender might use the old allowance before the change is confirmed, then use the new allowance afterward. EIP-20’s zero-first note describes the mitigation: set the allowance to zero, wait for that change, then set the new value. USDT enforces a zero-first step for a new nonzero approval.
Do other USDT deployments have the same approve rule?
Do not assume they do. This explanation applies to Ethereum mainnet TetherToken; tokens on other chains may have different addresses and implementations. Check the deployed token’s verified source or documentation for that network before relying on the same approval behavior.
Questions developers ask next
Does USDT0 on Arbitrum keep the zero-first rule?
USDT0 on Arbitrum is a separate deployment, so Ethereum TetherToken’s rule does not establish how USDT0 behaves. Check the specific Arbitrum contract’s verified source or documentation and test its approval path.
Is increaseAllowance available on USDT?
Ethereum TetherToken’s verified interface does not list increaseAllowance. It is not part of the standard ERC-20 interface, so do not assume you can call it on USDT. Use the token’s actual supported methods and handle its approval behavior.
How can a frontend detect this revert before submitting?
Read the allowance for the connected owner and the exact spender. If it is nonzero and the requested approval is also nonzero, warn that the dapp may need a zero-first step. Simulate the exact transaction as a further check, but treat the simulation as a snapshot: the allowance can change before the submitted transaction executes.
For a wallet user, setting the USDT allowance to zero also unblocks the dapp’s next nonzero approval. A user who revokes that approval in revokecash sets it to zero; the dapp can then request its new allowance.
