What are Token Standards? An Overview

in blockchain •  3 years ago 

Token standards are the set of rules that allow the development of cryptocurrency tokens on different blockchain protocols. But what exactly are they?

image.png

Token standards are the set of rules that allow the development of cryptocurrency tokens on different blockchain protocols. But what exactly are they? Here we take a deeper look into them, from the common standards on Ethereum, the most popular blockchain to launch tokens on, to a few others.

What are Token Standards?
Before getting to know the token standard, it is useful to understand what a smart contract standard is. Smart contract standards describe rules that the smart contract must comply with in order to utilise the underlying blockchain network. The standards are application-level for blockchains built for smart contract or other decentralised applications (dApps). Smart contract standards can include token standards, name registries, library/package formats, and more.

By defining standards, smart contracts must obey requirements in order to enable basic functions like creation of tokens, performing transactions, spending, and so on. Smart contract standards are important because they define rules of utilising the blockchain network and a good standard makes communication among different smart contracts in the same blockchain network efficient. In turn, the boom of smart contracts and their interoperability helped the development of the blockchain ecosystem.

Token standards are a subset of smart contract standards. For blockchain that support smart contracts, token standards are often included to tell people how to create, issue, and deploy new tokens based on their underlying blockchain.

Currently, the most commonly used blockchain for building smart contracts is Ethereum and it has developed different kinds of standards for supporting the varieties of smart contracts.

Let’s have a look at the most common token standards on Ethereum and their roles, followed by three other blockchain platforms that developed their own token standards.

Common Token Standards on Ethereum
Ethereum Request for Comment (ERC) describes application-level blueprints and conventions in the Ethereum ecosystem. This includes smart contract standards such as token standards (e.g. ERC20) and are usually accompanied by a reference implementation. ERC includes the rules that Ethereum-based tokens must comply with.

Common ERC standards define a required set of functions for a token type, allowing applications and smart contracts to interact with them in a predictable way. Here are some popular and important ERC token standards:

image.png

ERC20 Token Standard
ERC20 is the most commonly used standard for Ethereum-based tokens. It is a technical standard for tokens issued on the Ethereum blockchain, providing a list of rules that all Ethereum-based tokens must follow. The ERC-20 is a simple interface that allows for the creation of tokens on Ethereum that can be re-used by other applications like DeFi.

At the same time, ERC-20 is a fungible token standard, which means that each individual token (or fraction of a token) is equivalent to and indistinguishable from the next. For example, Alice’s $1 is equal to Bob’s $1, the USD is interchangeable with equal value. Fiat currency is fungible, and similarly, one bitcoin equals all other Bitcoins.

The ERC20 token standard has six primary functions that must be implemented to meet the standard, namely:
totalSupply() – Used to get the token supply of a specific ERC20 token.

balanceOf () – Keeps track of the token balance in each Ethereum wallet.

transfer() – Upon token creation, this function can send all the tokens to one wallet or distribute them to ICO investors.

transferFrom() – Enables token holders to exchange tokens with one another after the initial distribution occurs.

approve() – Used to “approve” other accounts to withdraw a certain amount of tokens from the account calling the function.

allowance() – After approve() is used, allowance() is used to see the amount of tokens the approved account is allowed to withdraw from the original account.

There are three simple optional functions for the ERC20: Token Name, Ticker Symbol (eg. ETH), and Adjust the Divisibility of the Token (how many decimal places your token will support).

What’s more, ERC20 was the token of choice for many initial coin offerings (ICOs) between 2016-2018, resulting in the ICO boom and is responsible for many of the altcoins we have today. The examples of ERC20 tokens include #ChainLink (LINK), #Dai (DAI), and #Basic Attention Token (BAT).

Please also note that the relationship between #ETH (ether) and ERC20. ETH is the native token of the Ethereum blockchain and it acts as the fuel of the network as each operation on the Ethereum blockchain needs to pay a corresponding amount of ‘gas’. Gas prices are denoted in small fractions of ether called gwei (1 gwei = 0.000000001 ETH). While ERC20 is the standard to obey in order to create applications (smart contract), the ERC20 token is serving as a currency for accessing the application.

