I'm looking at this smart contract and the token amount is enormous. Will somebody please explain the actual amount of tokens? It is supposed to be 800M tokens. enter image description here

  • Why should it be 800M tokens? Where's the token contract?
    – 0xcaff
    Jul 16 '17 at 2:20

The decimals controls how many decimal digits will use your token. The amount of tokens are expressed with all the possible decimal digits. But usually wallets format them accordingly.

For example if you set decimals to cero your token has no decimal digits. The minimal unit is 1 token, and it cannot be split in smaller units. If the total supply is 1000 tokens, in the contract is stored as 1000.

If you set decimals to 2, then you can split 1 token into smaller units. The minimal unit is 0.01 token. If the total supply is 1000 tokens it is stored in the contract as 100009. The two extra ceros are because of the decimals.

A frequent value for decimals is 18 because that is what Ethereum uses for the ethers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.