Understanding ERC Standards


I got an opportunity to take a closer look at ERC standards, analyze and compare them. I believe that the information below would be helpful for every investor and ICO entrepreneur to understand what exactly ERC standards are.
This article sheds light on tokens and explains the features and functions of ERC standards to provide an understanding of what token contracts are and how developers can work with them.
ERC stands for Ethereum Request for Comments. It describes the functions and events that an Ethereum token contract has to implement. It is authored by Ethereum community developers in the form of a memorandum describing methods, behaviors, research, or innovations applicable to the working of the Ethereum ecosystem. This is an official protocol for proposing improvements to the Ethereum network. After core developers and community approval, the proposal becomes a standard.
The ERC standard defines an interface, which is the name of the functions as well as their signature. Signature means a list of their arguments. It also defines what these functions should do. But it does not define how you implement it and thus it does not include any code.

1.     ERC-20


The Ethereum token standard (ERC20) is used for Ethereum smart contracts. Developed in 2015, ERC20 defines a common list of rules that an Ethereum token has to implement. Giving developers the ability to program how new tokens will function within the Ethereum ecosystem. This token protocol became popular with crowdfunding companies via initial coin offering (ICO). All Smart Contracts implementing this standard, by default can be listed to crypto exchanges without any extra technical work. As of January 2018, there were more than 21,000 ERC20 token contracts. 

The ERC20 Token Standard Interface

Following is an interface contract declaring the required functions and events to meet the ERC20 standard:
 1 // -----------------------------------------------------------------
 2 // ERC Token Standard #20 Interface
 4 // -----------------------------------------------------------------
 5 contract ERC20Interface {
 6     function totalSupply() public constant returns (uint);
 7     function balanceOf(address tokenOwner) public constant returns (uint balance);
 8     function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
 9     function transfer(address to, uint tokens) public returns (bool success);
10     function approve(address spender, uint tokens) public returns (bool success);
11     function transferFrom(address from, address to, uint tokens) public returns (bool success);
12
13     event Transfer(address indexed from, address indexed to, uint tokens);
14     event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
15 }
Most of the major tokens on the Ethereum blockchain are ERC20-compliant.
Some of the tokens include further information describing the token contract:
1     string public constant name = "Token_Name";2     string public constant symbol = "SYMBOL";3     uint8 public constant decimals = 18;  // 18 is the most common number of decimal places
All ERC20 tokens transact on the same network that your Ethereum wallet uses. Hence, an ETH address is also a GNT address, is also an EOS address, and so forth.

2.     ERC-721

The new game recently made several headlines within the cryptocurrency community because of its extremely unique based on the Ethereum network. CryptoKitties is a game in which players can buy, sell, trade, and breed digital cats. They can be thought of as “breedable Beanie Babies” in that each cat is unique (non-fungible) in some way. This uniqueness makes the CryptoKitties extremely collectible.



Kitty #489429 price=6.8816 ETH                    Kitty #58177 price=100000 ETH


We can emulate rare, collectible items with Ethereum tokens, and each of these tokens follows a novel standard in the Ethereum community known as ERC721 which are called ‘non-fungible’ i.e. unique tokens.  ERC721 is an Ethereum Improvement Proposal introduced by Dieter Shirley in late 2017.
In terms of collectible items, two items in a collection are not fungible if they have different characteristics. For physical coins, a gold coin is not fungible with a copper coin, because their differing characteristics give them different values to collectors.

The ERC721 Token Standard Interface

Following is an interface contract declaring the required functions and events to meet the ERC721 standard:
 1 // -----------------------------------------------------------------
 2 // ERC Token Standard #721 Interface
 4 // -----------------------------------------------------------------
 5 contract ERC20Interface {
 6  function name() constant returns (string name);
 7  function symbol() constant returns (string symbol);
 8  function balanceOf(address _owner) constant returns (uint balance);
 9   // Functions that define ownership
10  function ownerOf(uint256 _tokenId) constant returns (address owner);
11  function approve(address _to, uint256 _tokenId);
12  function takeOwnership(uint256 _tokenId);
13  function transfer(address _to, uint256 _tokenId);
14  function tokenOfOwnerByIndex(address _owner, uint256 _index) constant returns (uint tokenId);
15   // Token metadata
16  function tokenMetadata(uint256 _tokenId) constant returns (string infoUrl);
17   // events
18   event Transfer(address indexed _from, address indexed _to, uint256 _tokenId);
19   event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId);
20 }

3.     ERC-827

ERC827 is one of the latest token standards and improvements to ERC20 on the Ethereum network. In the current ERC20 model, only value can be transferred. However, by using ERC827, Ethereum users can transfer value as well as data in the transaction. The data is sent in bytes format.

 1 // -----------------------------------------------------------------
 2 // ERC Token Standard #827 Interface
 4 // -----------------------------------------------------------------
 5 contract ERC827Interface {
 6   function approve(address _spender, uint256 _value, bytes _data) public returns (bool);
 7   function transfer(address _to, uint256 _value, bytes _data) public returns (bool);
 8   function transferFrom(address _from, address _to, uint256 _value, bytes _data) public returns (bool);
 9   }

4.     ERC-223

ERC223 is a modification of ERC20 token standard. This proposal was introduced by a developer, who decided to solve issues with the current ERC-20 standard for tokens. Below I excluded main features of this proposed standard.

Advantages:

  • Provides a possibility to avoid accidentally lost tokens inside contracts that are not designed to work with sent tokens.
  • Transfer to contracts consumes less gas than ERC-20: The transfer of ERC223 tokens to a contract is a one-step process rather than 2 step process (for ERC20)
  • Allows developers to handle incoming token transactions, and reject non-supported tokens (not possible with ERC20)

Disadvantages and risks:

  •  ERC-223 is a proposal right now, not a standard. Therefore, there are none of the high-profile ICO tokens deployed with this standard. Also, it is not yet implemented in any production   tokens that I found from my research.
  •  Exchanges may need to do some modifications in order to support such token. There is a chance that some of the exchanges might not be prepared for it yet.


The benefits that this standard brings are not that high compared to risks of using unofficial token interface, which is not yet accepted by Ethereum foundation and is not a standard.

5.     ERC-190

The ERC190 standard proposes a specification for Ethereum smart contract packages.
Packaging is a core piece of modern software development which is missing from the Ethereum ecosystem. The lack of packaging limits the ability for developers to reuse code which negatively affects productivity and security.

I hope that it would be helpful for you to understand some basic knowledge of the popular token standards circulating within the Ethereum community.








