ERC-20

Why Trust Techopedia

What is ERC-20?

ERC-20, short for Ethereum Request for Comments 20, is a well-known standard for creating tokens on the Ethereum blockchain. In simple terms, it defines a set of rules and guidelines that developers can follow in order to issue their ERC-20 tokens on Ethereum.

Advertisements

ERC-20 has become a widely recognized term in the crypto space. It is currently the most popular standard for fungible tokens on Ethereum and one of the most commonly used standards within the blockchain industry.

Techopedia Explains the ERC-20 Meaning

Techopedia Explains the ERC-20 Meaning

In the simplest ERC-20 definition, it is a standard for a set of rules that apply to all smart contracts on the Ethereum blockchain for implementing tokens.

In other words, the token standard 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.

ERC-20 ensures that Ethereum tokens perform in a predictable way throughout the platform, making it easier for developers to predict interaction between tokens.

History of ERC-20

Fabian Vogelsteller, a developer and thought leader on blockchain technology, first proposed the standard in late 2015. He submitted the proposal for the standard via the project’s GitHub page. It was assigned the designation ERC-20 as it was the twentieth comment.

The standard was officially accepted as an Ethereum Improvement Proposal (EIP) in September 2017. Subsequently, it provided developers with a universal token standard, allowing for greater interaction and easier integration with different projects and applications.

How Does ERC-20 Work?

ERC-20 includes a list of required functions that an ERC-20 token smart contract must implement. These functions include basic operations such as transferring tokens between addresses, checking the token balance of an address, and approving addresses to spend tokens on behalf of the token holder.

By following these standardized functions, ERC-20 tokens can be easily recognized and interacted with by any ERC-20-compatible wallet or smart contract.

ERC-20 also defines two events that must be triggered on transactions. These include Transfer, which must be fired when tokens are transferred, including zero value transfers, and Approval, which is triggered whenever an approval function is called.

Because all ERC-20 tokens follow the same standard, they can interact with decentralized applications (dApps), exchanges, wallets, and other tokens in a predictable way. This means that developers can build applications knowing exactly how any ERC-20 token will behave within their application without needing to create a special case for each token.

Furthermore, ERC-20 tokens can be controlled by smart contracts, enabling complex operations like distributing tokens from a decentralized autonomous organization (DAO), managing tokens within a DApp, or creating a decentralized exchange where tokens can be traded.

Functions of ERC-20

The ERC-20 token standard specifies a set of mandatory functions that every ERC-20 token must implement to ensure compatibility within the Ethereum ecosystem. Additionally, there are optional functions that can provide additional information about the token but are not required for ERC-20 compliance.

Mandatory Functions

totalSupply

This function allows anyone to find out the total supply of the token.

balanceOf

Provides the number of tokens held by a given address.

transfer

Allows a token holder to transfer tokens to another address.

approve

Approves another address (a spender) to withdraw tokens from your account, up to the specified amount.

transferFrom

nables a spender to transfer tokens on your behalf, facilitating the ability for contracts to function as automated agents.

allowance

Returns the amount of tokens that an owner allows to a spender.

Optional Functions

name

Provides the name of the token. For example, “MyToken”.

symbol

Provides the token’s symbol. For example, “MTK”.

decimals

Returns the number of decimals the token uses. For instance, if a token uses 18 decimals, it can be divided into smaller parts up to 18 decimal places.

ERC-20 Tokens

ERC-20 tokens are digital assets that are created using the ERC-20 standard. These tokens are built and operate on the Ethereum blockchain, which allows them to benefit from the vast and prosperous decentralized finance (DeFi) ecosystem of Ethereum.

These tokens can represent numerous assets, ranging from cryptocurrencies to utility tokens or even digital representations of real-world assets like gold or real estate.

It is worth noting that all ERC-20 tokens have common functionalities and interfaces. This makes them easily interoperable with other ERC-20-compliant contracts and wallets.

Furthermore, these tokens are fungible, meaning that each token is interchangeable and equal in value. This is in contrast to non-fungible tokens (NFTs), which include ERC-721 and ERC-1155 standards and have unique characteristics and varying values.

