The new ERC223 token standard introduces improvements and capabilities, addressing some of the most significant ERC20 pain points, especially when interacting with other smart contracts. ERC223 is much like ERC20, only newer and better than the ERC20. In a nutshell, ERC223 is an improved and modified version of the ERC20.
What are ERC standards?
An ‘Ethereum Request for Comments’ (ERC) is a document that smart contract programmers using the Ethereum blockchain platform write. They describe rules in these documents that Ethereum-based tokens must comply with.
The Ethereum community uses a process called the ‘Ethereum Improvement Proposal’ to review these documents. They comment on it and as a result of that, the developer that created the document may revise it.
Most of you must have heard of ERC20 the most popular token standard and most ICOs that have issued their tokens on the Ethereum platform have used it. If you are an Ethereum developer, you can code your smart contracts assured with the knowledge that it can easily interact with ERC 20 tokens.
Motivation Behind ERC223
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 call approve on token contract then transferFrom on receiver contract to send tokens to contract. Accidentally call of transfer function to a contract address will cause a loss of tokens inside receiver contract where tokens will never be accessible.
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 call transferFrom 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.
Few Examples of How much ERC20 tokens are currently lost in Past:
- QTUM, $1,204,273 lost. watch on Etherscan
- EOS, $1,015,131 lost. watch on Etherscan
- GNT, $249,627 lost. watch on Etherscan
- STORJ, $217,477 lost. watch on Etherscan
- Tronix, $201,232 lost. watch on Etherscan
- DGD, $151,826 lost. watch on Etherscan
- OMG, $149,941 lost. watch on Etherscan
ERC223 advantages.
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 whether the receiver is a contract or not. No need to learn how the token contract works for regular users to send tokens.
Allows contract developers to handle incoming token transactions.
ERC223 transfer to contract consumes half as much gas as ERC20 approve and transferFrom at receiver contract.
Allows to deposit tokens into contract with a single transaction. Prevents extra blockchain bloating. Makes token transactions similar to Ether transactions.
ERC223 tokens are backwards compatible with ERC20 tokens. It means that ERC223 supports every ERC20 functionality and contracts or services working with ERC20 tokens will work with ERC223 tokens correctly.
ERC223 tokens should be sent by calling transfer function on token contract with no difference whether the receiver is a contract or a wallet address. If the receiver is a wallet, ERC223 token transfer will act the same to a ERC20 transfer.
If the receiver is a contract, ERC223 token contract will try to call tokenFallback function on receiver contract. If there is no tokenFallback function on receiver contract transaction will fail.
TokenFallback is an analogy with an Ether transaction that is failing when trying to send Ether to a contract that did not implement function() payable. 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.
Here are the functions that are mandatory for a token to be ERC223: This is how is looks like from implementation point of view.
So far, not a lot of wallets support ERC223 directly but Trust Wallet is one you can use. We are still far from hardware wallets such as Ledger Nano S supporting ERC223 directly.
Now further to see whether Ethereum foundation will accept this as a standard or come up with some other approach.
reference: EIPs/issues/223, Coin Sutra
Hope this was an interesting read for you all & would have help you understand ERC Standard223. Leave a comment in case of any suggestion or questions.
#Ethereum #ERC223 #blockchain #devdlearningblog
Cheers ~Dev
Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://github.com/aragon/ERC23
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
You got a 27.79% upvote from @automation courtesy of @devrajsinghrawat! This is a service sponsored by @yehey. Please consider voting @yehey for Witnes. Use this short URL link https://on.king.net/witness simply click and vote, this will redirect to Steem Connect for secure connection.
Interested to earn daily? Delegate Steem Power to receive 90% payout rewards. Use this link https://on.king.net/automation to delegate SP to @Automation.
If you need an extra upvote, join us at https://SteemChat.com discord server.
Have a lovely day.
@Automation - Keep Steeming for a better future.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations! This post has been upvoted from the communal account, @minnowsupport, by DevD from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit