Search code examples
blockchainethereumbitcoin

How is the total underlying cryptocurrency in a present state calculated in blockchain?


Since any amount of cryptocurrency could be burnt or lost(transact into a non existing address), how does this effect to the estimation of total amount of bitcoins/ethers/etc. in a blockchain with cryptocurrency at any given point of time?


Solution

  • How is the total underlying cryptocurrency in a present state calculated in blockchain?

    Since all outstanding coins are stored in the UTXO (unspent transaction output) database of full nodes, the total supply of coins can be calculated by adding up the value of all the UTXO, subtracting the provably burned coins. There will be many coins that are actually burned, but not provable, so the actual available currency will be lower than the result obtained.

    While it is true that coins can be burned or lost, not all can be proven as burned. For example, it cannot necessarily be proven that someone lost their keys. Some coins can be provably burned, however.

    OP_RETURN - coins in an OP_RETURN output, for example are not spendable, therefore can be provably burned.

    Known public keys or hashes - start with a nothing-up-my-sleeve pubkey or hash such as all zeros. Then encode it into an address and send coins to it. These are provably burned coins since it is virtually impossible to find the private keys or preimages of a chosen pubkey or hash.

    If a miner fails to claim the block reward and/or transaction fees in the coinbase transaction of a block, those coins are also lost forever and obviously provable.

    See https://bitcoin.stackexchange.com/q/1851/60443