The use of this site and the content contained therein is governed by the Terms of Use. When you use this site you acknowledge that you have read the Terms of Use and that you accept and will be bound by the terms hereof and such terms as may be modified from time to time.
All text, graphics, audio, design and other works on the site are the copyrighted works of nasscom unless otherwise indicated. All rights reserved.
Content on the site is for personal use only and may be downloaded provided the material is kept intact and there is no violation of the copyrights, trademarks, and other proprietary rights. Any alteration of the material or use of the material contained in the site for any other purpose is a violation of the copyright of nasscom and / or its affiliates or associates or of its third-party information providers. This material cannot be copied, reproduced, republished, uploaded, posted, transmitted or distributed in any way for non-personal use without obtaining the prior permission from nasscom.
The nasscom Members login is for the reference of only registered nasscom Member Companies.
nasscom reserves the right to modify the terms of use of any service without any liability. nasscom reserves the right to take all measures necessary to prevent access to any service or termination of service if the terms of use are not complied with or are contravened or there is any violation of copyright, trademark or other proprietary right.
From time to time nasscom may supplement these terms of use with additional terms pertaining to specific content (additional terms). Such additional terms are hereby incorporated by reference into these Terms of Use.
Disclaimer
The Company information provided on the nasscom web site is as per data collected by companies. nasscom is not liable on the authenticity of such data.
nasscom has exercised due diligence in checking the correctness and authenticity of the information contained in the site, but nasscom or any of its affiliates or associates or employees shall not be in any way responsible for any loss or damage that may arise to any person from any inadvertent error in the information contained in this site. The information from or through this site is provided "as is" and all warranties express or implied of any kind, regarding any matter pertaining to any service or channel, including without limitation the implied warranties of merchantability, fitness for a particular purpose, and non-infringement are disclaimed. nasscom and its affiliates and associates shall not be liable, at any time, for any failure of performance, error, omission, interruption, deletion, defect, delay in operation or transmission, computer virus, communications line failure, theft or destruction or unauthorised access to, alteration of, or use of information contained on the site. No representations, warranties or guarantees whatsoever are made as to the accuracy, adequacy, reliability, completeness, suitability or applicability of the information to a particular situation.
nasscom or its affiliates or associates or its employees do not provide any judgments or warranty in respect of the authenticity or correctness of the content of other services or sites to which links are provided. A link to another service or site is not an endorsement of any products or services on such site or the site.
The content provided is for information purposes alone and does not substitute for specific advice whether investment, legal, taxation or otherwise. nasscom disclaims all liability for damages caused by use of content on the site.
All responsibility and liability for any damages caused by downloading of any data is disclaimed.
nasscom reserves the right to modify, suspend / cancel, or discontinue any or all sections, or service at any time without notice.
For any grievances under the Information Technology Act 2000, please get in touch with Grievance Officer, Mr. Anirban Mandal at data-query@nasscom.in.
In the last few years, Bored Apes Yacht Club, CryptoPunks, and many other tokens have popularised Non-fungible tokens. But what are these tokens anyway?
In this writeup, we’ll be learning about the fundamentals of tokens, what are fungible & non-fungible tokens, what are the various token standards (ERC & EIP) developers must adhere to, and much more.
Why are Tokens and Coins Needed in Blockchain?
Tokens are essentially digital assets defined by smart contracts and built on a particular blockchain. Tokens are usually a faster way to leverage existing standards of a successful blockchain while building digital assets and they are often used to create smart contracts on dApps.
There are five major kinds of tokens, namely Reward tokens, currency tokens, utility tokens, security tokens, and asset tokens.
If you’re wondering how similar coins are to tokens, they’re drastically different, let me explain:
While ETH is the coin built by Ethereum on its own blockchain, Basic Attention Token (BAT), Bancor (BNT), OmiseGO (OMG) and others are tokens built on top of the Ethereum blockchain. That’s how coins are different from tokens.
What are Token Standards?
Now that the fundamentals of tokens are clear, let us understand what smart contract standards which are essential to comprehend token standards.
Smart contract standards are stipulations & rules a contract must adhere to function appropriately on the blockchain. Said standards are app-level specifications such as name registries, library-package formats, and token standards.
When developers adhere to the set smart contract standards of Ethereum, they can create their own ERC token, enabling the smart contract to perform basic functions.
Now that we know that token standards fall under smart contract standards, we can finally understand what token standards really mean.
Token standards are sets of rules, guidelines, and stipulations developers need to follow to create, issue and deploy tokens on blockchains that support smart contracts.
With that said, Ethereum is the most commonly used blockchain platform, and these are the various generations of standards developers have and must adhere to- ERC-20, ERC-721, ERC-777, and ERC-1155.
What are ERC and EIP Standards?
ERC (Ethereum Request for Comment) is technical documentation that dictates guidelines and rules for creating & deploying a smart contract on the Ethereum blockchain.
With that said, anyone can add or create a new ERC, but it is vetted by people’s votes and support known as EIP (Ethereum Improvement Proposal).
Under EIP, all network participants of Ethereum can see the improvement proposal and decide if it adds value and improves upon the existing ERC.
Once the Ethereum developers and community deems your improvement important, it will be accepted and implemented for everyone to take advantage of the new ERC standard.
Some of the commonly used ERC standards are:
ERC-20 Token Standard
The ERC-20 standard is predominantly used as the fundamental framework for building fungible tokens on the Ethereum blockchain.
Each fungible token or a fraction of said token holds equal value to another. For instance, a $10 bill in person A’s pocket holds the same value as a $10 bill in person B’s pocket, and it is said that this $10 bill is fungible. Essentially, all fiat currencies are fungible; the same goes for 10 ETH, which holds the same value as another 10 ETH.
Anyone can deploy a ERC-20 token and create custom token utility. It can be used for granting voting rights, reward network participants, and other on-chain activities. Majority of the big name tokens were first launched as ERC20. Stable coins like USDT, USDC, BUSD, governance tokens like MKR, UNI, or utility tokens like BAT- all are ERC20 compliant.
These are the six functions every ERC-20 token must implement:
TotalSupply(): The total supply number of ERC-20 tokens
BalanceOf(): The balance or the total number of tokens in a wallet
Transfer(): Enables transference of tokens from the caller’s account to another account
TransferFrom(): similar to transfer() but allows smart contracts to transfer tokens on the owner’s behalf
Approve(): sets a limit on the number of tokens a user is allowed to spend
Allowance(): the total number of tokens a user is allowed to spend on the owner’s behalf
Other than the above-mentioned functions, the optional functions that can improve the usability of ERC20 tokens are Token Name, Ticker Symbol, Decimals, and Divisibility.
The above functions form the foundation of an ERC-20 contract, as an extension, the foundation to build cryptocurrencies, stablecoins, utility tokens, and others.
ERC-721 Token Standard
Unlike ERC-20, ERC-721 is the token standard used to create non-fungible tokens, popularly known as NFTs, on the Ethereum blockchain.
NFTs are cryptographic tokens that are unique in nature and don’t share value with any other token similar to them. This means NFTs carry a unique value, like the painting of the Mona Lisa or other artwork that isn’t mass-produced. More details on the difference between Fungible and Non-fungible tokens are shared further down the article.
The basic ERC-721 functions are
BalanceOf(): The balance or the total number of tokens in a wallet
OwnerOf(): Owners TokenID
SafeTransferFrom(): Transfer tokens from the owner’s wallet to the receiver’s account.
TransferFrom(): similar to transfer() but usually not recommended
Approve(): triggers approval events
SetApprovalForAll(): enables the operator to call SafeTransferFrom
GetApproved(): gets the approval for the specific tokenID
IsApprovedForAll(): verifies if the operator has the authority to manage the assets of the owner
ERC-721 also contains functions like Transfer triggered when the owner of the NFT changes, and Approval which triggers when the approved address changes.
Cryptokitties, Beeples $69.3M worth NFT, Decentraland NFTS have used ERC721 standard.
What are Fungible and Non-fungible Tokens?
The fundamental way to describe fungible tokens is that no single token is worth more or less than the other. Fungible tokens are also divisible digital assets, meaning you can exchange these with the same type of assets, and the value would remain the same. For example, two dollar bills that hold the same value.
Whereas NFTs are a different story. NFTs are digital assets that can’t be exchanged because of their uniqueness. There is only one NFT of its kind; hence, it holds value due to its unique status. You can consider a rear painting by Vincent van Gogh or Rembrandt as examples.
The below graphic will make it easier to understand the difference between the two:
ERC-777 Token Standard
The ERC-777 is another fungible token standard created to resolve the limitations set by ERC-20. ERC-777 uses a mechanism called “Hooks” to make smart contracts more efficient in sending & receiving tokens.
The token is also backward compatible with ERC-20, rendering the latter obsolete. This means that fungible tokens created on ERC-20 freely interact with the ones built on ERC-777, as both use the same functionality.
Granularity(): the smallest portion of the token that isn’t divisible
Send(): sends a specific portion of tokens to recipients.
Burn(): kills a specific portion of tokens that reduces totalSupply
IsOperatorFor(): verifies if an account is operator
AuthorizeOperator(): turns an account into an operator
RevokeOperator(): revokes the account’s operator privileges
DefaultOperators(): returns lists of holders who are operators
TokensToSend(): triggered when tokens are about to be moved from a holder’s account or destroyed.
TokensReceived(): triggered when tokens are about to be moved to a holder’s account or destroyed.
This token standard has many security issues and susceptible to hacks. Instead of this, an updated version ERC820 can also be used.
ERC-1155 Token (Multi-Token) Standard
ERC-1155 basically addresses two pain points that persist in the previous iterations of token standards.
1. Support batch transfers of multiple assets in one smart contract.
2. Performs functions of both ERC-20 and ERC-721 token standards.
This means ERC-1155 can transact multiple tokens in a bundle or an infinite number of tokens, unlike ERC-721, which requires multiple transactions. The latter would not only congest the network but also cost significantly more gas fees.
ERC-1155 not only reduces gas fees and increases transaction speeds but also improves the functionalities of both its predecessors, being more efficient from all angles.
The best thing about ERC1155 is, you can create semifungible tokens with this standard. Semifungible tokens are a kind of token that can be used as a fungible token at the time of trading and becomes NFT if redeemed. It addresses the undivisibility factors of NFTs and make fraction selling possible.
The basic ERC1155 functions and features are as follows:
BalanceOfBatch(): returns the balance amount in a batch with IDs
SetApprovalForAll(): allows operators to transfer caller tokens
IsApprovedForAll(): verifies if the operator can transfer caller tokens
SafeTransferFrom(): transfers tokens from the caller’s address to the receiver’s address.
SafeBatchTransferFrom(): functions the same as the above SafeTransferFrom() except in batches.
Many of todays blockchain games are using this token standard. Adidas originals also used this standard for their NFTs.
Conclusion
Once you’ve decided to build a smart contract, the first step is to choose the kind of token that works best for you. After making up your mind about fungible or nonfungible tokens, you can either go for ERC-20 or ERC-777 or build a popular NFT on ERC-721. If none interest you, there is always ERC-1155, where you can build a hybrid contract.
Geniuses who proposed all these token standards had one thing in mind, making developers’ and business owners’ lives easier. We can pay homage to their genius by utilizing the token standards optimally.
About The Author
Dr. Ravi Chamria is co-founder CEO of Zeeve Inc, an Enterprise Blockchain company. He has an experience of 18+ years in IT consulting spanning across Fintech, InsureTech, Supply Chain and eCommerce. He is an executive MBA from IIM, Lucknow and a prolific speaker on emerging technologies like Blockchain, IoT and AI/ML.
Passionate About: Blockchain, Supply Chain Management, Digital Lending, Digital Payments, AI/ML, IoT
That the contents of third-party articles/blogs published here on the website, and the interpretation of all information in the article/blogs such as data, maps, numbers, opinions etc. displayed in the article/blogs and views or the opinions expressed within the content are solely of the author's; and do not reflect the opinions and beliefs of NASSCOM or its affiliates in any manner. NASSCOM does not take any liability w.r.t. content in any manner and will not be liable in any manner whatsoever for any kind of liability arising out of any act, error or omission. The contents of third-party article/blogs published, are provided solely as convenience; and the presence of these articles/blogs should not, under any circumstances, be considered as an endorsement of the contents by NASSCOM in any manner; and if you chose to access these articles/blogs , you do so at your own risk.
Zeeve is an enterprise-grade Blockchain Infrastructure Automation Platform. Join the growing list of clients that trust us with their Blockchain initiatives
Blockchain was touted as revolutionary technology in 2017 when it became clear that cryptocurrency wasn’t it’s only application. Now, its applications have more serious prospects than promised, and some people say it’s overhyped. However, it’s…
As countries around the globe work towards introducing their own cashless alternatives, many people are assuming that the use of cash will die down very soon. It is true that the last few years saw more and more use of mobile wallets and digital…
Web 3.0 is the next iteration of the World Wide Web, which aims to shift power from large corporations to individual users. Its main focus is on decentralization, transparency, and security. Web 3.0’s goal is not just about interpreting your…
Every business works with the goal of driving the growth of the company and bringing more revenue. But there are certain aspects that businesses are not able to handle. The “as-a-service” model targets both businesses and consumers. Further, it…
Web3 – The regulatory abeyance impact
Web3 – Explained
Web3 is a new version of the web built on blockchains which provides peer-to-peer and decentralized features shifting the data control towards the users and eventually abolishing platform /…
Blockchain as a Service (BaaS) - Blockchain
Blockchain as a Service (BaaS) is expected to play a major role in Information Technology (IT) in the coming years, there is no doubt about it. Blockchain as a Service has started to emerge exponentially…