What is an ERC-20 Wallet?

An ERC-20 wallet is a digital wallet that supports Ethereum and its tokens, specifically those that adhere to the ERC-20 standard. This type of wallet not only allows users to store Ether, the native cryptocurrency of the Ethereum blockchain but also enables them to manage and transact with ERC-20 tokens.

Popular ERC-20 compatible wallets include MetaMask, MyEtherWallet (MEW), Trust Wallet, Ledger Nano S and X (hardware wallets), and Trezor (another hardware wallet). These wallets vary in terms of interface, security features, and additional functionalities.

Use Cases of ERC-20 Tokens

ERC-20 tokens have facilitated a wide range of applications and use cases in the blockchain ecosystem.

Here are some prominent use cases of ERC-20 tokens:

Use Cases of ERC-20 Tokens

  1. Decentralized Finance (DeFi) Platforms: ERC-20 tokens are extensively used in DeFi platforms for transactions, governance, staking, and as collateral for loans.
  2. Stablecoins: Stablecoins are a type of ERC-20 token designed to maintain a stable value by pegging to a reserve asset, such as the US dollar, other fiat currencies, or gold.
  3. Utility Tokens: ERC-20 tokens can be used as utility tokens, providing access to a product or service within a blockchain ecosystem. They can be used to purchase services, redeem rewards, or interact with DApps developed on the Ethereum network.
  4. Governance Tokens: In decentralized organizations and protocols, governance tokens give holders the right to vote on important decisions regarding the project’s development, such as upgrades to the system, allocation of resources, and changes in governance rules.
  5. Security Tokens: Although less common than utility tokens due to regulatory considerations, some ERC-20 tokens represent ownership in real-world assets, such as real estate, stocks, or bonds.
  6. Non-Fungible Tokens (NFTs): While NFTs are primarily associated with the ERC-721 and ERC-1155 standards due to their non-fungible nature, ERC-20 tokens have been used in fractional ownership of NFTs.
  7. Reward and Loyalty Programs: Companies and projects can issue ERC-20 tokens as part of reward and loyalty programs, where users earn tokens by participating in the ecosystem, such as through making purchases, contributing content, or engaging in community activities.
  8. Fundraising and ICOs: ERC-20 tokens have been widely used for fundraising through ICOs, where new projects issue tokens to raise capital from investors.

5 Examples of Popular ERC-20 Tokens

Tether (USDT)Chainlink (LINK)Uniswap (UNI)Maker (MKR)Aave (AAVE)

Tether is the world’s largest stablecoin, with its price pegged to the US dollar. Aside from Ethereum, USDT is also issued on other networks, including Tron, EOS, Algorand, and OMG Network.

Chainlink is a decentralized oracle network that connects smart contracts with real-world data, enabling smart contracts to interact with external APIs and off-chain data sources.

Uniswap is a decentralized exchange protocol that allows users to swap ERC-20 tokens directly from their wallets, utilizing an automated market-making (AMM) system.

Maker is the governance token of the MakerDAO project, which aims to create a decentralized stablecoin called DAI.

Aave is a decentralized lending and borrowing protocol that allows users to lend and borrow ERC-20 tokens in a permissionless manner.

ERC-20 Pros and Cons

The ERC-20 standard offers some unique advantages and disadvantages to its users and developers.

Advantages

  • Standardization simplifies token creation and ensures compatibility
  • Interoperability with Ethereum’s ecosystem enhances functionality
  • Simplified integration with wallets and exchanges
  • Wide adoption within the Ethereum community
  • Essential for the development of decentralized finance (DeFi)

Disadvantages

  • Smart contract vulnerabilities may lead to security issues
  • Subject to Ethereum’s scalability issues, affecting transaction times and costs
  • Most tokens lack physical asset backing, leading to high volatility
  • Regulatory uncertainty can pose compliance risks
  • The proliferation of tokens can overwhelm users and increase scam risks

Alternative Standards

