Missing Return Values#
Some tokens do not return a bool (e.g. USDT
, BNB
, OMG
) on ERC20 methods. see
here for a comprehensive (if somewhat outdated) list.
No Revert on Failure#
Some tokens do not revert on failure, but instead return false
(e.g.
ZRX).
Approval Race Protections#
Some tokens (e.g. USDT
, KNC
) do not allow approving an amount M > 0
when an existing amount
N > 0
is already approved. This is to protect from an ERC20 attack vector described
here.
Revert on Approval To Zero Address#
Some tokens (e.g. OpenZeppelin) will revert if trying to approve the zero address to spend tokens
(i.e. a call to approve(address(0), amt)
).
Integrators may need to add special cases to handle this logic if working with such a token.
Revert on Zero Value Transfers#
Some tokens (e.g. LEND
) revert when transfering a zero value amount.
Small Decimals#
- EURS'
decimals
: 2
Big Decimals#
- NEAR'
decimals
: 24
See also: https://github.com/d-xo/weird-erc20