What do ERCs do? Looking at ERC 20, ERC 721, and More!

dapp_com

Dapp.com

Posted on November 30, 2018

What do ERCs do? Looking at ERC 20, ERC 721, and More!

A Dappedia without an explanation about some ERCs would not be considered complete. We will explain the main ERCs that are used almost everytime we use a dapp on the Ethereum network—along with some of their lesser-known improvements. In the simplest of terms, when you read “ERC” you are likely reading about token-related functions on the Ethereum Network. For many, ERCs may seem like a terrifying task, so we tried to break down some of the most important ERCs that we see people reference when promoting their dapps.

ERC-20: Just a Coin?

On the Ethereum network, it is possible to exchange the cryptocurrency Ether freely. Ether is a cryptocurrency or coin that can be considered a token that may be used to make all kinds of transactions. Within the Ethereum network, there are other tokens that can be used based on the value of exchange between them and Ether. To implement another token on the Ethereum blockchain you have to set the code or technical standard in the Smart Contracts called ERC-20. The acronym “ERC” stands for “Ethereum Request for Comment” while “20” is the number of the request. In short, ERC-20 simply allows for a token to behave just like cryptocurrency on the market.

A simple example of a token using the ERC-20 can be seen in a popular dapp called Decentraland. In Decentraland, users can visit Genesis city, a virtual world where users can use the in-platform currency MANA to buy plots of land, pay for experiences, or trade NFTs (more about them later). ERC-20 essentially allows developers of dapps to apply their new token while giving them a monetary value. However, ERC-20 tokens need to respect clear guidelines for how the token can behave on the Ethereum network. Since most tokens adhere to the ERC-20 rules, dapp users can store these tokens in most wallets.

The system is, however, not perfect, for an attempt to send a token via the token's Smart Contract would result in a loss of the token. When a token is sent to another user's wallet, a request from the receiving wallet will be sent asking for the token's contract so that it can update the ledger. If you send a token via a token's Smart Contract the reply will turn out as null while the token you actually sent will just vanish into virtual thin air.

ERC-223 to the Rescue!

The Ethereum community did not just sit idly by and let the ERC-20 glitch simply linger around allowing tokens to vanish by accident. A lot of tokens were lost nonetheless, as more dapp projects implemented the ERC-20. Estimates vary, and losses are believed to range between (US) $700,000 to a million.

ERC-223 fixed the issue of ERC-20 losing tokens when sent directly with the token's smart contract, and it also created another benefit in the process. Essentially it allows tokens to be moved to another wallet with the Smart Contract all in one go. With this function, the wallet does not need the token's Smart Contract to update the ledger. A by-product of this new (would you say sexy?) function is that gas fees would be halved as there is only one function to be validated rather than two. Gas fees are micropayments that are needed to execute Smart Contracts or simple transactions—they constitute very small fees that are supposed to reward miners in the Ethereum Network.

Another Contender: ERC-777

Another solution for the ERC-20 bug was proposed on 20 November 2017 and presented to the community as “ERC-777.” Not only is this a solution to ERC-20 but like ERC-223 it came with its own benefits as well. ERC-777 takes the function of ERC-820, which allows everyone to see a Smart Contract’s address and check its functions, and uses it to verify the transactions or the actions requested. By changing the nature of the function from ERC-20's simple "transfer and confirm" to ERC-777's "send," it allows much more to be done with the token and the Smart Contract itself.

With these new features, the ERC-777 can check the nature of the action that is it is trying to execute and come to a conclusion as to whether or not the action is to be performed. Thus, in the case of a token transaction being sent the wrong way, the transaction will be nullified sending the tokens back to the original owner of the token. To make ERC-777 more interesting, it was designed to allow ERC-20 to upgrade easily to ERC-777. Unfortunately, however, ERC-777 was not adopted immediately by all projects that use ERC-20, and the general Ethereum Community's consensus is that it will eventually be implemented although it might take some more time.

ERC-721: Another Token?

ERC-721 is a token but it is a Non-Fungible Token or—as it is better known by the blockchain community—an NFT. The ERC-721 allows developers to create a token which cannot be shared between multiple owners and can contain stats and or features for each individual NFT created. Not surprisingly the ERC-721 function has been widely adopted by many dapp games who created NFTs that represent characters or items.

The perfect example of this is Etheremon, where each Etheremon is an NFT implementing ERC-721 functions. Players can trade their Etheremon with each other. No player can share a piece of the Etheremon; if it needs to be transferred from one owner to another, it must be transferred as a whole NFT. Meanwhile, in the game players can train and battle their Etheremons causing their Etheremons' stats to increase or decrease. In the case of the breeding feature in the game, whenever a new Etheremon is created, a new NFT is created in the Ethereum network and ownership automatically goes to the individual that requested the action.

ERC-721 essentially allows tokens to be made into collectibles that can be shared within the dapp as well as influence the creation of future NTFs. The supply of these NFTs can be infinite; however, most dapp projects limit the total supply in order not to devalue the NFTs. To make things more interesting, ERC-998 can work together with ERC-721, allowing players to transfer entire characters with all their stats, items, and even tokens, in one go.

Other ERCs

Over time we can expect more ERCs to come out to improve the Ethereum Network and make the Smart Contracts even smarter. There are a lot more ERCs that we have not discussed, and if you want to take a closer look at them you can visit the Ethereum Improvement Proposal website where they are all listed. Most proposals are very slow to be implemented in various projects as there is always the fear of implementing a new ERC and finding out that there is an unforeseen bug. In the case of ERC-20, the bug is known, making it easy for most developers to avoid the issue and implement it in the projects without any other unforeseen issues. As developers become more familiar with new ERCs we will also see better-functioning dapps that offer a better user experience.


https://www.dapp.com/article/what-do-ercs-do-looking-at-erc-20-erc-721-and-more

💖 💪 🙅 🚩
dapp_com
Dapp.com

Posted on November 30, 2018

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related