ERC 20: A Beginner’s Explanation Of This Ethereum Interface

ERC 20: A Beginner’s Explanation Of This Ethereum Interface

What is the ERC 20 Standard?

If you’re a big fan of Ethereum, you’ve no doubt heard that ERC 20 is the standard all tokens on the Ethereum network use. But what is it really? In this article we’re going to try our best to explain the fundamentals of this and why it is so crucial to the world of cryptocurrencies, without delving too much into the code.

 

The Interface

With the exploding popularity of Ethereum, developers needed a certain agreed upon standard to create their tokens so that they can be shared, exchanged, and used in wallets.

It’s best to think of ERC 20 as an interface or a list of rules that developers implement into their code. It is a standard that the Ethereum community agreed upon on. There was no authority that said everyone had to use ERC 20, developers just decided that it was the best. When more people and projects started using it, ERC 20 became the de facto standard for all Ethereum tokens.

The ERC20 standard requires these mandatory properties/functions for any token:

  • totalSupply
  • balanceOf
  • transfer
  • transferFrom
  • approve
  • allowance

There are other optional properties the token can have such as:

  • Token Name
  • Token Symbol
  • Decimal (up to 18)

Here’s how the ERC 20 interface code looks like:

The language Ethereum tokens are created in is Solidity, which is very similar to Javascript. If you’re a Solidity programmer and would like a more detailed breakdown of the different functions/properties, visit this link.

This ERC 20 interface is then implemented to the code of any token. Think of it as a template for creating a token. The developer would expand on the functions such as transfer() and write code to actually conduct the transaction.

To see an example of a token that implements ERC 20 go here (you would need to know a bit of Solidity to understand it).

 

The Benefits

There are a lot of advantages to every token using this interface. There’s a uniformity to the protocol and allows for better collaboration. There’s also a lower risk of smart contracts rejecting certain tokens. This, in turn, increases the liquidity of these tokens on the market. Developers can easily contribute to the community and work on projects without having to learn a new standard for every new project.

In fact, before ERC 20 existed, different projects and DApps used different standards and it was a total mess. Today, there are more than 20,000 ERC 20 tokens on Ethereum.

Interestingly, there are other token standards being developed such as ERC 223 and ERC 271. This blog post covers it really well.

The adoption of the ERC 20 standard was one of the most important and yet underrated events in Ethereum’s history. It is because of this interface that developers use the Ethereum blockchain to create DApps, smart contracts, and projects. If you go to CoinMarketCap, almost every top 100 Ethereum token uses ERC 20.

 

Leave a Comment