Ethereum Token Standards

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Never miss a post!

Sign up for our newsletter and get FREE Development Trends delivered directly to your inbox.

You can unsubscribe any time. Terms & Conditions.
Categories

As a developer on the Ethereum blockchain it is important that you have an understanding of the different token standards. 

Lets first start with explaining what are these standards and why they are needed. When a new application is developed on top of Ethereum a new Ethereum token can be created. To simplify the process these standards help the creation of the token based on the type of the application being developed. 

Each standard is referenced with an ERC acronym followed by a number. ERC stands for “Ethereum Request for Comment”. This is the same concept used in RFC’s by the Internet Task Force which details all aspects of the internet like TCP, UDP, SMTP etc.

These ERC contains protocol specifications and contract standards that must be followed to implement a specific application within the Ethereum network. This allows smart contracts to be built with these standards which a common interface can then access.

In programming terms ERC’s define the interface that the smart contract must then implement. 

ERC-20 is the most common standard. Most tokens issued on top of Ethereum are based on it.

This standard exposes the following 6 basic functions.

totalsupply(). This function returns the that total amount of tokens that will be created within a given token economy.

balanceOf(). Returns account balance of the owner’s user account.

transfer(). Is the function used to distribute the initial tokens to the user account from the total supply.

transferfrom(). This functions allows the tokens holder to transfer tokens to another individual. 

approval(). Provides approval of the amount of tokens to be transfered.

allowance(). This function checks that the user has enough token to the transfterFrom() function can be executed.

The following are the event triggered based on the above functions.

transfer(). This is triggered whenever tokens are transferred.

approval(). This is triggered on  any call to approve()

The ERC-20 is very simple to implement however it has some inherit bad designs. The worst flow is that it is possible to lose tokens if the tokens are sent to smart contracts that don’t support token receiving and handling. An estimated 3 million worth of token were lost up by December 2017.

To solve this issue ERC-223 was proposed. This Token standard has the following benefits.

  1.  It addresses the design flaw of allowing user to transfer tokens to smart contracts that don’t support them
  2. Improves the efficiency by making transfer of token into less steps and therefore consuming less gas.

 ERC-721 . ERC-721 describes the implementation of a non-fungible token. A token can be worth a different value than other token that it is being exchanged on the same network. This type of token became famous after the Ethereum based game CrytoKitties

 Each kitten has a different desirability and rarity which means a different token value. This standard is very interesting as it allows trade of items that have different attributes. A clear example is artwork or services like electricity which have different values depending on time or origin (like solar, grid, etc)

The full list of ERC’s can be accessed for the following link.

Hope you liked this article. Feel free to add me on Linkedin here or contact me on email on [email protected]

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Our website uses cookies that help it to function, allow us to analyze how you interact with it, and help us to improve its performance. By using our website you agree by our Terms and Conditions and Privacy Policy.