Bitcoin Forum
May 09, 2024, 12:23:09 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Way to calculate unspent UTXO by age?  (Read 512 times)
adaseb (OP)
Legendary
*
Offline Offline

Activity: 3752
Merit: 1710



View Profile
November 04, 2017, 10:22:09 PM
 #1

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.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
1715257389
Hero Member
*
Offline Offline

Posts: 1715257389

View Profile Personal Message (Offline)

Ignore
1715257389
Reply with quote  #2

1715257389
Report to moderator
1715257389
Hero Member
*
Offline Offline

Posts: 1715257389

View Profile Personal Message (Offline)

Ignore
1715257389
Reply with quote  #2

1715257389
Report to moderator
1715257389
Hero Member
*
Offline Offline

Posts: 1715257389

View Profile Personal Message (Offline)

Ignore
1715257389
Reply with quote  #2

1715257389
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715257389
Hero Member
*
Offline Offline

Posts: 1715257389

View Profile Personal Message (Offline)

Ignore
1715257389
Reply with quote  #2

1715257389
Report to moderator
haltingprobability
Member
**
Offline Offline

Activity: 98
Merit: 26


View Profile
November 04, 2017, 11:38:28 PM
 #2

is there anyway to calculate amount of UTXO by years.

You can use a blockchain parser 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.
piotr_n
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
November 05, 2017, 05:03:21 PM
Merited by ABCbits (2)
 #3

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.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
adaseb (OP)
Legendary
*
Offline Offline

Activity: 3752
Merit: 1710



View Profile
November 05, 2017, 05:31:48 PM
 #4

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?

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
piotr_n
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
November 05, 2017, 06:17:38 PM
 #5

How did you calculate that figure?

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


Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
adaseb (OP)
Legendary
*
Offline Offline

Activity: 3752
Merit: 1710



View Profile
November 05, 2017, 06:32:04 PM
 #6

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.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!