The confidence vote is live now. Click here to vote

ERC20 Standard

Ethereum Explained

Before we discuss the ERC20 token standard, let’s look at what is Ethereum. Ethereum is an open source software platform based on blockchain technology . The platform is decentralized and runs smart contracts which are applications running exactly as the creator programmed it without any possibility of third-party interference, downtime or fraud.

Smart contracts allow users to exchange nearly anything of value with transparency and little-to-no conflict, all without a middleman. Smart contracts define rules and penalties of an agreement, similar to a traditional contract drafted up by a lawyer. However, these rules, “penalties” and obligations are automatically enforced.

Since the applications run on a custom-built blockchain, developers are able to create markets, transfer funds, store debt registries and innovate without counterpart risk or middlemen. You might have heard Bitcoin and Ethereum are similar. This is true to an extent.

Bitcoin is a peer-to-peer electronic payment system and is only one application of blockchain. The Bitcoin blockchain simply tracks the ownership of bitcoins. On the other hand, the Ethereum blockchain technology is primarily focused on running code of nearly any decentralized application. Miners in the Ethereum blockchain mine in order to earn Ether  — a digital currency fueling the Ethereum project.

According to Ethereum , “ Ether is a necessary element — a fuel — for operating the distributed application platform Ethereum. It is a form of payment made by the clients of the platform to the machines executing the requested operations. To put it another way, ether is the incentive ensuring that developers write quality applications (wasteful code costs more), and that the network remains healthy (people are compensated for their contributed resources).”

In order to operate Ethereum, you would need fuel e.g. is Ether. This is a widely-accepted form of payment made by platform clients to machines executing the requested functions and events. Ether incentivizes developers to write high-quality applications in order for the network to remain robust.

You should understand some of the basics of Ethereum by now. That in mind, let’s move on to the ERC20 token standard and learn why it’s important to the Ethereum project.

ERC20 Token Standard

In 2015, the Ethereum Project issued technical specifications for digital tokens on the Ethereum blockchain. Tokens complying with the technical specifications are known as Ethereum Request for Comments (ERC20) tokens. ERC20 tokens are simply smart contracts running on the Ethereum blockchain. The ERC20 token standard is a protocol that defines the functions and events that a token must implement. This is similar to HTTPS protocol and how it defines secure communication over the Internet.

Now, the ERC20 token standard is a technical specification, or a system of rules. You should not think of ERC20 as a technology or software. Although ERC20 tokens follow the Ethereum framework, the specifications are very broad and allow developers to creatively develop and design digital tokens.

The ERC20 standard has six functions and two events. This standard allows systems to exchange and make use of information across interfaces, exchanges and applications.

Here is a look at an ERC20 interface contract :

Now, the functions have specific use cases.

Here’s a look at what these functions do:

  • totalSupply: Gets the total token supply
  • balanceOf : Gets the account balance of another account with ‘address_tokenOwner’
  • allowance: Returns the amount the spender is allowed to withdraw
  • transfer: Sends the value of tokens to a specified address
  • approve: Allows spender to withdraw from a specified account multiple times up to the specified value amount.
  • transferFrom: Sends the specified value amount of tokens from ‘address_from’ to ‘address_to’.

The events are triggered when specific actions are taken. For example, the event Transfer is triggered when tokens are transferred. The event Approval is triggered whenever the function approve(address _spender, uint256 _value) is called.

Now, every token that follows the ERC20 token standard have the same functions, with the same names, that take the same arguments, as shown above. Developers are able to create a token exchange system, allowing for quick addition of new tokens to their platform the moment they are released. Keep in mind, they would need to follow the ERC20 token standard. Even though ERC20 tokens may be completely different, the system is able to support trading between a plethora of tokens.

What does this all mean for digital tokens? Well, ERC20 tokens would have minimized risk, increased liquidity, be less complex and more uniformed. If developers follow the ERC20 token standard, they could conduct a successful initial coin offering (ICO). Thereafter, the ERC20 tokens could trade on various exchanges. There does not need be any communication between the developers of the ERC20 tokens and the exchange developers.

The ERC20 token standard has caused a ripple effect in the cryptocurrency market. Since the standard is robust, coupled with less risk and more liquidity, investors of ERC20 digital tokens are able to trade new ICO tokens. In turn, more traders and users could purchase more ICO tokens, causing more initial coin offerings. Consequently, developers are continuously innovating and increasing the value of Ethereum.

There are currently hundreds of decentralized applications (DApps) and there are hundreds under development.

Currently there are various use cases for these applications such as:

  • Prediction markets
  • Crowdfunding
  • Digital tokens pegged to fiat currencies like U.S. dollar, as well as gold
  • Video games
  • Music digital rights management

Here’s a look at some ERC20 tokens:

Source: Etherscan

With so many ERC20 tokens, users and investors need to learn how to store their digital tokens. That said, let’s look at some wallets to store ERC20 tokens.

"