What Is An ERC20 Token?
The ERC-20 tokens are those tokens which follows the ERC20 Token protocols. The ERC20 token protocol is a standard set of programming “rules”, laid down by the Ethereum community that all Ethereum-based token are expected to follow. ERC stands for Ethereum Request for Comment, and 20 is the number that was assigned to this request. ERC-20 tokens are the crypto tokens designed and used solely on the Ethereum platform.
To understand ERC20 Tokens further in detail, one must know about the following concepts:-
- Ethereum Blockchain
- Decentralized Applications (DApps)
- Smart Contracts, and
- Initial Coin Offerings (ICO)
We have already covered the above topics in detail, so I won’t be discussing it again. However, to make you understand what are ERC20 tokens, here is a short re-cap.
What is Ethereum?
- Blockchain that can record transactions, and
- A virtual machine that can produce smart contracts.
Ethereum is able to support creation and running of decentralized applications (DApps). These DApps are built on the existing Ethereum blockchain which utilises Ethereum’s own netwrok. In exchange, Ethereum network charges some fees from the developers, in the form of Ether (ETH) for the computing power. Ether is the native token of Ethereum Blockchain.
What are DApps?
Decentralized applications or dApps are kind of application where the whole backend process takes place on the decentralized peer-to-peer distributed network called “Blockchain”. Maximum number of Internet-based applications or apps are centralized. Thus the servers of those applications are operated by a particular organization or individual operator. It means that these organizations or individual operator can actually have full control over the user information, and a single breach in the server can crate of array security & operating errors. Few of the primary concerns with centralized applications are:
- The existence of a single point of failure,
- Lack of transparency,
- Monarchy, and
- Subjected to net censorship.
Rising tide of these concerns pushed the developers to build a new form of applications which operates on the decentralized peer-to-peer network and hence name “Decentralized Application” or, in short, “dApps”.
What is Smart Contract?
A smart contract is a computer protocol created to digitally facilitate, verify, or enforce the negotiation or performance of a contract. Smart contracts allow the performance and execution of credible transactions without involvement of any third party. These transactions are trackable and irreversible.
Smart contracts are used to create ERC-20 tokens. Because of smart contracts, the execution of transfers of tokens takes place, Smart contracts are written in the programming language “Solidity” on the basis of If-This-Then-That (IFTTT) logic.
What is Initial Coin Offer? What is an ICO?
Initial Coin Offering or ICO is a process by which early age cryptocurrency/blockchain startups raises funds in order for further development of the cryptocurrency. Those who wishes to support and contribute to the development of cryptocurrency project provides funds and in return get’s a percentage of share in the total number of cryptocurrency/coins/tokens.
What is Ether?
Ether is the native token of Ethereum Blockchain and is used:
- To host dApps and smart contracts on Ethereum’s network,
- To execute Smart Contracts transaction, and
- As a fuel to execute/carry all the transactions on Ethereum Network.
As, each DApp has it’s own purpose of creation, thus it requires it’s own native currency which is used to carry out the transactions in the particular DApp network. This currency is simply, the tokens built on Ethereum Blockchain which are used in the execution of smart contract transactions as well as sold in Initial Coin Offers to raise funds for the development of the project.
As the adoption of blockchain technology with integration of smart contracts is increasing day by day worldwide. Thousands of new dApps are being created on daily basis. These dApps comes up with their own tokens, thus creating thousands of new tokens. Each tokens has their own purpose and makes it different from each other. Each token has their own programming rules and as a result we get thousands of new tokens with different rules. As a result, each cryptocurrency exchange and wallet had to do development in order to support these tokens. This can be a cumbersome process as for each new token, the cryptocurrency exchange and wallet had to do programming.
ERC-20 Token protocol is simply a list of standard rules and procedures that needs to be followed so that they can be shared, exchanged for other tokens, or transferred to a crypto-wallet. This makes it easy for cryptocurrency exchanges and wallets as they do not need to develop the support of thousands of new tokens with different set of rules and programmes but just one i.e ERC20 Token.
ERC-20 also makes the creation of new tokens extremely easy, and that is why Ethereum has become the most popular platform for ICO’s in 2017.
Solidity- Ethereum’s Smart Contract Programming Language To Develop ERC20 Tokens
Most popular Ethereum client is currently written in Google’s GO. Although, the developers has various choices for creating smart contracts, such as:- the choices for a developer-friendly smart contract language are plentiful. Developers can choose from languages such as
In this article, we will be explaining about ERC20 Tokens in relation with Solidity language as it is the most preferred language to develop Smart Contracts and ERC 20 tokens on Ethereum Blockchain.
ERC-20 Token Protocol
ERC-20 protocol was proposed on November 19, 2015 by Fabian Vogelsteller. As mentioned above as well, ERC-20 Token Protocol are general set of rules and standards created by Ethereum Community that the developers must follow in order to make their token Ethereum ERC-20 compliant. The set of rules contains:-
- 3 Optional Functions
- 6 Executable and Mandatory Functions, and
- 2 Logging Events
Optional Functions In ERC-20 Protocol
- Token Name
- Decimal (up to 18)- It means that the token can be divisible upto 18 decimal places. In case, the developer does not want his/her tokens to be divisible, the decimal can be set to 0
Mandatory Functions In ERC-20 Protocol
Following are the 6 executable mandatory functions which are the part of general set of rules of the ERC-20 protocol that developers must follow in order to make their tokens, ERC-20 compliant:-
[totalSupply] function is used to limit the total number of ERC-20 tokens to be created in Smart Contract. When this limit is reached, the Smart contract will refuse to create the new tokens.
[balanceOf] function helps to let us know how many tokens a given address has in its account.
[transfer] function is used to transfer the certain number of tokens from total supply of Smart contract to a user account.
[approve] function checks the transaction against the total supply of tokens. Thus, the number of transfer tokens cannot exceed the number of tokens in the total supply of smart contract.
[transferFrom] is the function that allows a user to transfer tokens to another user.
[allowance] function checks the balance of the user’s account and will cancel the transaction if there are insufficient tokens.Thus, the number of TransferFrom tokens cannot exceed the total number of tokens in the user’s account.
Events format in ERC-20 Protocol
- Transfer (address indexed _from, address indexed _to, uint256 _value). [Triggered when tokens are transferred.]
- Approval (address indexed _owner, address indexed _spender, uint256 _value) [Triggered whenever approve(address _spender, uint256 _value) is called.]
Application Of ERC20 Token Protocol
As of September 22 2018, there are 120,883 ERC-20 token contracts according to “https://etherscan.io/tokens” target=”_blank” rel=”nofollow noopener noreferrer”>Etherscan. Some of the examples of ERC-20 Tokens are:
- Zilliqa (ZIL),
- Power Ledger (POWR),
- WePower (WPR),
- Restart Energy (MWAT),
- Dent Coin (DENT),
- DragonChain (DRGN),
- Nucleus Vision (NCASH), and many more
Each of the above mentioned are ERC20 Tokens built on Ethereum Blockchain created to fulfil their own purpose.
Advantages of ERC-20 Tokens | Benefits Of ERC20 Tokens
As stated earlier as well, ERC-20 makes everything simple. ERC-20 lays down universal standards which can be adopted while creating new tokens. ERC-20 compliant tokens are be easily listed on cryptocurrency exchanges these days as well as they are easily transferrable.
Also, ERC-20 makes the creation of new tokens very easy.
Problems With ERC-20
One thing constant in this modern era of technology is “Change”. The technology is changing everyday to fit the present and future requirements, thus making old technology obsolete. Though, ERC-20 did bought huge changes in the crypto world and is the most preferred while creating new tokens, still ERC-20 is not perfect.There are some issues that the ERC-20 token standards that needs to be addressed.
In some situations, tokens are tokens might be unintentionally destroyed when they are used as payment for a smart contract. An “https://github.com/Dexaran/ERC223-token-standard” target=”_blank” rel=”nofollow noopener noreferrer”>estimated $3 million has been lost because of this.To fix this bug, the Ethereum community is currently working on a new standardnamed “https://medium.com/cryptomover/what-are-erc20-and-erc223-tokens-307badcca5a” target=”_blank” rel=”nofollow noopener noreferrer”>ERC-223.
KryptoMoney.com publishes latest news and updates about Bitcoin, Cryptocurrencies, Blockchain Technology and Upcoming ICO’s. Join our