ERC223 is a modification of the ERC20 token standard.
- Accidentally lost tokens inside contracts: there are two different ways to transfer ERC20 tokens depending on: 1) is the receiver address a contract, or 2) 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, a 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: an ERC20 token transaction is a call of
transfer
function inside the token contract. The ERC20 token contract does not notify the receiver when a transaction occurs. Also, there is no way to handle incoming token transactions on contract and no way to reject any non-supported tokens. - An ERC20 token transaction between a wallet address and a 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 ERC223 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 the possibility of avoiding 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
. There is no difference between whether the receiver is a contract or not. There's no need to learn how a token contract is working for a regular user to send tokens. - Allows contract developers to handle incoming token transactions.
- ERC223
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.
ERC223 tokens are backwards compatible with ERC20 tokens. This means that ERC223 supports every ERC20 functional and contracts or services working with ERC20 tokens will work with ERC223 tokens correctly.
ERC223 tokens should be sent by calling the transfer
function on a token contract, keeping in mind there is no difference if the receiver is a contract or a wallet address. If the receiver is a wallet, the ERC223 token transfer will be same as an ERC20 transfer. If the receiver is a contract, the ERC223 token contract will try to call tokenFallback
function on receiver contract. If there is no tokenFallback
function on the receiver, the contract transaction will fail. tokenFallback
function is analogue of fallback
function for Ether transactions, which 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 ERC223 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 are already a number of tokens held by token contracts themselves. These 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+