What are token standards?
Introduction
Token standards are a set of agreed-upon rules that govern the design, development, behavior, and operation of cryptocurrency tokens on a particular blockchain protocol. For token standards to be useful, they must be massively adopted. Without acceptance, these rules cannot be elevated to the status of a “standard” because standards are rules that are generally followed by a wide range of people.
In this post, we will look at why standards are important to increase the adoption and use of cryptocurrency tokens. We will also look at how the Ethereum standards are developed and briefly discuss the Solana standards.
Why do we need token standards?
Let’s start by understanding what we mean by “token”. A token in the world of cryptocurrencies is a cryptocurrency that is created, managed and distributed using blockchain technology – most often smart contracts. A token may have a market value, as well as some utility that makes it desirable to own the token beyond financial gain.
A standard is a set of rules that “standardizes” something. In the context of tokens, standardization means having a set of rules that define what data the token should contain, what behaviors and actions the token is capable of, and what operations an owner or community of owners can perform with respect to that token. The Token Standards provide guidelines for the creation, issuance, deployment, transfer, burning, and other attributes of tokens on the underlying blockchain. As you might expect, these token standards are likely to emerge on blockchains that support the development of smart contracts, as such a blockchain would be able to support the creation of an arbitrary number of tokens based on it.
We now understand what token standards are, but to really understand their role in the ecosystem, we need to understand their benefits. In other words, why do we need token standards, and what problem do they solve?
At the most general level, the standard allows several options to be implemented. For example, Ethereum has standards for the client software that Ethereum nodes run to communicate with the Ethereum network. These standards allow anyone to write their own version of an Ethereum client in any programming language of their choice, as long as they adhere to the standards and specifications for Ethereum nodes and clients. Thus, there can be any number of nodes and clients on the Ethereum network, some of which run Ethereum software written in Golang, Rust, Java, C#, C++, or Python. This increases “client diversity”, which makes the network stronger by reducing dependency on a single code implementation. But all of these implementations, regardless of software language, design, or implementation details, have one thing in common – they all follow the same specification for clients.
In this way, standards help increase the diversity of implementations. This means that there can be different approaches to security, speed, scalability, etc., and this diversity enriches the overall experience. It also means that developers and designers can design with a stable foundation in mind regarding the minimum set of behaviors required from a system. This encourages innovation based on the standard, which opens up more use cases, encourages more adoption, and so on.
That is why token standards are very important. Standardizing the functionality of different tokens helps developers build applications based on these standards, knowing that the underlying interfaces will be the same as long as the standard is applied.
Another huge advantage of token standards is that the smart contracts that implement them become “composite”. This means that we can design contracts to interact with each other, since standardization allows us to know what functions, methods, data types, and behaviors will be provided in the corresponding smart contract. We can then write code to interact with these contracts, which means that the smart contract ecosystem can interact, connect, mix and match in a variety of ways so that the whole is much more than the sum of the parts. A simple example: when a new crypto token is issued on the Ethereum-based blockchain network that complies with the standard ERC-20 for fungible tokens, then its smart contract will be compatible with decentralized exchanges designed to work with ERC-20 tokens.
Ethereum standardization process
We can get a high-level understanding of the importance of token standards by taking Ethereum as an example. Ethereum follows a process based on Ethereum Improvement Proposals (EIPs), which describe standards applicable to the Ethereum platform (the underlying blockchain protocol), APIs for clients and nodes, and smart contracts that run the Ethereum virtual machine.
There are three types of EIPs:
Track Standards: These typically cover changes to the underlying protocol. They have four subcategories:
Core: Associated with the core rules of the Ethereum protocol.
Networking: Making improvements to network protocol specifications.
Interface: API and related changes for interacting with the protocol via RPC, as well as interfaces such as smart contract ABIs.
ERC: Ethereum Requests for Comment; these are standards for applications, including standards for smart contracts and tokens.
EIP Meta/Processes: These cover the processes that surround Ethereum, but do not directly address the protocol itself. These may include proposals that affect the decision-making process for changing the protocol, etc.
Informational EIPs: These cover Ethereum design issues or recommendations that may be useful to the community, but do not change or affect the specifics of the Ethereum protocol. These are also the most optional EIPs as users can ignore them.
Ethereum standards and guidelines usually have a life cycle for the EIP proposal process. These lifecycle stages include “idea”, “draft”, “review”, “final signal” (final review), “final” (final standard), “stagnant” (non-final EIP that has been inactive for more than six months), “withdrawn ” and “live” (EIPs that are valid but by their nature are regularly updated and never reach final completion).
Common Ethereum Token Standards
List of all EIPs you can find here. However, let’s take a look at some popular Ethereum token standards.
Token standards, as we noted in the previous section, are part of the standards track and refer to rules that apply to applications, including smart contracts.
The best known of these is probably the ERC-20, which came into existence as part of the EIP-20. This standard applies to fungible tokens – tokens that are exactly the same in type and value as another token, meaning that no token is unique. Most often, they are used as cryptocurrency tokens that can be traded on exchanges. The ERC-20 standard prescribes a token standard that implements an API for tokens within smart contracts. If you click on the links related to ERC-20, you will see a list of function and event signatures that smart contracts with ERC-20 tokens must implement in order to comply with the standard. This makes them interoperable and allows us to write applications that can interact with these tokens, thus making the ecosystem more composite. Developers can also write libraries in any language that can interact with these smart contracts on ERC-20 tokens, since we have a list of all the functions and data exposed by the ERC-20 specification.
Chainlink’s LINK token contracts also comply with the specification ERC-677, which extends the functionality of ERC-20 tokens by adding the tranerAndCall function, a method that can be called to initiate the transfer of a token to a receiving contract, and also call a specific function in the receiving contract, all within a single transaction. This circumvents the limitation of the ERC-20 standard, according to which the transfer of a token is a multi-stage process, which complicates the process and increases the gas fees for the transferring party.
Another popular token standard is the token standard. ERC-721covered by EIP-721. Unlike ERC-20 tokens, ERC-721 tokens allow certain unique properties to be added to each token, making them “non-fungible”. This feature can be used to tokenize everything from works of art to a person’s personality. Because the list of methods required by this standard is publicly known, NFT marketplaces such as Opensea have been able to create NFT listing, trading, and selling marketplaces because the marketplace code can interact with the NFT smart contract to read and write data related to to NFTs.
There are enhancements to ERC-721 proposed in EIP-2309 that standardize the structure of events that occur when non-fungible tokens are created or transferred.
Another popular token standard is ERC-1155, which echoes EIP-1155. It defines the standards for a smart contract that can issue both ERC-20 and ERC-721 tokens. This is known as the multi-token standard. This ERC also attempts to fix bugs in ERC-20 and ERC-721 and improve their performance.
There are other standards that are at different stages of the proposal life cycle and you can explore them. here.
Solana Token Standards
While token standards are just one kind of standardization rule, they have different names in different contexts. In the Solana ecosystem, token standards are contained in the Solana Program Library (SPL), which is a library of blockchain programs that run on the Solana blockchain runtime. SPL-compliant tokens are compatible with the Solana blockchain and Solana wallets and increase the interoperability of the Solana ecosystem. Solana tokens are covered by the Solana Token Program, which is part of the overall SPL program. This program creates a standardized interface for creating, issuing, transferring, and burning Solana-compatible tokens and is comparable to ERC-20 and ERC-721 in the Ethereum ecosystem.
Solana’s native token is the SOL token, comparable to ETH in Ethereum. It is also an SPL token. SPL tokens can vary greatly in their functionality – some can be NFTs, others can be fungible but with little turnover, and still others can combine the functionality of various other types.
Again, SPL compliance means that Solana-based tokens can be interacted with using SPL-compliant wallets and smart contracts, bringing interoperability and innovation to the ecosystem. They also allow for analytics and the use of meta-information for research, as can be seen on the website. Solscan. The functionality of this site is provided by the SPL standards, which prescribe what functionality SPL-compliant tokens must have in order to be able to create frontends like this to interact with all SPL-compliant tokens.
Conclusion
Effective operation of smart contracts in blockchain networks requires token standards that define the implementation of smart contracts and provide programming interfaces on which decentralized applications can be built.
Telegram channel about web3 development, smart contracts and oracles.