Cryptocurrency Exchange

New Ethereum ERC777 Token Standard May Replace ERC20 Standard

New Ethereum ERC777 Token Standard May Replace ERC20 Standard

New Ethereum ERC777 Token Standard May Replace ERC20 Standard

The new ERC777 Ethereum blockchain token standard, being developed by Jordi Bailina, Jacques Dufflon and Thomas Shababi and potentially replacing the currently widely used ERC20 standard, is preparing for launch.

The ERC777 implementation proposal was published on November 20, 2017 and has remained open to feedback and criticism ever since. Last week, Bailina and Dufflon talked about the new tokens at DappCon, publicly describing the benefits and functionality of the standard. At the end of his speech, Baylina said that in the near future the standard will enter the last stage of development and will be presented in August. Its further fate will depend on the will of users and developers, who will be able to introduce new tokens at their own discretion..

The creators advertise the ERC777 standard as a more flexible alternative to ERC20 and claim that it will allow for faster and more streamlined transactions. ERC777 will maintain backward compatibility with ERC20, which may also be of interest to developers. While the Ethereum ecosystem’s token standards are many and varied, ERC777 enjoys particular community support, ETHNews notes..

The standard uses open source, which can be viewed on GitHub.

More intuitive interaction with contracts

The Ethereum Improvement Proposal (EIP) for ERC777 describes how the function is implemented “send” (it is also used to send ether), which allows direct transactions and exchanges through smart contracts. The use of this function distinguishes ERC777 tokens from ERC20 tokens, which work through the function “transfer” and require the execution of two transactions to exchange one token for another. The first transaction, when working with the ERC20 standard, sends a request for approval, the second – allows the contract to perform a token transfer on your behalf.

The ERC777 standard works on a different principle. Using function “send” The ERC777 token refers to an ownerless universal trusted contract – ERC820 – which is essentially a ledger telling the token if the contract it is accessing is compliant. If the contract is not compatible or registered, the transaction will be rejected. In this case, the sender will be able to refer to the ERC20 token model and request approval. It is enough to register a contract or address only once in the ERC820-contract – after that it will be available to all users of the system.

Using hooks

Another advantage of ERC777 over ERC20 is the ability to use so-called hooks. As Bailina explained at DappCon, “Hooks are functions that can be called during a transfer.” In other words, the hook defines the parameters of the transaction. Among other things, he may request that a notification be sent to the sender or recipient before or after the transaction is completed..

Moreover, the ERC777 token contract can be designed in such a way as to control the behavior of the token in certain conditions of the transaction, or to allow the sender or receiver to interfere with the transaction process. For example, a hook can force a contract to notify the sender before submitting a transaction, allowing him to cancel it. Similarly, parameters can be set to block specific addresses or types of tokens..

Hooks can also determine how the recipient will dispose of the tokens transferred to him. For example, as Bailina explained, the contract may set a certain percentage that will be donated to charity with each transaction..

Hooks also depend on the aforementioned ERC820 contract. For example, if a token contract is written in such a way as to reject accepting tokens with a certain function, it will refer to the ERC820 contract to find out if the named function is present in the token passed to it. If the transferred token is not included in the ERC820 contract, the transaction will be rejected. In this case, the sender will have to transfer their token using the ERC20 model, that is, using two transactions. Thus, ERC777 supports all the functionality of ERC20, so even limited distribution of the standard in the early stages does not prevent its use. Backward compatibility allows developers to migrate to the new standard with a relatively low degree of risk.

Debugged operators

Another major difference between ERC777 and ERC20 is the ability to use operators. As explained in the EIP, “an operator is an address that is allowed to transfer and burn tokens on behalf of another address.” The operator can be set by the token holder and be the address of the contract or the regular address. It can be turned off at any time.

This allows for a number of functions, including automatic payments. As an example, Baylina named the possibility of regular payment for subscriptions or transfer of tokens from a cold wallet to a hot one..

ERC777 also allows you to define “default statements”. According to the EIP, “such operators are established for all token holders.” Bailina explained that the default operators can be used, for example, to automatically deduct the cost of gas, which will simplify the process of sending a transaction. Although the default operator applies to all users at the time of its creation, the token holder can revoke authorization at any time. However, it is not clear how users who are not aware of the presence of this function will find out about the operator, which raises questions about the safety and ethics of its use..

Similar articles

Similar articles