ERC-20 Tokens – Why Most ERC-20 Tokens Have 18 Decimals

go-ethereumtokens

I don't really understand the fundamental rationale for this. I'd think 0 decimal is much simpler to understand for most people?

Best Answer

Ether itself has 18 decimals, most ERC-20 tokens simply follow that standard.

1 ETH is represented by 10^18 of its natural unit ( 1 Ether = 1,000,000,000,000,000,000 wei ).

This offers you much greater precision - essentially, you aren't limited to trading the equivalent of a cent ($0.01 for example), you can go much, much lower. It means you can own - actually own, and have full control of - a very small portion of a whole Ether. Might not be so relevant today, but it might be in the future; in case the trade value rises dramatically, you would still be able to buy, own and use the system, without any changes.

As per your point about 0 decimals being simpler to understand, it's more of a matter of which unit you use. In the case of ETH, using wei allows you to completely skip decimals, as you can't go lower than 1 wei.

Keeping the same decimals simplifies the programming of your contracts, as you don't need to do conversion between units - you can use full precision (18 decimals).

You however obviously do have the option to specify the decimals used by your token, in order to control the total available supply (Fixed supply contract example).

Related Topic