ERC23 is a superset of the ERC20 Ethereum token standaard.
Thanks to Dexaran https://github.com/Dexaran/ERC23-tokens
- Accidentally lost tokens inside contracts: there are two different ways to transfer ERC20 tokens depending on is the receiver address a contract or a wallet address. You should call
transfer
to send tokens to a wallet address or callapprove
on token contract thentransferFrom
on receiver contract to send tokens to contract. Accidentally call oftransfer
function to a contract address will cause a loss of tokens inside receiver contract where tokens will never be accessibe. - Inability of handling incoming token transactions: ERC20 token transaction is a call of
transfer
function inside token contract. ERC20 token contract is not notifying receiver that transaction occurs. Also there is no way to handle incoming token transactions on contract and no way to reject any non-supported tokens. - ERC20 token transaction between wallet address and contract is a couple of two different transactions in fact: You should call
approve
on token contract and then calltransferFrom
on another contract when you want to deposit your tokens into it. - Ether transactions and token transactions behave different: one of the goals of developing ERC23 was to make token transactions similar to Ether transactions to avoid users mistakes when transferring tokens and make interaction with token transactions easier for contract developers.
- Provides a possibility to avoid accidentally lost tokens inside contracts that are not designed to work with sent tokens.
- Allows users to send their tokens anywhere with one function
transfer
. No difference between is the receiver a contract or not. No need to learn how token contract is working for regular user to send tokens. - Allows contract developers to handle incoming token transactions.
- ERC23
transfer
to contract consumes 2 times less gas than ERC20approve
andtransferFrom
at receiver contract. - Allows to deposit tokens intor contract with a single transaction. Prevents extra blockchain bloating.
- Makes token transactions similar to Ether transactions.
ERC23 tokens are backwards compatible with ERC20 tokens. It means that ERC23 supports every ERC20 functional and contracts or services working with ERC20 tokens will work with ERC23 tokens correctly.
ERC23 tokens should be sent by calling transfer
function on token contract with no difference is receiver a contract or a wallet address. If the receiver is a wallet ERC23 token transfer will be same to ERC20 transfer. If the receiver is a contract ERC23 token contract will try to call tokenFallback
function on receiver contract. If there is no tokenFallback
function on receiver contract transaction will fail. tokenFallback
function is analogue of fallback
function for Ether transactions. It can be used to handle incoming transactions. There is a way to attach bytes _data
to token transaction similar to _data
attached to Ether transactions. It will pass through token contract and will be handled by tokenFallback
function on receiver contract. There is also a way to call transfer
function on ERC23 token contract with no data argument or using ERC20 ABI with no data on transfer
function. In this case _data
will be empty bytes array.
ERC223 EIP ethereum/EIPs#223 ERC20 EIP ethereum/EIPs#20
There is already a number of tokens held by token contracts themselves. This tokens will not be accessible as there is no function to withdraw them from contract. This tokens are lost.
244131 GNT in Golem contract ~ $54333: https://etherscan.io/token/Golem?a=0xa74476443119a942de498590fe1f2454d7d4ac0d
200 REP in Augur contract ~ $3292: https://etherscan.io/token/REP?a=0x48c80f1f4d53d5951e5d5438b54cba84f29f32a5
777 DGD in Digix DAO contract ~ $7500: https://etherscan.io/token/0xe0b7927c4af23765cb51314a0e0521a9645f0e2a?a=0xe0b7927c4af23765cb51314a0e0521a9645f0e2a
10150 1ST in FirstBlood contract ~ $3466: https://etherscan.io/token/FirstBlood?a=0xaf30d2a7e90d7dc361c8c4585e9bb7d2f6f15bc7
30 MLN in Melonport contract ~ $1197: https://etherscan.io/token/Melon?a=0xBEB9eF514a379B997e0798FDcC901Ee474B6D9A1+
If you find a security issue, please email [email protected].
- Ask for help and follow progress at: https://iam-developer.slack.com/
Interested in contributing to ERC23?
- Issue tracker: https://github.com/iam-dev/ERC23/issues
- Contribution guidelines: https://github.com/iam-dev/ERC23/blob/master/CONTRIBUTING.md
Code released under the MIT License.