The cryptocurrency world is about much more than just Bitcoin and Ethereum. Thousands of projects and assets exist, with a fair few of them adhering to the ERC-20 token standard. These Ethereum-based tokens are very peculiar yet prove useful across various industry segments.
Table of contents
- Creating Tokens On Ethereum
- What Is The ERC-20 Standard About?
- What You Need To Know About Ethereum Tokens
- An ERC-20 Token Contract In Detail
- What are ERC-20 Tokens Used For?
- The Benefits And Drawbacks Of ERC-20 Tokens
- Exploring Other Token Standards
- Closing Thoughts
Creating Tokens On Ethereum
Whereas most people may have heard about the Ethereum blockchain, they may not be aware of the thousands of tokens that are part of this ecosystem. As a technology stack, the Ethereum ecosystem provides tremendous potential for doing many different things. One of those things is the creation of new tokens that you can transfer across the blockchain freely. Multiple token standards exist, although ERC-20 is by far the most popular option.
As Ethereum’s technology attracts tremendous attention from developers, the ecosystem has seen numerous projects and initiatives. Most of the projects launching on Ethereum – whether they are DApps, decentralized finance, or other concepts – will come with a native token. These tokens primarily use the ERC-20 token standard to benefit from this native framework that extends Ethereum.
What Is The ERC-20 Standard About?
The “ERC” part of this standard’ name stands for Ethereum Request for Comments. At their core, every Request is a set of technical documents outlining standards for programming on the Ethereum blockchain. This is not the same as an EIP – Ethereum Improvement Proposal – as that suggests improvements to the Ethereum protocol itself. The ERC standards are stand-alone implementations and serve to streamline the interactions between applications and smart contracts on the blockchain.
The ERC-20 token standard was initially created by Vitalik Buterin and Fabian Vogelsteller in 2015. Many people don’t realize this token standard is almost as old as the Ethereum network itself. The purpose of this standard is to facilitate Ethereum-based token creation. Opting for this approach ensures developers don’t need to learn unnecessary coding skills, as they can build on the pre-existing Ethereum foundation.
New ERC-20 tokens are created every time they will gain immediate interoperability with services and software supporting this standard. Initial support was a bit lackluster, although things have improved significantly. Support is now provided by numerous software wallets, hardware wallets, exchanges, and other solutions.
What You Need To Know About Ethereum Tokens
Contrary to Ether – the native currency of the Ethereum network – ERC-20 tokens are not held by accounts in the traditional sense. Instead, they exist inside a contract yet can be transferred to any wallet address on the Ethereum blockchain. The reason for keeping ERC-20 tokens in a contract is to ensure they adhere to specific rules – including their name and divisibility – and maintain a list mapping user balances the corresponding Ethereum addresses.
To move ERC-20 tokens across the Ethereum network, users need to send a transaction to the contract to have balances allocated elsewhere. A function inside the contract will take care of the allocation process and execute the transfer accordingly.
Although the call to initiate the token transfer is similar to regular Ethereum transactions, it pays a gas fee of 0 ETH. The actual “call” is included in an extra transaction field, which may not be visible to those who don’t know what to look for.
Additionally, even though the token call does not involve sending any Ether, there is a transaction fee to pay. Without such a fee, the transaction will not be included in any future network blocks. As such, it will require some ETH to execute these calls, as one cannot perform any operations on the network without an ETH balance.
An ERC-20 Token Contract In Detail
The creation of ERC-20 tokens on the Ethereum blockchain occurs through smart contracts. To comply with this token standard, the contract will need to adhere to specific mandatory functions. A total of 6 functions are essential, although developers can introduce optional additions if they need it. Adding a function for the token’s name, symbol, and decimals is always advisable, even though these are optional parameters.
The six mandatory functions can be classified as follows:
- totalSupply: Depicts the total supply of the token in the contract
- balanceOf: This function returns the balance of an address’s token holdings. As Ethereum accounts are public, one can query any address through this function.
- transfer: An essential function for transferring tokens from one address to another
- transferFrom: An alternative to the function above, allowing for more specific programming purposes. This function is useful if the tokens don’t belong to the person calling the contract.
- Approve: Having the ability to limit the number of tokens a smart contract can withdraw from your balance is no unnecessary luxury. If a contract is exploited, it can steal all of the funds if this feature isn’t present.
Using smart contracts tied to ERC-20 tokens allows for plenty of customization options. With this technology, it is easy to set up subscriptions, recurring payments, and other things. For the longest time, people expected this functionality to not be available to cryptocurrencies, as they require manual transactions first and foremost. However, with smart contracts and the correct functions in the contract, there are many opportunities to explore.
When the contract triggers the approval function, it will write data to the blockchain, similar to the “transfer” command.
- Allowance: A good function to use together with approval. For those who give contracts permissions to manage tokens, keeping in check how many it can withdraw is essential. This is primarily useful for subscriptions and recurring payments of any sort. However, other use cases may be unlocked in the future.
What are ERC-20 Tokens Used For?
The big question on everybody’s mind is what one can use ERC-20 tokens for these days. Although these tokens primarily serve as a speculative tool for most users, they are all part of their individual ecosystems. How versatile those ecosystems are is often difficult to gauge. However, the majority of ERC-20 tokens have no real purpose today beyond speculation.
Bringing more use cases to market for ERC-20 tokens is not too complex either. Developers and service providers can implement these tokens with relative ease, allowing for significant flexibility. For now, most ERC-20 tokens are supported by multiple exchanges, wallets, and so forth.
One exciting use case for the ERC-20 token standard is the introduction of stablecoins. As these currencies are tied to a fiat currency value that will never change, they are widely considered low-risk investments. Stablecoins often sue the ERC-20 token standard as Ethereum provides a secondary blockchain for these assets to be issued on.
A stablecoin works in a straightforward way. For every fiat-backed asset, the issuer holds reserves of the respective fiat currency – euros, dollars, or others. For every unit in their bank or reserve, they can mint one ERC-20 stablecoin unit. In theory, the number of units can never be greater than the issuer’s holdings. However, an issuer can also use other assets as collateral to create more assets, including other cryptocurrencies.
However, the issuer will often have a fluctuating balance of funds to contend with. Maintaining the supply of the stablecoin can be tricky, as there may be a need for more or fewer tokens in circulation. Developers can specify all of these aspects through smart contract functions to adjust the supply whenever necessary.
Although many people perceive stablecoins as just digital assets for trading against other currencies, their use cases are more varied. A stablecoin can be used to participate in DeFi, buy goods and services, or for exploring decentralized applications.
A different breed of smart contract-based ERC20 tokens is the security token. While they share some similarities with stablecoins on the surface and how they function, there are crucial differences. Security tokens are not based on fiat currencies, but rather securities. Companies and issuers can tokenize stocks, bonds, or physical assets through this token standard.
More often than not, one will issue security tokens to make investing in a company or project more accessible. In exchange for an investment, token holders will receive a stake in the business or earn dividends from the company’s revenue. It is a more modern approach to traditional securities. However, the business model remains a somewhat niche market at this stage.
The third primary category of ERC-20 tokens comes in the form of utility tokens. It is a very common type of digital asset that isn’t backed by anything digitally or tangible. Instead, they are seen as “rewards” that can give users specific benefits without having an external value. Even so, utility tokens can serve a speculative purpose if they are listed on exchanges.
The Benefits And Drawbacks Of ERC-20 Tokens
No financial instrument is perfect from day one, and ERC-20 tokens are no exception. Although they become more popular every year, there are certain benefits and drawbacks to keep in mind at all times.
The Primary Benefits
One thing ERC-20 tokens have going for them is how they are more fungible than most traditional cryptocurrencies. As each unit is interchangeable with another, it can be traded between users freely while maintaining its core functionality at all times.
Thanks to the broad range of customization options, developers and issuers can experiment with flexibility. Different ERC-20 tokens can serve other purposes to suit specific needs. Several experiments are underway to leverage the token standard for in-game currency or loyalty points.
Last but not least, no one will deny the popularity of ERC-20 tokens. The tokens standard has proven to be a viable blueprint to create fungible tokens capable of servicing different roles. Moreover, these tokens are often integrated into wallets and exchanges over time, creating more liquidity and appeal.
Some Drawbacks To Consider
An ERC-20 token will only be as viable as the underpinning technology. This Ethereum-based token standard is versatile, yet the network itself suffers from high fees and transaction congestion. The lack of scalability has proven problematic multiple times, albeit the upgrade to Ethereum 2.0 is designed to resolve some of the problems over the coming months. Moreover, this issue isn’t native to Ethereum, as other blockchains with similar token standards suffer from scalability concerns.
The second drawback is figuring out whether an ERC-20 token is legitimate. Anyone in the world can put together a smart contract to create new assets. As they can provide liquidity to popular decentralized exchanges such as Uniswap, it is relatively easy to bring a scam token to a broader audience. It is a common issue among new tokens being listed on decentralized exchanges, yet there is no easy way to prevent this from happening.
Exploring Other Token Standards
Whereas ERC-20 is the first token standard to become accessible on the Ethereum network, it is not the only one. Solutions including ERC-721, ERC-223, and ERC-1155 have all come to fruition. Every standard serves its own purpose, ranging from non-fungible tokens to letting users mint their own collectibles and so forth.
One particular standard – ERC-1155 – is slightly different from the others. Since its inception, it has become possible to support fungible and non-fungible tokens in the same smart contract. A positive change, as the landscape would become too fractured if every token standard remains segregated from the others.
The ERC-20 token standard expresses how versatile the Ethereum network is for developers and issuers. This ecosystem is about much more than transacting the ETH asset. It provides ample customization and flexibility to unlock and explore new use cases, including utility tokens, security tokens, and so forth.
The big question is what the upcoming Ethereum 2.0 upgrade will provide for ERC-20 tokens. Developers can unlock thanks to better scalability and processing of data, new use cases, products, and services. It is equally possible a new token standard will pop up to replace ERC-20 eventually. The future looks exciting for Ethereum, although everything is subject to change.