Before I talk about ERC, let’s talk to you about smart contracts. The concept of smart contracts was first proposed by Nick Sabo in 1994. He defined: A smart contract is a computerized transaction agreement that enforces the terms of a contract.
The smart contract comes from the vending machine in life . When the customer invests money in the vending machine, the vending machine starts to work. And what about smart contracts? Take the smart contract in Ethereum as an example. Each smart contract in Ethereum has its own account, which is equivalent to a vending machine with its own ID. When an external account uses a certain tip to call the smart contract of your choice After that, it is equivalent to activating the automatic control switch, and the smart contract will be automatically executed according to its own code definition.
But unlike the vending machine, once the smart contract is created, its code cannot be changed , and the staff cannot open the door and put the goods in like a vending machine.
The immutable advantage of smart contracts makes it naturally applicable to the scenario of contract terms. It can effectively reduce malicious tampering and reduce manual intervention. For example, you can write a bank-like smart contract on Ethereum, and then people can deposit and withdraw money through this contract. In this way, there will be no balance imbalance caused by bank staff’s mistakes or malicious changes.
In fact, the money deposited in this “bank” smart contract is not necessarily a big pie (ETH), because the Ethereum smart contract also allows contract developers to define their own currency, which is the various Ethereum-based Tokens we know , Such as USDT, NBN, etc.
In this way, it seems that smart contracts provide people from all walks of life with a new idea. Everyone is wondering whether they can develop some new projects based on smart contracts and issue their own tokens? Smart contracts are certainly possible, but they must be carried out in accordance with the prescribed procedures. So in order to effectively prevent all kinds of miscellaneous tokens and data from appearing on the platform, it has its own set of standards.
02 ERC standard
The full name of ERC is “Ethereum Request for Comment”, which means the draft of the Ethereum version. ERC contains technical and organizational precautions and standards. This set of standards is actually not only proposed by the Ethereum official, but also by some Ethereum enthusiasts.
Taking the bank smart contract mentioned earlier as an example, it is not difficult to think that it will have the following functions and requirements:
- Need to record the balance of each customer;
- Need to have the function of transferring money, including depositing and withdrawing money;
- To ensure that each customer can check their own balance.
Thinking carefully about these functions and requirements, it seems that every “bank” contract needs to have, and it is also required for Token contracts. Therefore, in order to be more compatible with wallets and exchanges, Ethereum has issued ERC20 and ERC721 Such token protocol standards.
For example, Amaocoin and Amaocoin are issued based on the ERC20 standard, so they will provide users with some selection buttons (that is, the interface function is the same), these selection buttons are for users to check balance, transfer tokens, etc. However, Amaocoin, The ways of implementing functions such as checking balance and transferring tokens at the bottom of Argocoin can be different.
In addition to the Token contract that needs to be standardized, there are other ERC standards including but not limited to the design of data packets, the definition of some interfaces, and so on. Some of these standard protocols come from the Ethereum founding team, and some come from the proposals of Ethereum fans and contributors. In general, they are all in order to jointly create a better Ethereum environment.
Therefore, interested partners can also make their own proposals and make their own contributions based on some of the deficiencies in the Ethereum smart contract or the areas worthy of innovation.