Written by Tieu Truong
In Ethereum, ERC stands for Ethereum Request for Comments, which is often confused with Ethereum Improvement Proposals (EIPs), which are proposals for improving the Ethereum network. In reality, ERCs are technical documents outlining standards for programming on Ethereum, aiming to facilitate interaction between applications and smart contracts.
In 2015, Vitalik Buterin and Fabian Vogelsteller proposed ERC-20, a relatively simple format for token contracts operating on Ethereum. Developers no longer need to reinvent different structures and can leverage this existing standard to create fungible tokens.
![](https://insights.blockbase.co/wp-content/uploads/2023/08/Untitled-31-1024x242.png)
Token: “Blockchain’s most powerful and most misunderstood tool”
First and foremost, we need to clarify the two most confusing concepts: Token Contract and Token.
A Token Contract is simply a smart contract on Ethereum. Once deployed, it is responsible for updating data about the tokens it has created.
On the other hand, a Token represents something on Ethereum. It could be a fiat currency, company shares, voting rights, lottery tickets, in-game experience points, or anything else. By representing everything as tokens, we enable smart contracts to interact, exchange, create, or destroy them.
However, unlike ETH, our accounts do not actually hold ERC-20 Tokens. These tokens exist only within the corresponding ERC-20 Token Contract and act as a separate database mapping users’ Ethereum addresses to their balances. When we say someone holds tokens, it means their balance in that token contract is not zero. Similarly, when we execute a token transfer command, we are actually requesting the token contract to decrease our balance while simultaneously increasing the recipient’s balance by an equivalent amount.
![](https://insights.blockbase.co/wp-content/uploads/2023/08/Untitled-32.png)
How are ERC-20 token contracts created?
Based on Vitalik and Fabian’s proposed improvement in 2015, token contracts following the ERC-20 standard are composed of nine functions, including six mandatory functions and three optional functions.
Mandatory Functions
- totalSupply(): Returns the total supply of tokens.
- balanceOf(account): Retrieves the token balance of a specific wallet address.
- transfer(recipient, amount): Transfers the sender’s tokens to another wallet address. Note: It is possible to transfer 0 tokens.
- approve(spender, amount): Limits the number of tokens a smart contract can withdraw from the sender’s account.
- allowance(owner, spender): Represents the remaining tokens that a smart contract is allowed to withdraw from the owner’s account. By default, it is set to 0 and only changes when approving or transferFrom functions are executed.
- transferFrom(sender, recipient, amount): Allows a smart contract to transfer tokens from one wallet address to another on behalf of the owner using the allowance mechanism.
![](https://insights.blockbase.co/wp-content/uploads/2023/08/Untitled-33.png)
Optional Functions
- constructor(name, symbol, decimals): Sets the values for name, symbol, and decimals. They can only be set once and cannot be changed thereafter.
- name(): Retrieves the name of the token. For example: Ethereum.
- symbol(): Retrieves the symbol of the token, usually consisting of 3 characters. For example: ETH.
- decimals(): Retrieves the number of decimal places, typically set to 18, based on the relationship between Ether and Wei.
![](https://insights.blockbase.co/wp-content/uploads/2023/08/Untitled-34-1024x497.png)
In reality, there are many ERC-20-compliant contracts that go beyond the nine standard functions and include additional features not included in the original standard to meet their specific needs. Some examples of these additional features are:
- mint(account, amount): Generates additional tokens.
- burn(amount): Destroys a certain amount of tokens.
- increaseAllowance(spender, addedValue): Increases the number of tokens that a smart contract can withdraw from its account.
- decreaseAllowance(spender, subtractedValue): Decreases the number of tokens that a smart contract can withdraw from its account.
Furthermore, there are functions related to TokenVesting, which automate the token issuance and allocation process.
What can ERC-20 tokens do?
Real-World Asset Tokenization
ERC-20 enables the conversion of undifferentiated ownership rights of real-world assets into tokens stored on the blockchain. These tokens represent the underlying assets and can be used to track and transfer ownership. These assets can include currencies, precious metals (gold, silver), stocks, bonds, oil, and more.
![](https://insights.blockbase.co/wp-content/uploads/2023/08/Untitled-35-1024x576.png)
Fiat-backed Stablecoins
Typically, organizations issuing stablecoins will hold and manage reserves of fiat currency or equivalent cash-like assets. For each unit in the reserve, they will then issue a token. For example, if there is a reserve of $10,000, the issuing organization can create up to 10,000 tokens, with each token being exchangeable for $1.
![](https://insights.blockbase.co/wp-content/uploads/2023/08/Untitled-36-1-1024x576.png)
Algorithmic Stablecoins
Unlike Fiat-backed Stablecoins, Algorithmic Stablecoins are not fully backed by reserves but rather rely on algorithms and mechanisms implemented on the blockchain to maintain price stability.
![](https://insights.blockbase.co/wp-content/uploads/2023/08/Mapping-of-Algo-stablecoin.png)
Crypto-backed Stablecoins
Crypto-backed Stablecoins are stablecoins that are backed by other cryptocurrencies. They are often overcollateralized to absorb price fluctuations in the market.
Security Tokens
Security Tokens are digital representations of traditional investment instruments such as stocks, bonds, or other securitized assets.
Utility Tokens
Unlike the tokens mentioned above, Utility Tokens are not backed by any underlying assets. They are created to provide owners with some utility or function within a project or ecosystem (voting rights, in-game currency, customer loyalty rewards, and more).
References
ERC 20 (no date) OpenZeppelin Docs. Available at: https://docs.openzeppelin.com/contracts/2.x/api/token/erc20 (Accessed: 09 August 2023).
Fabian Vogelsteller, V.B. (2015) ERC-20: Token standard, Ethereum Improvement Proposals. Available at: https://eips.ethereum.org/EIPS/eip-20 (Accessed: 09 August 2023).
Let’s talk about the coin standard (no date) Reddit. Available at: https://www.reddit.com/r/ethereum/comments/3n8fkn/lets_talk_about_the_coin_standard/ (Accessed: 09 August 2023).
Binance Academy (2022) An introduction to ERC-20 tokens, Binance Academy. Available at: https://academy.binance.com/en/articles/an-introduction-to-erc-20-tokens (Accessed: 09 August 2023).
Chainlink (2023) How to tokenize an asset: Chainlink, Chainlink Blog. Available at: https://blog.chain.link/how-to-tokenize-an-asset/ (Accessed: 09 August 2023).
Majaski, C. (2023) Cryptocurrency security token: Definition, forms, investing in, Investopedia. Available at: https://www.investopedia.com/terms/s/security-token.asp (Accessed: 09 August 2023).
Genç, E. (2023) Algorithmic stablecoins: What they are and how they can go terribly wrong, CoinDesk Latest Headlines RSS. Available at: https://www.coindesk.com/learn/algorithmic-stablecoins-what-they-are-and-how-they-can-go-terribly-wrong/ (Accessed: 09 August 2023).
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Your passion for this topic is evident in every word.급전
Your expertise on this topic is evident in your writing, thanks!대출
Your article is a true masterpiece.대출
I’m sharing this with my friends and colleagues.급전
This post was both enlightening and practical. Thank you for sharing.급전
It’s very interesting! If you need help, look here: link building
I’ve learned so much from reading your blog. Thank you for the education.대출
This is exactly what I was looking for, thanks!급전
I found your perspective on this topic very interesting. Well done!blogpulse
I enjoyed reading this post. It gave me a lot to think about.dashdome
Great post! I learned a lot from your insights. Thank you for sharing.slotcoin
This post was incredibly informative and well-organized. I learned so much from reading it. Thank you for your hard work and dedication!rendingnicheblog
This post was incredibly informative and well-organized. I learned so much from reading it. Thank you for your hard work and dedication!rendingnicheblog
I really appreciate the thoroughness of your research and the clarity of your writing. This was a very insightful post. Great job!slotcoin
I always look forward to your new posts. You have a way of making even the most complex topics easy to understand. Excellent job!swiftnook
Your blog is a wealth of information. I always learn something new from your posts. This one was particularly enlightening. Great job!blogpulse
Comments are closed.