Never Get High on Your Own Supply - The Daily Gwei #47

Breaking down the weekend Crypto Twitter drama.

Shout-out to Josh Stark for providing the title of today’s piece!

There was a heated debate on Twitter over the weekend that was focused on how to calculate the current supply of ETH on Ethereum. This debate raged on for a while and was incredibly noisy so in today’s piece I’m going to break it all down to clear up all of the confusion.

The reason why there was a debate over this in the first place is because there is no built-in function on Ethereum clients like Geth to easily query the total ETH supply whereas there is a single function - gettxoutsetinfo - that can be run on the Bitcoin Core client to query the current BTC supply. I do want to note though that this function call just reports the sum of total outputs in the Bitcoin UTXO set which means it doesn’t account for unspendable outputs like genesis, op_return, unclaimed mining rewards, and duplicate coinbase transaction id outputs (h/t to Andrew for the explanation here). Fubuloubu also put together a nice thread explaining this a little further here.

Different block explorers/data providers also fail to report the correct BTC and ETH supply because they have their own ways of calculating it. Some take the naive approach for BTC of just doing the simple math (block reward calculation) which misses all of the things I mentioned above. With ETH, block explorers/data providers may write their own scripts to calculate this value, do naive math based on block rewards or just simply copy other providers. You can see below how large some of the discrepancies can be between providers.

Even if you have a really great script, calculating the exact circulating ETH supply (and keeping it up to date) is tricky for a few reasons. Firstly, as Taylor explains, there are constantly 1 or 2 block reorgs on Ethereum (by design) and crazy periods on the network like the DoS attacks of late 2016. These edge cases lead to an increase in uncle blocks which can be missed by certain counting methods. Vitalik also explains that service providers may subtract destroyed coins (something unique to Ethereum) from their total ETH supply tally. Finally, Tim Beiko put together an excellent thread breaking down the more technical aspects of why counting the total ETH supply is more involved than counting the total BTC supply.

As you can see, calculating the current accessible supply of a blockchain is rather difficult and there’s plenty of edge cases that need to be accounted for. If you want to do it yourself with Ethereum you can either use this script from Marc-Andre Dumas or run this command or check out this tool from Nethermind. I have seen people talking about making this a function call in Ethereum clients as well which should (hopefully) solve this issue once and for all!

Have a great day everyone,
Anthony Sassano

All information presented above is for educational purposes only and should not be taken as investment advice.

Follow and Support Me