Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: adaseb on November 04, 2017, 10:22:09 PM



Title: Way to calculate unspent UTXO by age?
Post by: adaseb on November 04, 2017, 10:22:09 PM
According to this article,
https://blog.chainalysis.com/bitcoin-cash/

It appears that only 3.6% of Bitcoin Cash was spent with UTXO over 4 years ago, so its about 600,000 coins.

Looking at
https://utxo-stats.com/

It seems that going further than 4 years, that there are millions of bitcoins which seem unspent.


Was wondering is there anyway to calculate amount of UTXO by years. For example, what percentage or value of Bitcoins older than 4 years are still unspent.

I know there was an article that did something similiar but it dates back to 2014 and its inaccurate.


Title: Re: Way to calculate unspent UTXO by age?
Post by: haltingprobability on November 04, 2017, 11:38:28 PM
is there anyway to calculate amount of UTXO by years.

You can use a blockchain parser (https://www.cryptocoinsnews.com/block-parser-how-read-bitcoin-block-chain/) to extract the UTXOs manually. As you read the blocks in, just track the amount of UTXOs against current block-height, making sure the total balance is correct and cancelling old UTXOs as they are spent. When you've read in the entire blockchain, you should have a list of UTXOs for each block-height and now it's just a matter of summing over time, that is, total UTXOs < 1 yr old, <2yrs, <3yrs and so on until you've counted up all UTXOs since the Genesis block. Now you have your data.


Title: Re: Way to calculate unspent UTXO by age?
Post by: piotr_n on November 05, 2017, 05:03:21 PM
Was wondering is there anyway to calculate amount of UTXO by years. For example, what percentage or value of Bitcoins older than 4 years are still unspent.

As for bitcoin UTXO at block #493215.

The unspent records coming from blocks <#268000 (2013-11-05), they carry 3782649.88646469 BTC.
1774294.52259831 BTC of it is from coinbase transactions.


Title: Re: Way to calculate unspent UTXO by age?
Post by: adaseb on November 05, 2017, 05:31:48 PM
Was wondering is there anyway to calculate amount of UTXO by years. For example, what percentage or value of Bitcoins older than 4 years are still unspent.

As for bitcoin UTXO at block #493215.

The unspent records coming from blocks <#268000 (2013-11-05), they carry 3782649.88646469 BTC.
1774294.52259831 BTC of it is from coinbase transactions.

Wow. Is it really that high. Seems like almost 25% of all bitcoins are either lost or people are holding them forever.

How did you calculate that figure?


Title: Re: Way to calculate unspent UTXO by age?
Post by: piotr_n on November 05, 2017, 06:17:38 PM
How did you calculate that figure?

You can quite easily program this kind of query on UTXO.db in the node I use.



Title: Re: Way to calculate unspent UTXO by age?
Post by: adaseb on November 05, 2017, 06:32:04 PM
How did you calculate that figure?

You can quite easily program this kind of query on UTXO.db in the node I use.



Thanks I will check it out.