Ethereum ERC-20 Standard Token Breakdown

CornerRight 2 min


Icons/Position/Pos. No. 4

Cryptocurrency


Icons/Technology/Tech No.1

AI

Most of the major tokens based on Ethereum are ERC-20 compliant. If you plan to launch your own cryptocurrency based on this blockchain, it would probably be the best option to assure that you are compliant with this standard.

What is ERC-20?

It is a standard which describes how one interacts with your token – a set of default functions which are basically a language to communicate with your tokens.

Why do I need it in my ICO?

It is extremely important when you plan to get your cryptocurrency into the crypto exchange. If you have standardised interaction, adding your currency to one of them is very easy, and doesn’t require additional technical backup or reviews.

There are more Ethereum standards. For example, take a look at ERC-721 created for non-fungible tokens. You can read more on this topic in our recent post:
>> ERC-721 Ethereum Standard

ERC-20 example

Every Ethereum token based on the standard includes this code:

contract ERC20Interface {
    function totalSupply() public constant returns (uint);
    function balanceOf(address tokenOwner) public constant returns (uint balance);
    function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}

Token functions

Let’s take a look at the standardised set of functions. It includes:

  • totalSupply – returns the total amount of existing tokens
  • balanceOf – returns number of tokens stored by the defined address
  • transfer – adds a chosen number of tokens to a chosen address, and remove them from the account of the sender
  • transferFrom – sends a request to transfer a chosen amount of tokens from a chosen account
  • approve – authorizes the transfer of a defined amount or number of tokens from the account of the sender to the defined address
  • allowance – returns the number of tokens that the sender is still able to withdraw from the defined account

As we wrote in our epic post on how to launch an ICO, this is basically all you need to create a cryptocurrency that you can call your own, but…

Where do we go from here?

The story doesn’t end here. If you simply accept the standard code, add your new cryptocurrency name and deploy the Smart Contract, you end up with a template.

If it does not have unique functions, there’s no point in creating it. It’s just a pure interface.

After copy-pasting the standard code, the most interesting part starts – what do you do to make the token unique, utilize the blockchain features and put it to work on your business project?

Similar blog posts

11 types of software development you should know

11 types of software development you should know

5 min

If you’re looking to invest in a digital product or build a custom solution, it’s smart to get started by learning what the software development landscape looks like today. It might seem that programming is a pretty straightforward activity. You write code, test it, deploy it, and finally implement it – right?

Mon/Jan/2022
see details
3 Traps That Can Sink Your ICO – and How to Avoid Them

3 Traps That Can Sink Your ICO – and How to Avoid Them

2 min

In the first quarter of 2018, ICOs have already raised almost 7 billion dollars [Coinschedule.com]. The pie is big, and what’s even more important, it is booming – in half a year we will raise more funds in ICOs than in the whole of 2017.

Wed/May/2018
see details
4soft Use Cases: Blockchain In E-Commerce

4soft Use Cases: Blockchain In E-Commerce

2 min

E-Commerce thrives. Online sales steadily grow by about 20% every year. To sustain this growth, online shops leverage every possible technology that helps them to be more efficient and get ahead of the competition to sell more, faster and at better prices.

Tue/Feb/2020
see details
4soft Use Cases: Blockchain in Supply Chain

4soft Use Cases: Blockchain in Supply Chain

2 min

Supply chain logistics is a constant flood of data, collecting entries every minute and keeping track of the goods. To keep competitive, every company has to master this element.

Tue/Oct/2019
see details