Comments

  1. One of the interesting innovation on Crypto are Dapps. A decentralized application is an application run by many users on a decentralized network with trustless protocols.

    I would also like to mention Dapp.com

    Dapp.com is the largest dedicated platform for sharing exciting dapps and valuable knowledge about decentralized technology.

    Dapp.com help everyone understand, create, and enjoy this exciting new technology with enthusiasm.

    Allow me to share their telegram channel too. t.me/dapp_com

    Thank you!

    ReplyDelete
    Replies
    1. I totally agree! Also check this out!

      Imperial Throne is a multi-player strategy war game based on the Ethereum. Presale already launched last Dec.3rd, 2018. For this special occasion, Imperial Throne provided Dapp.com community with Alpha Test Access & Exclusive Giveaway from Dec.6th - Dec.17th. Full competition details here ➡️ https://bit.ly/2SuEUcP

      Dapp.com has also set in a whimsical food world with a group of lovable and tiny creatures called #Yummies.

      “Yummie" are cute animals made from food-related items. The first three races to be introduced are Bunny, Salamander and Unicorn. Each race will have its own strengths and weaknesses, so players will want to have a diverse team of Yummies to be successful in their adventures. Full presale details here ➡️ http://bit.ly/2UbmTln

      I have already checked their website at Dapp.com and joined also their official telegram at https://t.me/dapp_com

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. A very interesting article! My interest about cryptocurrency increases more! Please allow me also to introduce the Dapp.com. The largest platform for sharing exciting dapps and valuable knowledge about decentralized technology.

    Have you also heard “ A table Yummies Presale?”
    à table! is the French equivalent of “Come eat!”. à table! is a browser-based exploration game combining two of everyone’s favourites - animals and food. “Yummy” is an original cute animal made of food-related items, represented by an ERC-721 token. More info here ▶️ bit.ly/2UbmTln

    Please visit website at Dapp.com and kindly join official telegram at https://t.me/dapp_com

    ReplyDelete
  4. Decentralized applications (dApps) are digital applications or programs that exist and run on a blockchain or P2P network of computers instead of a single computer, and are outside the purview and control of a single authority

    Here is the example of dApps, Imperial Throne's Alpha Test Access & Exclusive Giveaway. Just click the link below;
    https://www.dapp.com/article/imperial-throne-exclusive-giveaway

    For more information visit our website Dapp.com and join our telegram group https://t.me/dapp_com for further discussions.

    ReplyDelete
  5. Decentralized applications (dApps) are digital applications or programs that exist and run on a blockchain or P2P network of computers instead of a single computer, and are outside the purview and control of a single authority

    Here is the example of dApps, Imperial Throne's Alpha Test Access & Exclusive Giveaway. Just click the link below;
    https://www.dapp.com/article/imperial-throne-exclusive-giveaway

    For more information visit our website https://Dapp.com and join our telegram group https://t.me/dapp_com for further discussions.

    ReplyDelete
  6. Get to know more about dapps . If you are interested please check our dapps team .

    We help developers and blockchain companies reach a large scale of users while providing a community-based platform that allows users to browse, play and review dapps developed on any blockchain ecosystems. Our mission is to speed up mainstream adoption

    Dapp.com

    ReplyDelete
  7. Ready for this holiday season? Check out the 2 ongoing giveaways on our site!

    1. Imperial Throne's Alpha Test Access & Exclusive Giveaway #heimdallwithdapp_com >>https://bit.ly/2SuEUcP
    2. Will You Be http://Dapp.com 's Neighbor on HODL Street? #HodlwithDapp >>https://bit.ly/2Em3rge

    Btw, something big is brewing at Dapp.com! Stay tuned!

    Website: https://www.Dapp.com
    Telegram: https://t.me/dapp_com

    ReplyDelete
  8. BingoBet BINGO Tokens Airdrop with https://Dapp.com

    Get your free tokens on BingoBet! 1000 free tokens for eligible participants!

    From December 17th to December 23rd, the first 2,000 participants will be able to get 1,000 BINGO tokens each!

    https://www.dapp.com/article/bingo-bet-bingo-tokens-airdrop

    https://t.me/dappp_com

    ReplyDelete
  9. We are excited to announce the release of the Q3 2018 Dapp Market Report for download(http://bit.ly/2TlHPpz ). The report provides updated views of key metrics in dapps and in-depth analyses of the trends in #ethereum & #EOS dapp market. @TechCrunchCN>>http://bit.ly/2DKjN2R
    To know more information, visit us @ Dapp.com and follow the latest news and updates about us on https://t.me/dapp_com

    ReplyDelete
  10. Great news! But you know…EOS ecosystem in Q3 - 70 active #dapps, and over 60,000,000 EOS transaction volume for a 4-month-old blockchain. However, the total scale of EOS users is highly limited by its complicated account setup. Full 2018 Q3 Dapp Market Report for Download (http://bit.ly/2Fx69llThe )
    To know more information, visit us @ Dapp.com and follow the latest news and updates about us on https://t.me/dapp_com

    ReplyDelete

Post a Comment

Popular posts from this blog

Creating a Private Token with Hyperledger

Main net, Test net and Private net in Ethereum

Applications of R3's Corda

Working with Ethereum

Consensus Protocols in Blockchain

Blockchain and Its Evolution

Types of Blockchain Technology

Blockchain Technology Categories