Before we get to the Ethereum token standards, let’s talk about the fact that the vast majority of dApps are made on the Ethereum blockchain because of its simple and open-source platform giving its users more flexibility with the development.
But, since the blockchain industry is growing and developing at an astronomical rate problems inevitably arise. To tackle these problems some ground rules had to be made and they came in the form of token standards and smart contracts.
Smart contracts are designed to ensure blockchain decentralization – they are removing the administrative part of traditional contracts or, in other words, allowing for peer-to-peer interaction.
Simply said, a smart contract is an average contract but with strictly specified automated conditions and a set of rules that a smart contract must comply with, signed by the involved parties.
Token, simply explained, is a set of rules encoded in a smart contract that enforces a smart contract’s execution.
They are usually mixed with cryptocurrency coins, but they are not. The main difference between a cryptocurrency coin and the crypto token is:
- A cryptocurrency coin is a native currency of blockchain secured by cryptography and is used as a currency because they have an only monetary value.
- A token is a digital asset built upon the existing blockchain and has a wider range of functions like proof of ownership or is used to grant permissions to its users.
In that sense, ETH (the native currency of Ethereum) is both a currency coin and a currency token. Why? ETH is not limited to its monetary value like Bitcoin because of its standards implemented in the blockchain through the ERC tokens and smart contracts.
What are ERC standards?
ERC stands for Ethereum Request for Comment and represents Ethereum’s most important standards distinguishing Ethereum from other blockchains.
They are standardized sets of rules or application-level specifications for token development and how they can be used within the Ethereum blockchain.
But why are they so important? They are allowing users to develop applications and smart contracts that other users can communicate easily and predictably with.
Let’s take an example:
You have created a non-fungible token and you want to be able to sell it or trade it on the marketplace but the problem is, that other users can’t recognize and access the functions of your token.
They would have to create a completely different contract to be able to interact with your token.
ERC token standards are removing the need for separate smart contracts. Since they are entry-level rules and functions of a token. Depending on the standard used for a token, developers know how to interact with them.
ERC – how are they implemented?
As said above, Ethereum is an open-source platform, meaning that every user/developer can propose a new standard – that’s what Ethereum Request for Comment means.
If the proposed standard solves some important problem, then it can become the official ERC standard and can be found on EIP (Ethereum Improvement Proposals).
Types of ERC standards
Two main categories that ERC standards can be divided into are based on the interchangeability of the token or lack thereof.
Fungible tokens (interchangeable) are equal in value and they can be exchanged for the same one. The best example is fiat currency: a 100 USD bill will always be equal to a 100 USD bill no matter how old, or a 100 USD bill is equal in value to ten 10 USD bills.
Non-fungible tokens are one-of-a-kind tokens and can’t be replaced or exchanged for something else. For example brand new, fresh from the factory same model cars are fungible and their price is 150.000$.
But, after they are sold and used they become non-fungible because they can never have the same value as when they were brand new nor can they be replaced for the same one.
Mileage, customization, and repairs are what make them non-fungible and define their new value. Ethereum has many ERC standards, but here are some of the most important ones:
ERC-20 fungible token standard
ERC-20 is the most famous Ethereum token standard invented in 2015 by Vitalik Buterin. Why is it so important? Well, because its basic function is to enable token transfers and is allowing you to create new tokens upon Ethereum’s blockchain.
Before ERC-20 was implemented, there were many problems with interactions of different tokens on the blockchain, because you would need a new smart contract for every token you want to interact with.
Simply said, you would need to write brand new code for every token transaction you wanted. That required much more time and energy because you would be making a new blockchain every time.
Ethereum revolutionized this by introducing a standard protocol for all future tokens known as ECR-20. So, for every new smart contract (tokens are subsets of smart contracts), standards of ERC-20 must be implemented.
This helps other developers because it shows them how they can interact with your token
This also helped with fundraising for many start-ups: investors would receive tokens for their payments.
For the smart contract to be implemented there are ERC-20 mandatory functions that need to be obeyed:
- totalSupply – Returns the total token supply.
- balanceOf – Returns the number of tokens owned by the account.
- transfer – Transfer the agreed amount of tokens to the recipient.
- transferFrom – Automated transfer of the agreed amount of tokens to the recipient.
- approve – The owner of the contract sets the amount of the tokens allowing the spender to withdraw it from the owner’s account.
- allowance – Returns the amount that the spender is still allowed to withdraw from the owner’s account.
There are also optional functions like token name, token symbol, and a number of decimals.
ERC-721 non-fungible token standard
ERC-721 is a non-fungible token standard (NFT). After ERC-20 it is the most common standard in use.
What differentiates it from ERC-20? It allows you to transfer and track ownership of NFTs – it can be seen as tokenization of the ownership.
No matter how many ERC-20 tokens you buy they are all the same and hold the same value and can be exchanged for the same one.
ERC-721 tokens, each and every one are unique and hold different values because they are encoded with a unique set of data:
- data about the asset;
- data about the copyright’s holder (creator);
- user rights data;
- data about a purchase and future trading of the token;
- Royalty fees (not always) may be encoded. The creator gets a cut of the sale, every time an NFT is traded.
This allows holders to differentiate tokens from one another.
ERC-721 tokens require a minimum interface for the implementation of smart contracts for tokens to be traded, owned, or managed.
ERC-721 tokens (NFTs) are digital assets that can represent physical assets. Currently, the most popular NFTs are CryptoKitties, but gaming NFTs are gaining in popularity also and art NFTs in general.
ERC-721 standard created many possibilities for artists and creators allowing them actually to hold copyrights and to earn money directly.
ERC-777 token standard
ERC-777 token standard comes as an improvement of ERC-20 fixing its problems but keeping backward compatibility with it. It introduces advanced features for token interaction.
ERC-20 token standard for every transaction requires another one to verify it. ERC-777 does not require double transactions just for the sake of verification – verification is done after the first transaction.
One of the features ERC-777 brought is operators that can send tokens on the behalf of other addresses and vice versa, receive it and at the same time give holders more control over their tokens
Last but not least, it allows identification and rejection of the tokens from blacklisted addresses, this option strengthens the security of dApps on the Ethereum blockchain.
ERC-1155 Multi token standard
ERC-1155 multi-token standard solved the problem regarding the transfer of the different tokens. Transfer of ERC-20 or ERC-721 tokens requires separate smart contracts for every token. It is time and energy-consuming and creates lots of redundant bytecode.
ERC-1155 standard allows the transfer of different types of tokens under one smart contract. This means that you can manage and transfer fungible, non-fungible, and semi-fungible tokens under one contract, cutting the fees and saving time and energy.
This standard became immensely popular in the gaming community because they have a large number of different items and without ERC-1155 you’d have to make separate smart contracts for every item transaction.
ERC-223 token standard established by European Research
ERC-223 is not fully accepted as a digital token standard but it helps with some of the ERC-20 problems and it is backward compatible with it.
The main feature of the ERC-223 standard is that it fixes the ERC-20 problem regarding transferring the tokens to the wrong address. ERC-20 allows you to send tokens, but by mistake, you can send them to the smart contract address and not to the wallet, or the wrong wallet address. Once the transfer is done, there is no way of reversing it, so tokens are lost. More than 3.000.000$ were lost this way.
ERC-223 notifies the users of sending the tokens to the wrong address and cancels the transfer. This may help with the public acceptance of the blockchain technology and some argue that it may push aside ERC-20 when it’s officially accepted as a digital token standard.
ERC-725 identity standard
ERC-725 standard is not yet accepted because it is still developing. It offers an interesting feature of self-sovereign identity. What does it mean?
Instead of putting your digital identity and data in a centralized organization, you would be the one who owns it and be able to use it without the fear of data breaches and the sale of user data.
Implementation of ERC token standards made the Ethereum blockchain more available and appealing to developers. They are enabling Ethereum’s ecosystem to thrive and evolve with each ERC standard.
There are many ERC standards, but these are some of the most important ones and each of them can be seen on Ethereum’s EIP (Ethereum Improvement Proposals).
There, you can find explain, step by step, the process of their development. You can take a sneak peek at the standards that are still in the development phase and, if you want, you can participate.