ERC223 Token Standard Pros & Cons

Wiiggo Coin
5 min readJan 2, 2019

--

To begin this post, we would like to state that ERC-20, ERC-223, ERC-721, And ERC-777 Tokens are all Ethereum tokens just in different classes.

Very few people know the difference between these tokens and as such always like to stick to the popular ERC-20. It should be noted that WiiggoCoin (WIIG) has nothing against ERC-20 tokens, in fact we support it and that is why our tokens are purchased with ETH.

With that being said, a basic understanding of how Ethereum works can actually make it simpler to understand cryptocurrencies in general. You see, Ethereum is a decentralized platform upon which smart contracts can be written (in the Solidity programming language) and executed. It is the base layer that supports hundreds of decentralized applications (dApps).

Whenever a new application for blockchain technology and smart contracts is developed on top of Ethereum, a new Ethereum token can be created. The simplifying aspect of this process is that Ethereum has set standards for tokenization. Different types of applications will be tokenized according to different standards, depending on what the application is meant to do.

The most common standard for Ethereum tokens is currently the ERC-20 standard, but there are also ERC-223, ERC-721, and ERC-777 standards. To understand what each standard is, take a look at this post

What is an ERC-223 Token?

While the ERC-20 standard is very useful, it’s far from perfect. For example, one particularly bad design flaw with ERC-20s made it possible for tokens to be lost when people mistakenly send them to a smart contract using the process they would use for sending tokens to an ordinary wallet. Unfortunately, this has already resulted in the loss of over $3 million worth of ERC-20 tokens to date.

ERC-223 addresses this design flaw by allowing users to transfer tokens to smart contracts and wallets with the same function. Additionally, ERC-223 tokens improve on the efficiency of ERC-20s by making transfers require only 1 step rather than 2. That means that ERC-223 token transfers require only half the Gas (i.e. cheaper) as compared to ERC-20 transfers.

It’s important to remember that ERC-223 tokens are backwards compatible with ERC-20 tokens. It means that ERC-223 supports every ERC-20 function and contract or service working with ERC-20 tokens, and will work with ERC-223 tokens correctly. ERC-223 maintains all the original functionality while solving those bugs mentioned above.

As a result of these advantages, the ERC-223 standard may someday supplant ERC-20 as the most widely used standard for Ethereum tokens. However, most Ethereum wallets don’t yet support ERC-223 tokens, so adoption by project developers has been slow.

Given how quickly the cryptocurrency ecosystem evolves, though, don’t be surprised if ERC-223 tokens take off in popularity in 2019 or even sooner.

ERC-223 token standard was propose in 2017 in the process of formalizing into an official EIP (Ethereum Improvement Protocol).

After accustoming ourselves with the interfaces and the behaviours of an ERC-20 token, let’s see some of its imperfections and how can they be resolved.

Accidental transfer of tokens to an unaware contract

There are two different ways to transfer ERC-20 tokens depending on whether you intend to send the tokens directly or delegate the transfer to another smart contract. You can either call transfer to send tokens to a wallet address or call approve, and then trigger transferFrom from the receiver contract, in order for it to be aware of the transfer and handle it accordingly.

But what happens when you transfer your tokens to a contract address that is unaware or doesn't expect these tokens (e.g., by simply mistyping your intended address)? Unfortunately, your tokens are going to be lost forever.

There are already a number of tokens held by token contracts that didn't expect any tokens transfers (and the list is only growing). These tokens will not be accessible as there is no function to withdraw them from the contract.

Inability of handling incoming token transactions

By sending ERC-20 tokens using the transfer function, the token contract is not notifying the receiver that a transaction had occurred. The tokens are just simply credited to the address of the receiver. In addition to that, there is no way to handle incoming token transactions on contracts and no way to reject or handle any non-supported tokens.

In addition to preventing tokens getting lost, the new transfer method will also allow the smart contract to actively handle sent tokens (e.g., an exchange smart contract can react to a token transfer by crediting the token balance of the user).

Token Transfer Uniformity

An ERC-20 token transaction between a regular/non-contract address and contract are two different transactions: You should call approve on the token contract and then call transferFrom on the other contract when you want to deposit your tokens into it.

ERC-223 simplifies this requirement and allows using the same transfer function. ERC-223 tokens can be sent by calling transfer function on the token contract with no difference if the receiver is a contract or a wallet address, since there is a new way to notify the receive contract of the transfer.

If the receiver is a a regular/non-contract address, an ERC-223 token transfer will be the same as an ERC-20 transfer. On the other hand, if the receiver is a contract, then the ERC-223 token contract will try to call tokenFallback function on receiver contract. If there is no tokenFallback function on receiver contract, the transaction will fail.

For example, a decentralized exchange will no longer need to force users to call approve at the token contract, then call deposit to call transferFrom and take allowed tokens. The token transaction will automatically be handled inside the exchange contract, via the tokenFallback function.

ERC-223 transfer to contract consumes half as much gas as an ERC-20 approve and transferFrom at receiver contract.

Conclusion

The new ERC-223 token standard introduces improvements and capabilities, addressing some of the most significant ERC-20 pain points, especially when interacting with other smart contracts.

  • ERC- 223 Address key flaws with the ERC-20 token standard
  • Requires only half the Gas of ERC-20 tokens
  • Are backwards compatible with ERC-20

We hope that you've enjoyed this article and found it useful. Please join our Telegram community.

--

--