HomeResearchWhat is the ERC-20 standard?

What is the ERC-20 standard?

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.

Source: Ethereum

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.

Source: LUKSO

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.
Source: Consensys

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.
Source: Consensys

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.

Source: Chainlink

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.

Source: Nuant

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.

Source: HashKey Group

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).

61 COMMENTS

  1. Wow, amazing weblog structure! How long have you been running a blog for?
    you make running a blog glance easy. The overall look of your
    site is excellent, as neatly as the content! You can see similar: najlepszy sklep and here sklep internetowy

  2. I used to be suggested this blog via my cousin. I am no longer positive whether
    this publish is written by way of him as nobody else know such specific about my trouble.

    You’re incredible! Thanks! I saw similar here: e-commerce and also
    here: dobry sklep

  3. I’m really enjoying the design and layout of your blog.

    It’s a very easy on the eyes which makes it much
    more pleasant for me to come here and visit more often. Did you hire out a designer to create your theme?
    Excellent work! I saw similar here: Sklep

  4. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  5. Fascinating blog! Is your theme custom made or did you download it from somewhere?
    A theme like yours with a few simple tweeks would really make
    my blog stand out. Please let me know where you got your theme.
    Appreciate it I saw similar here: Dobry sklep

  6. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  7. Hey! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to
    get my site to rank for some targeted keywords but I’m not seeing very good success.
    If you know of any please share. Kudos! I saw similar article here: GSA List

  8. Good day! Do you know if they make any plugins to assist with SEO?
    I’m trying to get my blog to rank for some targeted keywords but I’m not
    seeing very good results. If you know of any please share.

    Appreciate it! I saw similar blog here: Backlink Portfolio

  9. Hey there! Do you know if they make any plugins to assist with SEO?
    I’m trying to get my site to rank for some targeted keywords but I’m not seeing very good results.

    If you know of any please share. Appreciate it! You can read similar blog here:
    Scrapebox List

  10. Wow, fantastic blog layout! How lengthy have you ever been blogging for?

    you made running a blog glance easy. The full look of your website is
    great, let alone the content! You can see similar here sklep

  11. Wow, amazing blog structure! How lengthy have you ever been blogging for?

    you made blogging glance easy. The entire look of your website is magnificent,
    let alone the content! I saw similar here prev next and
    that was wrote by Margot09.

  12. Wow, awesome weblog layout! How long have you ever been running a blog for?

    you make running a blog glance easy. The total glance of your website is
    magnificent, let alone the content! You can read similar here prev next and those was wrote by Colleen99.

  13. Wow, superb blog layout! How long have you been blogging for?
    you make blogging look easy. The full glance of your site is fantastic, let alone
    the content material! I read similar here prev
    next and those was wrote by Jaqueline80.

  14. Wow, fantastic weblog format! How lengthy have you ever
    been blogging for? you make blogging glance easy.
    The whole look of your website is fantastic, as smartly as the content!
    I saw similar here prev next and it’s was wrote by Thresa82.

  15. Wow, marvelous blog structure! How long have you been blogging for?
    you make running a blog look easy. The full look of your web site is excellent, let alone the content material!
    I saw similar here prev next and those was wrote by Astrid83.

  16. Wow, marvelous blog format! How lengthy have you been running a blog for?
    you made blogging glance easy. The entire glance of your site is excellent, as
    well as the content! You can see similar here prev next and it’s was wrote by
    Jadwiga65.

  17. Wow, marvelous blog layout! How lengthy have you been running a blog for?
    you made blogging glance easy. The full glance of your web site is excellent,
    let alone the content! I read similar here Dieter Hub9.
    2024/04/23

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles