3

I would like my token to have the maximum possible amount of tokens issued as a novelty. I would like to use 18 decimals standard ERC20 token, what value can I put in to get the maximum amount of tokens possible?

4

The maximum number of tokens, compatible with ERC20, is the maximum amount a uint256 variable can store: (2**256) - 1 with 0 decimals. If you use 18 decimals, the maximum amount of tokens is (2^256-1)/10^18 = 115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,‌​665,640,564,039,457

  • It should be (2**256-1)/10**18 = 115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457 – Ismael Aug 27 '17 at 9:53
  • @Ismael is that the same as (2**(256) - 1) ? – daniel metlitski Aug 27 '17 at 11:38
  • Thanks corrected it. I just wanted to make clear that he most likely isn't hitting the cap – Kevin Kaiser Aug 27 '17 at 18:58
  • @danielmetlitski uint256 has 256 bits of storage so the maximum number being (2**256) - 1. If you have one decimal you can represent at most [(2**256) - 1] / 10 the last digit will be your decimal, repeating that reasoning you get formula in the answer. – Ismael Aug 27 '17 at 19:04

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.