1
Is there any tool to check sum of all BTC based on transactions? We can easily get this amonut by sum up mining rewards, but what about sum up all non zero wallet balances?
1
Is there any tool to check sum of all BTC based on transactions? We can easily get this amonut by sum up mining rewards, but what about sum up all non zero wallet balances?
1
Sort of.
Bitcoin Core's gettxoutsetinfo RPC command iterates through the entire UTXO set (the set of outputs that haven't been spent yet by another transaction).
Currently, it reports:
"height": 539935
"total_amount": 17249017.33071828
This is the approach you're looking for as it is computed from the actual outputs and inputs, though with a few caveats:
Note the discrepancy with the expected amount in circulation at that height (17249200.00000000). There are various reasons for this. My answer https://bitcoin.stackexchange.com/a/38998/208 goes into the details.
I don't know of an existing tool that does this, but it should be easy enough to iterate over each block and sum up the outputs. – Raghav Sood – 2018-09-04T07:39:47.020
are you sure that method? when I send you 1 BTC, and in next block you will send me 1BTC sum of our outputs will be 2 BTC, but we was operate using only 1 BTC – needprayfornotaxes – 2018-09-04T07:47:38.440
Ah, yes, you are right. You will to sum all inputs and all outputs, and subtract at the end. – Raghav Sood – 2018-09-04T08:02:26.380
but each transaction input need to be equal output right? so the result will be 0 – needprayfornotaxes – 2018-09-04T08:06:55.290
Since all coins start from a coinbase tx with a 0 input, at the end your outputs will exceed your inputs by the amount of BTC created – Raghav Sood – 2018-09-04T08:41:12.563