Natural Units
Numbers in the Ethereum blockchain are represented by integers. Currently floating point numbers are not supported. The “natural unit” is the basic integer that represents a number.
Contents
ETH Natural Units
ETH, or ethers, are represented by a natural unit with 18 decimal places.
1 ETH = 1,000,000,000,000,000,000 or 10^18 natural units. The ETH natural unit is also called a wei.
Token Natural Units
ERC20 tokens on the Ethereum blockchain also have a natural unit where 1 unit of token is represented by {x} natural units. This is represented by the decimal variable commonly written into the token smart contract. See Ethereum Based Tokens for further information.
For example:
- DGDb and UNI both have 0 decimal places, where 1 unit of token is represented by 1 natural unit.
- REP, GNT and many others have 18 decimal places, where 1 unit of token is represented by 1,000,000,000,000,000,000 or 10^18 natural units.