cover

August 2020

SupplyGate: All the Ether in the World

Dr J. Rousselot

Ethereum as the World Computer

This seemingly simple question asked by Pierre Rochard early August 2020 turned out to be surprisingly difficult to answer. Each block explorer seems to have its own answer, varying between 110 millions and 120 millions. It is even more difficult to verify by ourselves.

Blockchains are decentralized databases creating an immutable consensus of what happened when. Ethereum was created five years ago by Vitalik Buterin et al driven by the vision of the world computer and smart contracts.

Vitalik himself joined the debate by referring to a website, considering the question answered.

I was very surprised to discover that:

  1. nobody in the past five years had apparently ever tried to answer this question and make their work public / open source ;
  2. Ethereum issuance was not recorded as a transaction in blocks but used a separate, almost parallel accounting mechanism ;
  3. Most people in the Ethereum community seemed uncomfortable with a valid and interesting technical question and answered with personal attacks instead.

Luckily, Ethereum developer Marc-Andre Dumas quickly developed a script over the weekend to make an estimate of the amount of Ether currently in circulation.

{item.article_image.alt}

How does the ethsupply script work?

This script iterates over every block every created in Ethereum. For each block, it queries a node and obtains the number of uncles for the block under consideration. A miner is rewarded not only for the block that it creates but also for each uncle block that it includes. Therefore the mining reward has three components:

  1. Ethereum miner issuance for its own block
  2. Ethereum issuance for uncle blocks
  3. transaction fees

All three amounts are variable. The first one is modified through Ethereum standard proposals (so-called EIP). Originally at 5 Ether up to block 4370000 (EIP-649), it was reduced to 3 Ether until block 7280000 (EIP-1234) at which it was finally reduced to 2 Ether.

The second component of the mining reward varies between 0 (no uncle block) to N (max number of uncle blocks) times the miner reward divided by 32.

The third amount is the amount of gas paid by each transaction. This incentivizes miners to include higher priority transactions, and as many transactions as possible.

Finally, each uncle miner receives newly issued Ether inversely proportional to the time between the uncle block creation and the mined block including it.

By estimating how much Ether had been issued (1/ + 2/) per each block and adding all these issuance amounts up to the current block, as well as all Ether issued to uncle block miners, the script by Dumas estimates how much ether has ever been issued through blocks creation.

It also takes into account all the Ether that was created before starting the Ethereum network (pre-mine or Genesis supply) to reward its creators. This amount is equal to 72009990.5 ETH.

Finally, the script tries to identify how much Ether was destroyed during the network operation. Ether can be destroyed by a) sending it to an invalid addresses such as 0x0000 to which no private key can match or b) by sending it to a valid address at which a smart contract exists, which can later self destruct rendering the address unusable as well as any asset it controls.

Verify

However this script does not measure the amount actually received by the miner. It should (and we highly expect it to) match the amount predicted by Dumas' script. Ultimately, the predicted amount still trusts the nodes to correctly execute the logic. It does not directly measure what the nodes actually received. This is why we added this feature to his script.

Unfortunately it took us one week to fully synchronize an Ethereum node as well as 240 GB SSD storage and a high end server on Amazon with 16 GB RAM. Despite this investment, our node did not have the data required for our script to function correctly. Indeed we used the fast sync method. This only downloads a compact representation of the Ethereum blockchain. We incorrectly assumed this would hold enough information to compute Ethereum balances at each block. We removed the computation for the uncle miner balances changes, but still there was not enough information. It now seems likely that a so-called full node is required, with 4 TB storage capacity. This goes beyond the investment we are ready to make for this small side proof of concept project and we hope someone with access to such a node will be able to share their results. Our code can be find here for those interested. It was a quick experimentation. We would recommend working with a testnet node first as datasets are smaller. It is thus easier to sync a node as well as to iterate over the script.

Finally, we should mention that someone else came up with some code that traverses all non-zero accounts at block N of Ethereum and adds all their balances. This code was implemented in the .Net Ethereum client library and cannot be run on other Ethereum nodes. The amount obtained by this script is very close (but not equal) to the amount found by the Dumas script.

Conclusion

In brief, we learned that:

  1. it is surprisingly difficult but not impossible to measure how many Ether there are ;
  2. Ethereum nodes discard the information required for this computation in their compact blockchain representation in order to minimize chain size ;
  3. a fast sync compact node requires 250 GB SSD in August 2020 and probably 8 GB RAM to sync, and a full node probably around 8 TB SSD storage.

As intermediary results are discarded for disk space efficiency and it becomes prohibitively expensive to recompute some if not all results, our understanding is that Ethereum is already in practice migrating to a Proof of Stake network, even if transaction validation still uses Proof of Work for now.

Indeed, if most professional developers cannot afford running a full node, then most/all information is obtained through block explorers and analytics companies, large multinationals like Consensys and exchanges.
The main motivations for all these companies to provide accurate and real time information and not to collude are:

  1. competition in a permissionless market ;
  2. their business interest ;
  3. digital asset stake in the protocol.

The ever increasing costs of running a node increase barriers to entry.


At the very least, this summer debate has lead to an improved understanding of how Ethereum works and the design choices behind it. We now have a better understanding on how Ether is created and how it can be measured., and many new tools have been developed to achieve this.

For further information on this story, we recommend you listen to Pompliano's podcast #359 with Pierre Rochard, and Vitalik Buterin and Samson Mow on Peter McCormack's podcast episode WBD251.

If you enjoyed this article, please share it and register to our low volume quarterly newsletter.