ERC721 Token Standard
In contrast to ERC20 for fungible token standard, ERC721 is a token standard that defines non-fungible tokens (NFTs) on the #Ethereum blockchain. Non-fungible tokens, or NFTs, are a special type of cryptographic token: they are not mutually interchangeable by their individual specification. NFTs have individual characteristics that set them apart from one another, making them a medium to represent collectibles, game items, digital art, event tickets, domain names, and ownership records for physical assets.

image.png

One of the most popular NFT projects is #CryptoKitties, a game built on Ethereum blockchain in 2017 that allows users to buy, sell, and breed digital cats known as #CryptoKitties. Currently, the markets to trade NFTs include #OpenSea, #Crypto.com’s NFT Gallery, and #Rarible, among others.

The ERC721 token standard defines a minimum interface a smart contract must implement to allow crypto collectibles to be managed, owned, and traded.

ERC777 Token Standard

ERC-777 aims to address the limitations of ERC-20, while remaining backwards compatible. It defines advanced features to interact with tokens. Namely, operators can send tokens on behalf of another address and send/receive hooks to offer token holders more control over their tokens. Meanwhile, it also allows a user to reject incoming tokens from a blacklisted address.

ERC1155 Token Standard

Token standards like ERC20 and ERC721 require a separate contract to be deployed for each token type or collection. This places a lot of redundant byte code on the Ethereum blockchain and limits certain functionality by separating each token contract into its own permissioned address. With the rise of blockchain games that use NFTs as in-game items, the explosion of contracts would introduce performance and cost problems.

image.png

ERC1155 is a standard for contracts that manage multiple token types. With ERC1155, you can transfer multiple token types (like ERC20, ERC721) at once, saving on transaction costs. Trading of multiple tokens can be built on top of this standard and it removes the need to approve individual token contracts separately. It’s also easier to describe and mix multiple fungible or non-fungible token types in a single contract.

Token Standards for Other Blockchains

The types of smart contract protocols currently in use vary widely — essentially, everyone has their own rulebook. Apart from Ethereum, there are other blockchain projects that focus on the creation of smart contracts. In this part, we will introduce some popular projects with their corresponding token standards.

Token Standards for$EOS

image.png

The EOSIO blockchain platform is different from Ethereum. The core blockchain features, including consensus, fee schedules, account creation and modification, token economics, block producer registration, voting, multi-sig, etc. are implemented inside smart contracts deployed on the blockchain built on the EOSIO platform4.

Block.one (the development team of EOSIO) implements and maintains EOSIO open source platform which contains the system contracts encapsulating the base functionality for an EOSIO based blockchain.

The system contracts include eosio.bios, eosio.system, eosio.msig, eosio.token, and eosio.wrap to support the system’s basic functions. While Ethereum uses the ERC20 smart contract, EOS uses the eosio.token smart contract. It defines the structure and actions that allow users to create, issue, and manage tokens for the EOSIO blockchain. EOS tokens on EOS blockchain are issued using the same contract.

In addition, for other token types like NFT, it was achieved by the third party frameworks. For instance, Simple Assets by CryptoLions and dGoods by Mythical Games are the two non-fungible token standards for EOSIO.

References

  1. Febrero, P (2019, May). A guide to Ethereum’s ERC standards. Retrieved from https://finance.yahoo.com/news/guide-ethereum-erc-standards-150024381.html
  2. Victor (Dec, 2018). ETHEREUM ERC TOKEN STANDARDS. Retrieved from https://crushcrypto.com/ethereum-erc-token-standards/
  3. Non-fungible token. (2020, Jun). Retrieved from https://en.wikipedia.org/wiki/Non-fungible_toke
  4. About System Contracts (n.d.). Retrieved from https://developers.eos.io/manuals/eosio.contracts/latest/index
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

The standards are application-level for blockchains built for smart contracts or other decentralised applications.