Skip to content

Commit 5ce309e

Browse files
authored
Include list of non-standard ERC20 tokens
#68
1 parent 2e8e13f commit 5ce309e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

development-guidelines/token_integration.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,42 @@ Reviews of token scarcity issues must be executed manually. Check for the follow
7272
- [ ] **Users understand the risks associated with a large amount of funds or flash loans.** Contracts relying on the token balance must account for attackers with a large amount of funds or attacks executed through flash loans.
7373
- [ ] **The token does not allow flash minting.** Flash minting can lead to substantial swings in the balance and the total supply, which necessitate strict and comprehensive overflow checks in the operation of the token.
7474

75+
### Known non-standard ERC20 tokens
76+
77+
The following tokens are known to be non-standard ERC20 tokens. They may have additional risks that must be covered.
78+
79+
| Token | Issue | Notes |
80+
| :----------------------------------------------------------------------------------------------------- | :------------------ | :--------------------------------------------------------------------- |
81+
| [Basic Attention Token (BAT)](https://etherscan.io/token/0x0d8775f648430679a709e98d2b0cb6250d2887ef) | NO_REVERT | |
82+
| [Huobi Token (HT)](https://etherscan.io/token/0x6f259637dcd74c767781e37bc6133cd6a68aa161) | NO_REVERT | |
83+
| [Compound USD Coin (cUSDC)](https://etherscan.io/token/0x39aa39c021dfbae8fac545936693ac917d5e7563) | NO_REVERT | |
84+
| [Tether USD (USDT)](https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7) | MISSING_RETURN_DATA | |
85+
| [0x Protocol Token (ZRX)](https://etherscan.io/token/0xe41d2489571d322189246dafa5ebde1f4699f498) | NO_REVERT | |
86+
| [Binance Coin (BNB)](https://etherscan.io/token/0xB8c77482e45F1F44dE1745F52C74426C631bDD52) | MISSING_RETURN_DATA | Only missing return data on `transfer`. `transferFrom` returns `true`. |
87+
| [OMGToken (OMG)](https://etherscan.io/token/0xd26114cd6ee289accf82350c8d8487fedb8a0c07) | MISSING_RETURN_DATA | |
88+
| [Wrapped Ether (WETH)](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) | PERMIT_NOOP | Includes a non-reverting `fallback` function. |
89+
| [Amp (AMP)](https://etherscan.io/token/0xff20817765cb7f73d4bde2e66e067e58d11095c2) | TRANSFER_HOOKS | |
90+
| [The Tokenized Bitcoin (imBTC)](https://etherscan.io/token/0x3212b29E33587A00FB1C83346f5dBFA69A458923) | TRANSFER_HOOKS | |
91+
92+
| Issue | Description | Notes |
93+
| :------------------ | :----------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
94+
| NO_REVERT | Does not revert when a transfer fails due to missing funds. | Protocols must check the return value in addition to the call success status. |
95+
| MISSING_RETURN_DATA | Does not return any data when transferring tokens. | Protocols that expect a return value when transferring tokens will revert. Solidity includes automatic checks on the return data size when calling `token.transfer`. |
96+
| TRANSFER_HOOKS | Includes [ERC777](https://eips.ethereum.org/EIPS/eip-777)-like transfer hooks. | Protocols that interact with tokens that include transfer hooks must be extra careful to protect against reentrant calls. This can also affect cross-protocol reentrant calls to `view` functions. |
97+
| PERMIT_NOOP | Does not revert when calling `permit`. | Protocols that use [EIP-2612 permits](https://eips.ethereum.org/EIPS/eip-2612) should check that the token allowance has increased. See [Multichain's incident](https://media.dedaub.com/phantom-functions-and-the-billion-dollar-no-op-c56f062ae49f). |
98+
99+
Additional non-standard behavior might include:
100+
101+
- non-standard permits ([DAI](https://etherscan.io/token/0x6b175474e89094c44da98b954eedeac495271d0f))
102+
- revert for approval of amount `>= 2^96 < 2^256 - 1` ([UNI](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984), [COMP](https://etherscan.io/token/0xc00e94cb662c3520282e6f5717214004a7f26888))
103+
- fee on transfers
104+
- do not reduce allowance when it is the maximum value
105+
- do not require allowance for transfers from self
106+
- upgradeable contracts (`USDC`)
107+
- tokens with multiple proxy addresses
108+
109+
Refer to [d-xco/weird-erc20](https://github.com/d-xo/weird-erc20) for additional non-standard ERC20 tokens.
110+
75111
## ERC721 tokens
76112

77113
### ERC721 Conformity Checks

0 commit comments

Comments
 (0)