Would it theoretically be the Javascript Max Safe Integer?

  • 1
    What does Javascript have to do with it??? Since the largest unsigned integer type is uint256, the max integer value is 2 ^ 256 - 1. Jan 12, 2018 at 21:24
  • How hard would it be to create a coin with 2 ^ 256 - 1 supply?
    – user28818
    Jan 12, 2018 at 21:37
  • That's a totally different question, so you might want to post it separately. In any case, it seems to consist of two unrelated questions - how hard would it be to create a coin (which is the main question IMO), and how to set the supply to maximum (which, if I understand correctly, is just one line of code once you complete the first part - something like uint256 supply = ~0). Jan 12, 2018 at 21:48

1 Answer 1


Tokens on the Ethereum blockchain are normally stored inside an ERC20 compliant smart contract. Inside this contract the balance of each account is held inside a mapping from addresses to balances, as is explained quite well in this article. The total supply (as shown here) is stored in a state variable:

uint256 public totalSupply;

The theoretically largest value that can be stored in this variable is 2**256 - 1.

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.