What Is ERC-20?
ERC-20 is the technical standard for fungible tokens created using the Ethereum blockchain. A fungible token is one that is interchangeable with another token—where the well-known non-fungible tokens (NFTs) are not interchangeable.
ERC-20 allows different smart-contract enabled tokens a way to be exchanged. Tokens, in this regard, are a representation of an asset, right, ownership, access, cryptocurrency, or anything else that is not unique in and of itself but can be transferred. The standard allows tokens representing one of these factors—along with smart contracts—to be exchanged for a token that represents another. Smart contracts are conditions written into the coding that execute different aspects of a transaction between parties.
- Ethereum Request for Comment 20 (ERC-20) is the implemented standard for fungible tokens created using the Ethereum blockchain.
- ERC-20 guides the creation of new tokens on the Ethereum blockchain so that they are interchangeable with other tokens used within smart contracts.
- ERC-20 is the technical standard used in many new tokens created using the Ethereum ecosystem.
Smart contracts were becoming more popular in 2015, but several issues needed to be addressed. Because anyone could make a token, many were being created. However, there wasn’t a way to ensure that all of the different tokens could be created, used, or exchanged. Without a standardized methodology for tokens, every application would need its own token, and users would need to find a way to convert them back and forth between the hundreds of apps being developed.
Plenty of well-known digital currencies use the ERC-20 standard. Some popular examples are:
ERC-20 was proposed by developer Fabin Vogelstellar in 2015 as a way to standardize the tokens within smart contracts on the Ethereum blockchain. Vogelstellar submitted the proposal via the project’s Github page as an Ethereum Request for Comment (ERC). As it was the twentieth comment, it was assigned the designation ERC-20.
Following the procedure used by the Ethereum developer community, the proposal was approved and implemented in 2017 as Ethereum Improvement Proposal 20 (EIP-20). However, it is still called ERC-20 because that’s how it was known until it was approved.
“Token” and “Cryptocurrency” are often used interchangeably; all cryptocurrencies are tokens, but not all tokens are cryptocurrencies. Tokens often represent assets and rights that are external to a blockchain. Token, in the context of ERC-20 compliance, simply means a blockchain representation of something that meets the standards set by the Ethereum community to be considered a smart contract standard-compliant token.
Because the request was approved and implemented, smart contract tokens implemented on the Ethereum blockchain must conform to this standard if the developers want them to be interchangeable.
Contents of the Standard
ERC-20 contains several functions and events that a token must implement. Keep in mind that this standard also governs actions that smart contracts take for the tokens being created. The minimum of functions and information needed in an ERC-20 compliant token are (note the difference in capitalization, which is important for coding reasons):
- totalSupply: The total number of tokens that will ever be issued
- balanceOf: The account balance of a token owner’s account
- transfer: Automatically executes transfers of a specified number of tokens to a specified address for transactions using the token
- transferFrom: Automatically executes transfers of a specified number of tokens from a specified address using the token
- approve: Allows a spender to withdraw a set number of tokens from a specified account, up to a specific amount
- allowance: Returns a set number of tokens from a spender to the owner
- Transfer: An event triggered when a transfer is successful (an event)
- Approval: A log of an approved event (an event)
These code functions and events are integral for user/token implementation. More specifically, they assist in determining the number of tokens in circulation, storing and returning balances, making transfer and withdrawal requests, granting approval, and agreeing to automated transfers.
This set of functions and signals ensures that Ethereum tokens of different types will all uniformly perform in any place within the Ethereum ecosystem. In addition, ERC-20-compliant tokens can be used interchangeably.
Goals of ERC-20
The ERC-20 standard has an important roll within the blockchain; it defines a common list of rules that Ethereum tokens using smart contracts must adhere to. Some of these rules include how the tokens can be transferred, how transactions are approved, how users can access data about a token, and the total supply of tokens.
This compliance is also necessary for Ethereum to keep the promise of scalability; it ensures compatibility between the many different tokens created using the Ethereum ecosystem.
Consequently, this token standard empowers developers of all types to accurately predict how new tokens will function within the larger Ethereum system. This simplifies the task for developers; they can proceed with their work knowing that every existing project won’t need to be redone every time a new token is released. Additionally, new projects won’t need to worry about compatibility with old projects, as long as the token follows the rules.
Fortunately, most token developers have fallen in line with ERC-20 rules, meaning that most of the tokens released through Ethereum initial coin offerings are ERC-20 compliant.
BEP-2 vs. ERC-20
ERC-20 is the standard for tokens in the Ethereum ecosystem. Many other tokens, blockchains, and ecosystems have derived from Ethereum. One such ecosystem and blockchain belongs to Binance, the cryptocurrency exchange. The team behind Binance created its own blockchain, the Binance Chain, from an Ethereum fork.
Binance developers created their own standard for tokens created using their blockchain. This standard is called BEP-2 and is similar to ERC-20 in that it guides token creation for use on the Binance Chain.
Binance also has created a side chain that runs alongside the Binance Chain called the Binance Smart Chain. This chain is compatible with ERC-20 tokens, the Ethereum Virtual Machine, and the Binance Chain; however, it uses a newer standard called BEP-20, which creates cross-chain compatibility.
What Does ERC-20 Mean?
ERC-20 is Ethereum Request for Comment, number 20. ERC-20 is the standard for smart contract tokens created using Ethereum.
What’s the Difference Between ETH and ERC-20?
Ether (ETH) is the native token used by the Ethereum blockchain and network as a payment system for verifying transactions. ERC-20 is the standard for creating smart contract-enabled fungible tokens to be used in the Ethereum ecosystem.
What Is an ERC-20 Wallet?
An ERC-20 wallet is a wallet that lets you manage ERC-20 compliant tokens.