The success of the ERC-20 standard in facilitating the creation and exchange of fungible tokens on the Ethereum blockchain has led to the development of several alternative and complementary token standards, each designed to address specific needs and limitations of ERC-20 or to introduce new functionalities. Here are some of the notable alternatives:

1. ERC-721 (Non-Fungible Tokens)

ERC-721 introduced the concept of non-fungible tokens (NFTs), where each token is unique and cannot be exchanged on a one-to-one basis with another token. This is in contrast to ERC-20’s fungible tokens, where each token is identical to another.

This token standard is used for digital collectibles, game items, digital art, event tickets, real estate, and more, where uniqueness and provenance are important.

2. ERC-1155 (Multi-Token Standard)

Developed by Enjin, ERC-1155 allows for the creation of both fungible and non-fungible tokens within a single contract, optimizing transactions and storage for more complex token use cases.

It’s particularly useful in gaming and collectibles, where a contract might manage multiple item types (e.g., currencies, weapons, and armor, each with different attributes).

3. ERC-777 (Advanced Token Standard)

An improvement on ERC-20, offering more advanced features like hooks that allow tokens to react to being sent or received. ERC-777 aims to address some of the limitations of ERC-20, including providing more transaction security and enabling more complex interactions with tokens.

It’s designed for sophisticated financial applications and services in the DeFi ecosystem that require more interaction between tokens and other smart contracts.

4. ERC-223 (Safe Token Transfer)

This standard aims to prevent token losses that can occur when tokens are mistakenly sent to contracts not designed to handle them. ERC-223 tokens are designed to be only transferred to contracts that are equipped to handle token transfers, mitigating the risk of accidental loss.

5. ERC-827 (Token Standard with Data Payload)

An extension of ERC-20, ERC-827, allows tokens to carry a data payload with them. This enables token holders to execute more complex operations in a single transaction.

It’s useful for applications requiring tokens to interact with smart contracts in more sophisticated ways, such as voting systems or multi-step financial transactions.

6. ERC-1400 (Security Token Standard)

A comprehensive standard for security tokens, combining features from previous token standards to address regulatory compliance, investor protection, and complex asset management.

ERC-1400 is tailored for financial securities on the blockchain, such as stocks, bonds, and other regulated financial products, providing a framework for compliance with legal and financial regulations.

Future of ERC-20 Tokens

The future of ERC-20 tokens is closely linked to the evolution of the Ethereum blockchain, technological advancements, regulatory developments, and changes in the wider cryptocurrency and blockchain realms.

Being one of the most widely embraced standards for token creation on the Ethereum platform, ERC-20 has played a pivotal role in establishing a thriving ecosystem of digital assets, decentralized applications (DApps), and financial instruments.

Looking ahead, the future of ERC-20 tokens appears promising, with the potential for vast growth. Arguably, this token standard has already solidified its position as a fundamental building block of DeFi on the Ethereum network.

The Bottom Line

ERC-20 has become an important part of the booming Ethereum ecosystem. It has standardized the tokenization landscape within the blockchain, facilitating interoperability, collaboration, and ease of integration among developers and projects.

While ERC-20 tokens have their advantages and disadvantages, they have seen continued growth and popularity over the years. They are currently the most popular token standard on Ethereum, followed by ERC-721, ERC-777, and others.

FAQs

What is ERC-20 in simple terms?

Is ERC-20 the same as ETH?

What is an ERC-20 Wallet?

What are the risks associated with ERC-20 tokens?

Advertisements

Related Questions

Related Terms

Ruholamin Haqshanas
Cryptocurrency journalist
Ruholamin Haqshanas
Cryptocurrency journalist

Ruholamin is a crypto and financial journalist with over three years of experience. Apart from Techopedia, he has been featured in major news outlets, including Cryptonews, Investing.com, 24/7 Wall St, The Tokenist, Business2Community, and has also worked with some prominent crypto and DeFi projects.  He holds a Bachelor's degree in Mechatronics. Ruholamin enjoys reading about tech developments, writing, and nature-watching