Trying to understand how Ethereum works requires a lot of research before everything makes sense, but learning its complex ins and outs is bound to broaden your understanding of how cryptocurrencies and blockchains work in general.
Ethereum is a decentralized platform that runs smart contracts written in the Solidity programming language and allows decentralized application (dApps) that runs on the network to be protected against downtime, censorship, fraud or third-party interference.
Every time a new application is added to the network, a new token can be created if no appropriate token exists. This process of tokenization abides by Ethereum's standards, so that various types of applications get tokenized according to their use case.
There are many Ethereum standards; today we are going to take a look at the ones you should be familiar with.
ERC-20 Standard
The ERC-20 standard is the most widely known and common among Ethereum token standards. It was first introduced about a year after the launch of Ethereum by Vitalik Buterin, the founder of Ethereum, with the help of his colleague Fabian Vogelsteller. Almost all of the major tokens on Ethereum blockchain are ERC-20 compliant. Status (SNT), OmiseGo (OMG), 0x (ZRX) are some examples of well-known ERC20 tokens.
The ERC-20 standard defines a set of six functions that the smart contracts within the Ethereum ecosystem use, including how tokens are transferred and how users can access data about a token. Below is a short description of each function:
- totalSupply() function - determines the total amount of tokens that will be created to be exchanged within a given project’s token economy.
- transfer() function - distributes tokens to user wallets in the initial distribution, for example in an ICO. A big reason for the popularity of ERC-20 tokens is the ease of sending investors their tokens after the ICO has been completed.
- transferFrom() function - enables token owners to exchange them with one another.
- balanceOf() function - keeps a record of the token balance in each user wallet.
- approve() function - guarantees the constant token supply within token's economy, it basically prevents users to create additional tokens out of thin air for their benefit.
- allowance() function - ensures that the transactions are valid before they are added to the blockchain. It checks sending address to verify if there are enough tokens to make a transaction, if there are not the transactions is not valid.
ERC-20 tokens are essentially smart contracts running on top of the Ethereum blockchain, however,they also act as digital assets that can represent a host of things in the Ethereum ecosystem. Token creators decide how their token interacts with their business and how the user interaction with tokens is handled.
ERC-223 Standard
The ERC-223 standard stands on the strong foundations built by ERC-20 standard, but even though the ERC-20 standard is very useful it has its flaws. One glaring design flaw of the ERC-20, which the ER-223 addresses, is that it made possible for users to lose their tokens when they are mistakenly sent to a smart contract instead to an appropriate wallet.
A big improvement has also been made in the efficiency of transferring tokens, as the ERC-223 tokens require only half the Gas (a unit that measures the amount of computational effort it takes to execute certain functions within the Ethereum network) compared to ERC-20 tokens they are essentially 50 percent cheaper to transfer.
The ERC-223 standard is backward compatible with ERC-20 and it might take over the former one as the most used standard in the future, but currently most Ethereum wallets still do not offer support for ERC-223 tokens, making adoption of the newer standard slower than anticipated.
ERC-721 Standard
An important concept of monetary supply is the fungibility, which means that any $10 bill must be treated the same and hold the same value as any other bill with the same denomination.
The main aspect of the ERC-721 standard in comparison to other ERC standards is the ability to develop non-fungible tokens (NFTs), which means that the tokens can hold different values when they are exchanged within the same ecosystem. This feature allows for the tokenization of conventional real-world individual assets, such as real estate, artwork, valuable historical items, etc. and opens the door for exciting solutions across different industries.
The ERC-721 standard might currently be most known for the Ethereum-based collectible game CryptoKitties, but promising new projects like 0xcert and 0x protocol already offer a glimpse in the future, where real-world assets will be tokenized and ownership of anything from music royalties to vintage wines will be transparently transfered using the Ethereum blockchain.
ERC-777 (and ERC-820) Standard
The ERC-777 standard is also backward compatible with the ERC-20, and like the ERC-223 standard it also eliminates the design flaw which is responsible for over $3 million in lost tokens because of send-tokens-to-contract-issue.
In addition, the ERC-777 standard uses advanced transaction handling mechanisms that just about every application on ERC-20 standard could benefit from. A feature that was established in the even newer ERC-820 standard the ERC-777 takes advantage off, is a central registry of smart contracts, which is created on the Ethereum network and allows anybody to examine the supported functions of a smart contract address. Like the ERC-223 standard it halves the transaction cost by employing a single "send" function, instead of "transfer" and "approve" functions of the ERC-20 standard.
The ERC-777 complaint tokens allow their token holders to authorize, or white-list operators who can manage their tokens on their behalf. There are various use cases for this kind of feature; certainly an appealing one is the ability to create an emergency recover function that can be activated in the event of the loss of your private key.
Given its improved handling of transactions and efficient solutions over the ERC-20 standard, the ERC-777 is a strong contender to take over the ERC-20 standard as the most widely used Ethereum token standard. Up until now its adoption has been slow and there are no well known projects that utilize the ERC-777, nonetheless there are certainly developers that will take advantage of its features in the coming years.