What is ERC-20 and how does it work?
How important is the ERC-20 token standard cannot be explained in words. ERC-20 has a number of rules to which Ethereum based tokens are linked. With these rules, ERC-20 provides wallet developers, exchanges and other smart contracts with the ability to predetermine how to use new tokens.
In this way, applications can be designed and things can be done out of the ordinary with tokens. When a new token is entered into the system, the wheel does not need to be reinvented.
As a result, all tokens on the Ethereum Blockchain are compliant with the ERC-20 standard, including those sold at ICOs. For example, high volume traded in the markets; Tokens such as Golem, Gnosis, Iconomi, Augur and DigixDAO are among the most important examples of this system.
What is Token?
First of all, it is useful to examine the questions such as what is the token and what is the difference of the token's Ethereum Blockchain from the currency of Ether.
Tokens in the Ethereum network are digital assets that can represent many things, from loyalty points to gift vouchers, securities to real objects in the physical world. Tokens are also a tool for interacting with other smart contracts. For example, in-game objects.
Let's just start over: tokens are smart contracts that run on the Ethereum Blockchain. It therefore works with a number of codes (functions) and associated databases. While the codes describe how the token will work, the databases are basically tables consisting of rows and columns that keep track of who has how many tokens. The code updates the database when a smart contract in Ethereum or a user sends a 'transaction' message to that token's contract.
For example, when a wallet application sends a message to that token's contract to transfer funds from Alice to Bob, the following happens:
First, the token's contract checks to see if Alice has signed the message and has enough money to make the payment. In the next step, he transfers the fund from Alice's account in the database to Bob's account. Finally, it informs that the transaction has been completed successfully.
Unlike tokens, Ether is embedded in the Ethereum Blockchain. It can be sold as cryptocurrencies, traded and strengthens the ethereum network by allowing users to pay smart contract transaction fees. (All calculations in the Ethereum network have a fee.)
For example, when you send a token (hence the request to update the database to the token's contract) to a stock exchange, you pay the fee in Ether for that transaction. This fee goes to the miner who confirmed the transaction on the block, which will later be added to the Blockchain. When Ethereum first came out, standards were part of the basic plan and were developed to create a user-friendly, easy-access system.
However, like all standards, ERC-20 needed time to evolve as a result of a series of long discussions and detailed evaluations. Ethereum founder Vitalik Buterin introduced the first standard token before DevCon1, the first major Ethereum conference held in 2015.
Fabian Vogelsteller, one of the developers working on Ethereum's Mist wallet in late 2015, took that standard and made a few changes over it. Vogelsteller later introduced the standard to the Ethereum community under the name ERC-20 to start a discussion on how the standard could be applied to the system.
Later, the ERC-20 standard was opened for discussion on GitHub due to changes made by the Ethereum foundation in the GitHub organization in April.