Skip to content

Commit c711cb8

Browse files
authored
Merge pull request #12983 from ethereum/tokenContentStructure
Token standards IA refactor
2 parents 07d0502 + 4375f3b commit c711cb8

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

public/content/developers/docs/standards/tokens/erc-20/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,30 @@ print("Total Supply:", totalSupply)
147147
print("Addr Balance:", addr_balance)
148148
```
149149

150+
## Known issues {#erc20-issues}
151+
152+
### ERC-20 token reception issue {#reception-issue}
153+
154+
When ERC-20 tokens are sent to a smart contract that is not designed to handle ERC-20 tokens, those tokens can be permanently lost. This happens because the receiving contract does not have the functionality to recognize or respond to the incoming tokens, and there’s no mechanism in the ERC-20 standard to notify the receiving contract about the incoming tokens. The main ways this issue takes form is through:
155+
156+
1. Token transfer mechanism
157+
- ERC-20 tokens are transferred using the transfer or transferFrom functions
158+
- When a user sends tokens to a contract address using these functions, the tokens are transferred regardless of whether the receiving contract is designed to handle them
159+
2. Lack of notification
160+
- The receiving contract does not receive a notification or callback that tokens have been sent to it
161+
- If the receiving contract lacks a mechanism to handle tokens (e.g., a fallback function or a dedicated function to manage token reception), the tokens are effectively stuck in the contract’s address
162+
3. No built-in handling
163+
- The ERC-20 standard does not include a mandatory function for receiving contracts to implement, leading to a situation where many contracts are unable to manage incoming tokens properly
164+
150165
## Further reading {#further-reading}
151166

152167
- [EIP-20: ERC-20 Token Standard](https://eips.ethereum.org/EIPS/eip-20)
153168
- [OpenZeppelin - Tokens](https://docs.openzeppelin.com/contracts/3.x/tokens#ERC20)
154169
- [OpenZeppelin - ERC-20 Implementation](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol)
155170
- [Alchemy - Guide to Solidity ERC20 Tokens](https://www.alchemy.com/overviews/erc20-solidity)
171+
172+
173+
## Other fungible token standards {#fungible-token-standards}
174+
175+
- [ERC-777](/developers/docs/standards/tokens/erc-777)
176+
- [ERC-4626 - Tokenized vaults](/developers/docs/standards/tokens/erc-4626)

public/content/developers/docs/standards/tokens/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ Many Ethereum development standards focus on token interfaces. These standards h
1919
Here are some of the most popular token standards on Ethereum:
2020

2121
- [ERC-20](/developers/docs/standards/tokens/erc-20/) - A standard interface for fungible (interchangeable) tokens, like voting tokens, staking tokens or virtual currencies.
22+
23+
### NFT standards {#nft-standards}
24+
2225
- [ERC-721](/developers/docs/standards/tokens/erc-721/) - A standard interface for non-fungible tokens, like a deed for artwork or a song.
23-
- [ERC-777](/developers/docs/standards/tokens/erc-777/) - ERC-777 allows people to build extra functionality on top of tokens such as a mixer contract for improved transaction privacy or an emergency recover function to bail you out if you lose your private keys.
2426
- [ERC-1155](/developers/docs/standards/tokens/erc-1155/) - ERC-1155 allows for more efficient trades and bundling of transactions – thus saving costs. This token standard allows for creating both utility tokens (such as $BNB or $BAT) and Non-Fungible Tokens like CryptoPunks.
25-
- [ERC-4626](/developers/docs/standards/tokens/erc-4626/) - A tokenized vault standard designed to optimize and unify the technical parameters of yield-bearing vaults.
2627

2728
The full list of [ERC](https://eips.ethereum.org/erc) proposals.
2829

src/data/developer-docs-links.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,8 @@
199199
to: /developers/docs/standards/tokens/erc-20/
200200
- id: docs-nav-erc-721
201201
to: /developers/docs/standards/tokens/erc-721/
202-
- id: docs-nav-erc-777
203-
to: /developers/docs/standards/tokens/erc-777/
204202
- id: docs-nav-erc-1155
205203
to: /developers/docs/standards/tokens/erc-1155/
206-
- id: docs-nav-erc-4626
207-
to: /developers/docs/standards/tokens/erc-4626/
208204
- id: docs-nav-mev
209205
to: /developers/docs/mev/
210206
description: docs-nav-mev-description
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"/content/developers/docs/stand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