Bitcoin Forum

Bitcoin => Project Development => Topic started by: Stephen Gornick on May 22, 2011, 01:25:42 AM



Title: [PAID] Publish result of Days Destroyed calculation
Post by: Stephen Gornick on May 22, 2011, 01:25:42 AM
This is a bounty award to develop a script to compute the BitcoinDays Destroyed by the transactions in a block.

Description:
Scan all the transactions in the block chain and dump out a .csv file that shows BitcoinDays Destroyed calculation result per block.

Requirements:
  - Accesses block chain using bitcointools  (see the project's statistics.py as an example)
      http://github.com/gavinandresen/bitcointools (http://github.com/gavinandresen/bitcointools)
  - Developed in python and licensed MIT/X11
  - BitcoinDays Destroyed Calculation following ByteCoin's recommendation:
      http://forum.bitcoin.org/index.php?topic=6172.msg90789#msg90789 (http://bitcointalk.org/index.php?topic=6172.msg90789#msg90789)
  - [edit: ] accept (optional) block number argument  to produce calculation result total for a single block.

The bounty so far is: 10 BTC


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: error on May 22, 2011, 01:38:06 AM
Do you just want a total for each block, or a calculation for each transaction in each block?


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: Stephen Gornick on May 22, 2011, 01:43:18 AM
Do you just want a total for each block, or a calculation for each transaction in each block?

The total BitcoinDays Destroyed for each block.


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: error on May 22, 2011, 01:44:33 AM
Do you just want a total for each block, or a calculation for each transaction in each block?

The total BitcoinDays Destroyed for each block.

Sounds fun, give me an hour or two. Been a while since I did any serious Python work. :)


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: FreeMoney on May 22, 2011, 02:10:18 AM
I'm in for 3BTC if it tracks BitcoinDays over time and updates with each block. Good for a month.


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: error on May 22, 2011, 02:24:20 AM
OK, maybe it'll take me more than an hour or two. Though after looking at this for a short while, I think it would be easier to add this to Block Explorer.


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: FreeMoney on May 22, 2011, 02:41:39 AM
OK, maybe it'll take me more than an hour or two. Though after looking at this for a short while, I think it would be easier to add this to Block Explorer.

Just make a new block explorer. :)

It's a really nice thing to have, would suck if it went down even for a little while. Good to have another.


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: error on May 22, 2011, 02:57:24 AM
OK, maybe it'll take me more than an hour or two. Though after looking at this for a short while, I think it would be easier to add this to Block Explorer.

Just make a new block explorer. :)

It's a really nice thing to have, would suck if it went down even for a little while. Good to have another.

I've considered it; I think the existing one is a bit less friendly than it could be.

On another note, I found an Easter egg in the genesis block:

Code:
The Times 03/Jan/2009 Chancellor on brink of second bailout for banks


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: error on May 22, 2011, 03:58:25 AM
Bah, bitcointools needs a lot of cleanup, or I'll have to write a massive amount of duplicate code. Much of it was not designed for people to build on. Not my idea of fun.


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: unfinishe on May 22, 2011, 05:10:34 AM
I think I've got an idea on how to do this, but I'm rusty on my python, so please bear with me for a little while...


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: error on May 22, 2011, 07:47:31 PM
OK, I think my code is complete and fully debugged, well, as well as that gets without others playing with it. Right now I'm running it over the whole block chain before I publish it (this will probably take a couple of hours).


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: error on May 22, 2011, 08:32:43 PM
OK, it took more like 20 minutes to run through the whole block chain. Goes really fast through those tens of thousands of blocks with no transactions. :)

Instructions:

1. Download bitcoindays.py (http://dl.dropbox.com/u/24777749/bitcoindays.py).

2. Drop it in the same directory as bitcointools.

3. Run it for a single block:
Code:
python bitcoindays.py --block=125635
Run it for a range of blocks (if either start or end are specified):
Code:
python bitcoindays.py --block-start=125000 --block-end=125999
Run it for the entire block chain:
Code:
python bitcoindays.py > bitcoindays.csv

When run on the entire block chain, it will show a progress indicator on screen.

The CSV contains two columns, the block height, and the accumulated bitcoindays for all the transactions in that block.

4. Send me lots of bitcoins.  ;D  183g7trsCxkug8C8zAxR6Ro3qnLnoDLFo7

# Copyright (c) 2011 Michael Hampton
# Copyright (c) 2010 Gavin Andresen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

I'm in for 3BTC if it tracks BitcoinDays over time and updates with each block. Good for a month.

I don't think this is doable with bitcointools since it requires bitcoin to be offline. As I said before, this sort of thing should be added to Block Explorer or an equivalent. Or perhaps done via JSON-RPC to a running bitcoind.


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: unfinishe on May 23, 2011, 12:26:11 AM
Darn, darn, darn. I just managed to iron out the last snags in my code.  :'(

http://dl.dropbox.com/u/28441300/destroyed.py
http://dl.dropbox.com/u/28441300/deserialize_destroyed.py

Copy them into the bitcointools folder.

As far as I can tell, I'm getting more or less the same results (with little differences here and there for some reason). You can see my full output here: http://dl.dropbox.com/u/28441300/output.txt

Oh well. It was fun and enlightening anyway. (By the way, not to brag but mine is faster ;D)


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: error on May 23, 2011, 12:44:36 AM
You seem to have done some funny rounding-off. That's probably the source of the differences.

(And speed wasn't on the list of requirements :P )

And you don't seem to have implemented an option to process a single block?

EDIT: Your code was right (though the rounding is still confusing). Though in the process of checking it, I found a bug in MY code (and fixed it).


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: jerfelix on May 23, 2011, 02:23:01 AM
Let's see if I can interpret this.  The last ten blocks of output look something like this:


125384,342.04
125385,1626.24
125386,16030.47
125387,182937.81
125388,23690.77
125389,146.36
125390,4092.02
125391,7074.40
125392,41.07
125393,140665.75

Looking at the last block, Block #125393, there have been 50 x 125,393 == 6,269,650 Bitcoins mined since the beginning of time.  The first 50 coins mined have been in existence for roughly 125,393 x 10 minutes, while the most recent 50 are brand new.  Total BitCoin existence minutes are the 6,269,650 x the average, so 6,269,650 x 125,393 x 5 == 125,393^2 x 50 x 5 == 3.93E+12.  Since about 144 Blocks are created per day, this means that since the beginning of BitCoins, there have been 3.93E+12 / 144 == 2.73E+10 Total BitCoin Days ever.

And during block 125393, 1.4066575E+5 Bitcoin Days were destroyed, which is a whopping .000515%.
Cumulatively, there have been 594187738.6 BitCoin Days destroyed (adding up all of the 2nd figures on each line of this web page - http://dl.dropbox.com/u/28441300/output.txt ).  So cumulatively, 2.18% of the BitCoin Days have been destroyed.


I think that the most meaningful way to use these statistics is to look at the Percentage of Cumulative BitCoin Days Destroyed.  If my numbers are correct, we're at 2.18% Cumulative BitCoin Days Destroyed now (2.18% CBTCDD).  As less people hoard, that number will rise.  And this figure takes into account the new coins being mined.

This number has been on a fairly steady rise, from zero.
It's not exactly straight up, but generally, here's what I am seeing when I run the cumulative days destroyed calculations:


2/23 - 4/24/2010    0.6%
4/24  - 6/28/2010   0.7%  (flirted with 0.8% a few times and dropped back down)
6/28 - 7/28/2010    0.8%
7/28 - 7/30/2010    0.9%
7/30 - 8/1/2010      1.0%
8/1 - 8/2/2010        1.1%
8/2 - 8/9/2010        1.2%
8/9 - 9/19/2010      1.3%
9/19 - 12/12/2010   1.4%
12/12 - 12/30/2010 1.5% 
12/30 - 2/13/2011   1.7%  (skipped right over 1.6%!)
2/13 - 4/18/2011     1.8%
4/18 - 4/20/2011     1.9%
4/20 - 5/8/2011       2.0%
5/8 - 5/16/2011       2.1%
5/16 - present         2.2%


Hope this helps.

Hey guys, I'm trying to test some merchant software, and I am new to BitCoins and haven't gotten my first bits... and the faucet has been dry.  Can anyone shoot me a loan (or gift of .01, if these numbers were valuable)?    1BZbpx7wHAUcBgzAtH4KeogTmtgUrq5Nkk   Much appreciated!


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: Mike Hearn on May 24, 2011, 11:09:33 AM
Coins sent.


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: jerfelix on May 24, 2011, 02:55:22 PM
Coins sent.
That was awesome, and very nice of you!!  Thanks!


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: luv2drnkbr on May 25, 2011, 11:39:34 AM
I'm vaguely understanding the "bitcoin days" concept as a measurement of overall market activity, but I'm still confused.  Could somebody explain this to me in a simple manner, as if I were a child, so that I can get a better conceptual understanding?  (I did read the post with the original idea in it, still don't understand.)  Thanks guys!!!


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: darbsllim on May 25, 2011, 11:40:58 AM
This is a bounty award to develop a script to compute the BitcoinDays Destroyed by the transactions in a block.

Description:
Scan all the transactions in the block chain and dump out a .csv file that shows BitcoinDays Destroyed calculation result per block.

Requirements:
  - Accesses block chain using bitcointools  (see the project's statistics.py as an example)
      http://github.com/gavinandresen/bitcointools (http://github.com/gavinandresen/bitcointools)
  - Developed in python and licensed MIT/X11
  - BitcoinDays Destroyed Calculation following ByteCoin's recommendation:
      http://forum.bitcoin.org/index.php?topic=6172.msg90789#msg90789 (http://forum.bitcoin.org/index.php?topic=6172.msg90789#msg90789)
  - [edit: ] accept (optional) block number argument  to produce calculation result total for a single block.

The bounty so far is: 10 BTC


For those of us who are not sure what BitcoinDays Destroy means... what is the value of knowing these numbers?


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: jerfelix on May 25, 2011, 04:04:56 PM


For those of us who are not sure what BitcoinDays Destroy means... what is the value of knowing these numbers?

Basically, the system is currently creating about 6.3 Million Bitcoin days every day.  In layman's terms, that means that each day that goes by, the 6.3 Million bitcoins could have been hoarded for another day.   If a hoarder cashes in some of their "stash", then they "destroy" Bitcoin Days.  Destruction of BitCoin Days is a healthy thing.  It is a measure of circulation.

To date, there have been approximately 27.3 Billion Bitcoin days created.  And about 2.2% of those have been destroyed.  This figure has been rising steadily.  (See my post that I linked to, above).  Since this is RISING, this means that more and more bitcoins are being circulated - a very good thing for the future prospects of Bitcoins.

If you are a speculator, you'd be wise to keep an eye on that "cumulative Bitcoin Days Destroyed" figure.   If it begins going down, that means that less bitcoins are being circulated, and more are being hoarded.  That's the sign of a bubble forming.  (This may be hard to believe, but we're not in a bubble now - the cumulative bitcoin days destroyed is increasing, meaning there's more spending and less hoarding than there has been in the past!  This is a VERY good sign for the long-term viability of Bitcoins.)

If cumulative Bitcoin Days Destroyed begins to go down, that's an indication that people are "over-hoarding".


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: dissipate on May 25, 2011, 05:00:04 PM
Perhaps this stat could be added to this page? http://blockexplorer.com/q


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: SgtSpike on May 25, 2011, 05:36:34 PM


For those of us who are not sure what BitcoinDays Destroy means... what is the value of knowing these numbers?

Basically, the system is currently creating about 6.3 Million Bitcoin days every day.  In layman's terms, that means that each day that goes by, the 6.3 Million bitcoins could have been hoarded for another day.   If a hoarder cashes in some of their "stash", then they "destroy" Bitcoin Days.  Destruction of BitCoin Days is a healthy thing.  It is a measure of circulation.

To date, there have been approximately 27.3 Billion Bitcoin days created.  And about 2.2% of those have been destroyed.  This figure has been rising steadily.  (See my post that I linked to, above).  Since this is RISING, this means that more and more bitcoins are being circulated - a very good thing for the future prospects of Bitcoins.

If you are a speculator, you'd be wise to keep an eye on that "cumulative Bitcoin Days Destroyed" figure.   If it begins going down, that means that less bitcoins are being circulated, and more are being hoarded.  That's the sign of a bubble forming.  (This may be hard to believe, but we're not in a bubble now - the cumulative bitcoin days destroyed is increasing, meaning there's more spending and less hoarding than there has been in the past!  This is a VERY good sign for the long-term viability of Bitcoins.)

If cumulative Bitcoin Days Destroyed begins to go down, that's an indication that people are "over-hoarding".
Interesting metric - thanks for the explanation!


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: darbsllim on May 26, 2011, 07:10:42 AM
jerfelix - how did you figure this out, and how did you figure out that is when a bubble is forming?


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: error on May 26, 2011, 07:14:05 AM
jerfelix - how did you figure this out, and how did you figure out that is when a bubble is forming?

This metric is weighted by the amount of time someone held a bitcoin before spending it, something that it's never before been possible to measure with any other currency. If people hold more Bitcoins over time, then it will go down; if they spend, it will go up. If they hold for a long time and then spend, it will go WAY up.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: fergalish on May 26, 2011, 08:16:06 AM
You know, it would probably be far more convenient to work in units of bitcoin-blocks, instead of bitcoin-days.  So if B is the current block number, and the total number of bitcoins is 50B~6 million, then every new block adds another 50B bitcoin-blocks.

Then you can trivially see if a block's net effect is to add bitcoin-blocks to the total, or subtract.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: error on May 26, 2011, 08:19:11 AM
You know, it would probably be far more convenient to work in units of bitcoin-blocks, instead of bitcoin-days.  So if B is the current block number, and the total number of bitcoins is 50B~6 million, then every new block adds another 50B bitcoin-blocks.

Then you can trivially see if a block's net effect is to add bitcoin-blocks to the total, or subtract.

Yes, but we don't live in the block chain; we measure time by hours and days, not blocks.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: Raulo on May 26, 2011, 09:14:36 AM
If people hold more Bitcoins over time, then it will go down; if they spend, it will go up. If they hold for a long time and then spend, it will go WAY up.

One can argue (and it probably works perfectly on the stock market) that a large value of bitcoin days destroyed may mean that the Bitcoin "founding fathers" (insiders) start to run for the exits.



Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: error on May 26, 2011, 09:17:57 AM
If people hold more Bitcoins over time, then it will go down; if they spend, it will go up. If they hold for a long time and then spend, it will go WAY up.

One can argue (and it probably works perfectly on the stock market) that a large value of bitcoin days destroyed may mean that the Bitcoin "founding fathers" (insiders) start to run for the exits.

Maybe, maybe not. I'm working on a related project right now (which unfortunately nobody's offered any significant bounty for) which may provide some further insight into this.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: N12 on May 26, 2011, 09:27:28 AM
How can you know that most Bitcoin days destroyed aren’t just people moving old coins between their addresses?


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: jerfelix on May 26, 2011, 09:53:05 AM
jerfelix - how did you figure this out, and how did you figure out that is when a bubble is forming?

I didn't invent the Bitcoin-days-destroyed metric, someone else did.  I was just trying to interpret it.
My addition was to make it a cumulative value.  All I did was take the spreadsheet that other people produced, and summed it up, and calculated a percentage off of the total Bitcoins in circulation since the beginning of time. 

Regarding a bubble - that's my interpretation.  I could be wrong, but it seem like when people start hoarding, that will cause prices of Bitcoins to go up irrationally, bubble-style.  And the Cumulative Bitcoin Days Destroyed metric seems like a decent metric to determine the level of hoarding.

How can you know that most Bitcoin days destroyed aren’t just people moving old coins between their addresses?

Your concern is definitely a limitation of the metric. 

Another interesting consideration is this:  Since the spending algorithm always favors spending smaller "denominations" first (if I understand it correctly), this means that as the old-timers who are active in the system will generally be spending "new money" until they get some coins in big chunks.  For example, an old miner has a bunch of 50 BTC units in his wallet, from his mining success.  And as long as he has tiny units (1 BTC, 5 BTC, etc), the old mined 50 BTC units never get spent.  But if he gets a large chunk of money that's been actively circulating, say 100 BTC, then this will be hoarded in his account until he spends all his 50's.

So I think cumulative bitcoin days destroyed is a pretty decent metric, but certainly not perfect.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: luv2drnkbr on May 26, 2011, 10:16:33 AM
I feel like BTC Days Destroyed should be able to be roughly calculated (not exact) by the average number and size (in btc) of transactions per block and the average interval between blocks, over the entire life of bitcoins.  Like couldn't I just find the total amount of BTC traded per block, and get how many "bitcoin blocks" instead of "bitcoin days" by using the summation forumla:

(Blocks^2 + Blocks) / 2

And then just figure out the average number of blocks per day.  Those figures should give a basis of measurement of btc days destroyed should they not?  Is that true, or am I wrong about that?

If I am correct, could somebody post the (roughly accurate but not completely accurate) formula for btc days destroyed, since I can't read python!..?  Thank you!


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: luv2drnkbr on May 26, 2011, 10:19:20 AM
How can you know that most Bitcoin days destroyed aren’t just people moving old coins between their addresses?

That's not possible to know, and it doesn't really matter anyway.  If I'm understanding it correctly, it's just a velocity of money metric to gage market spenditure versus hoarding.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: FreeMoney on May 26, 2011, 06:37:47 PM
I feel like BTC Days Destroyed should be able to be roughly calculated (not exact) by the average number and size (in btc) of transactions per block and the average interval between blocks, over the entire life of bitcoins.  Like couldn't I just find the total amount of BTC traded per block, and get how many "bitcoin blocks" instead of "bitcoin days" by using the summation forumla:

(Blocks^2 + Blocks) / 2

And then just figure out the average number of blocks per day.  Those figures should give a basis of measurement of btc days destroyed should they not?  Is that true, or am I wrong about that?

If I am correct, could somebody post the (roughly accurate but not completely accurate) formula for btc days destroyed, since I can't read python!..?  Thank you!

BTCDD is better precisely because of it's difference with something like you describe. It gets at the difference between Satoshi unloading and noob shipping coins around all day.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: luv2drnkbr on May 27, 2011, 06:42:23 PM
If it's not too much trouble, could you explain how and why?  I'm still very confused, but I like the concept (or at least the vague notion of it that I have, which you've stated is clearly incorrect).  I very much want to understand, and I'm sorry for being a pain.  I just want to understand but I don't.  I feel terrible and idiotic and I don't want to be wasting your time like this, but please, please help me understanding how this metric works and what it is.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: jerfelix on May 27, 2011, 07:58:47 PM
If it's not too much trouble, could you explain how and why?  I'm still very confused, but I like the concept (or at least the vague notion of it that I have, which you've stated is clearly incorrect).  I very much want to understand, and I'm sorry for being a pain.  I just want to understand but I don't.  I feel terrible and idiotic and I don't want to be wasting your time like this, but please, please help me understanding how this metric works and what it is.

I'll try to explain by examples.  Here are several transactions.

1.  Someone who mined 50 bitcoins exactly one year ago spends them.
2.  Someone who mined 50 bitcoins yesterday at this time spends them.
3.  Someone given 50 bitcoins today spends them 12 hours later.
4.  Someone moves 50 bitcoins from one wallet to another (but they own both)

In case 1, you can examine the block and see that the last time this particular money was touched was 1 year ago.  So that's 50 coins, times 365 days that have been "hoarded", but now are spent.  So that's 50x365 => 18,250 Bitcoin-days destroyed.  That's good.

In case 2, the coins weren't hoarded as long.  50 Bitcoin-days destroyed.

Case 3 might be the "same coins" as case 1 or 2, only they circulated again.  But since they recently circulated, it's not nearly as good as 1, and only half as good as case 2.  25 Bitcoin-days destroyed.

Case 4 is the odd case, because money didn't really change hands, but you can't tell that.  It still counts as "circulated".  In one sense, it's an indication that the bitcoins haven't been lost, so it's a good metric.  On the other hand, moving money from one pocket to another really isn't a good measure of economic activity!


Does that help?


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: Stephen Gornick on May 27, 2011, 09:29:17 PM
This BitcoinDays Destroyed number still doesn't provide a perfect picture, it is just a much better measure than looking at raw spending totals.  Here's an example:

1.  Someone who mined 50 bitcoins exactly one year ago spends them.

Consider a slight variation on that ... example 5:
5. Someone who mined 50 bitcoins exactly one year ago spends 1 BTC.

In Case 5 only 1 BTC was spent and 49 BTC was returned as change.  There would still be 18,250 Bitcoin-days destroyed, even though the coins representing all but 365 of those Bitcoin-days remained in the same wallet.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: error on May 27, 2011, 10:25:19 PM
This BitcoinDays Destroyed number still doesn't provide a perfect picture, it is just a much better measure than looking at raw spending totals.  Here's an example:

1.  Someone who mined 50 bitcoins exactly one year ago spends them.

Consider a slight variation on that ... example 5:
5. Someone who mined 50 bitcoins exactly one year ago spends 1 BTC.

In Case 5 only 1 BTC was spent and 49 BTC was returned as change.  There would still be 18,250 Bitcoin-days destroyed, even though the coins representing all but 365 of those Bitcoin-days remained in the same wallet.

I'm working on some ways of detecting which transaction was the change. In many cases this is trivial.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: SgtSpike on May 27, 2011, 11:41:56 PM
The downside of days destroyed is that it is releasing more funds into what is presumably, an active economic exchange pattern.  Unless whoever receives those coins continues to hoard them, it will ultimately DECREASE the overall value of bitcoins, since there is now more "active" supply of them.


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: k on May 28, 2011, 02:48:34 PM

As far as I can tell, I'm getting more or less the same results (with little differences here and there for some reason). You can see my full output here: http://dl.dropbox.com/u/28441300/output.txt


maybe I'm missing something but are there some errors in these numbers for BTC days destroyed? Some blocks have negative values for days destroyed.

For example see block 65711 has -151.03 BTC days destroyed. There are 48 other blocks in this csv file with negative numbers for days destroyed.

Very interesting data and analysis by the way. thanks to all concerned.


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: unfinishe on May 28, 2011, 03:02:18 PM

As far as I can tell, I'm getting more or less the same results (with little differences here and there for some reason). You can see my full output here: http://dl.dropbox.com/u/28441300/output.txt


maybe I'm missing something but are there some errors in these numbers for BTC days destroyed? Some blocks have negative values for days destroyed.

For example see block 65711 has -151.03 BTC days destroyed. There are 48 other blocks in this csv file with negative numbers for days destroyed.

Very interesting data and analysis by the way. thanks to all concerned.


Well, looking at the Block Explorer for block 65711, it seems that the previous block 65710, which holds the redeemed output, actually has a timestamp that is later than block 65711. So, apparently the calculation is "correct", but I honestly don't know why the dates are backwards...


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: luv2drnkbr on May 28, 2011, 03:03:52 PM
This BitcoinDays Destroyed number still doesn't provide a perfect picture, it is just a much better measure than looking at raw spending totals.  Here's an example:

1.  Someone who mined 50 bitcoins exactly one year ago spends them.

Consider a slight variation on that ... example 5:
5. Someone who mined 50 bitcoins exactly one year ago spends 1 BTC.

In Case 5 only 1 BTC was spent and 49 BTC was returned as change.  There would still be 18,250 Bitcoin-days destroyed, even though the coins representing all but 365 of those Bitcoin-days remained in the same wallet.

I understood the first 4 examples, but not that example 5 you just explained.  Why are all 18250 BTC days destroyed?  Why not just 365?  Is it because some part of the 50 that was originally minted is finally spent, regardless of how many?  If so, why?


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: k on May 28, 2011, 03:27:37 PM

As far as I can tell, I'm getting more or less the same results (with little differences here and there for some reason). You can see my full output here: http://dl.dropbox.com/u/28441300/output.txt


maybe I'm missing something but are there some errors in these numbers for BTC days destroyed? Some blocks have negative values for days destroyed.

For example see block 65711 has -151.03 BTC days destroyed. There are 48 other blocks in this csv file with negative numbers for days destroyed.

Very interesting data and analysis by the way. thanks to all concerned.


Well, looking at the Block Explorer for block 65711, it seems that the previous block 65710, which holds the redeemed output, actually has a timestamp that is later than block 65711. So, apparently the calculation is "correct", but I honestly don't know why the dates are backwards...

good spot on the time stamp inconsistencies. I was looking at the block explorer to try and make sense of the numbers but didn't notice that. Maybe someone else can explain why the time stamps are out of sync with the block numbers


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: k on May 28, 2011, 03:39:37 PM
This BitcoinDays Destroyed number still doesn't provide a perfect picture, it is just a much better measure than looking at raw spending totals.  Here's an example:

1.  Someone who mined 50 bitcoins exactly one year ago spends them.

Consider a slight variation on that ... example 5:
5. Someone who mined 50 bitcoins exactly one year ago spends 1 BTC.

In Case 5 only 1 BTC was spent and 49 BTC was returned as change.  There would still be 18,250 Bitcoin-days destroyed, even though the coins representing all but 365 of those Bitcoin-days remained in the same wallet.

I understood the first 4 examples, but not that example 5 you just explained.  Why are all 18250 BTC days destroyed?  Why not just 365?  Is it because some part of the 50 that was originally minted is finally spent, regardless of how many?  If so, why?

if I understand it correctly when you receive bitcoins it's like having a "bitcoin note" of the denomination of the amount that you received them. so if you mine 50 BTC you get a 50 "BTC note" say. For simplicity, say you only have that 50 BTC in your wallet. You spend 1 BTC, so that "note" has to be broken - so it's like all 50 are spent, 1 BTC goes to the address you sent it to and the change of 49 BTC is returned to an address you own. So now you have 49 BTC in your wallet that are fresh (i.e. zero days old). For the BTC days destroyed calculation it's like all 50 BTC have been spent (so days destroyed = 50 x # of days you've held them) even though in reality you've sent 1 BTC and still own the other 49.

hope that's right. someone can correct me if I'm wrong.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: Sukrim on May 28, 2011, 06:44:33 PM
Btw. does this script calculate in "bitcoin time" (=2016 Blocks = 2 weeks) or in "human time" (14 days = 2 weeks)?

With the constant increase of difficulty, the "Bitcoin time" should already be well into summer 2011...


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: error on May 28, 2011, 08:19:17 PM

As far as I can tell, I'm getting more or less the same results (with little differences here and there for some reason). You can see my full output here: http://dl.dropbox.com/u/28441300/output.txt


maybe I'm missing something but are there some errors in these numbers for BTC days destroyed? Some blocks have negative values for days destroyed.

For example see block 65711 has -151.03 BTC days destroyed. There are 48 other blocks in this csv file with negative numbers for days destroyed.

Very interesting data and analysis by the way. thanks to all concerned.


Well, looking at the Block Explorer for block 65711, it seems that the previous block 65710, which holds the redeemed output, actually has a timestamp that is later than block 65711. So, apparently the calculation is "correct", but I honestly don't know why the dates are backwards...

good spot on the time stamp inconsistencies. I was looking at the block explorer to try and make sense of the numbers but didn't notice that. Maybe someone else can explain why the time stamps are out of sync with the block numbers

Someone was screwing with the network at the time, I would guess.


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: Akiron on May 28, 2011, 10:09:21 PM

Looking at the last block, Block #125393, there have been 50 x 125,393 == 6,269,650 Bitcoins mined since the beginning of time.  The first 50 coins mined have been in existence for roughly 125,393 x 10 minutes, while the most recent 50 are brand new.  Total BitCoin existence minutes are the 6,269,650 x the average, so 6,269,650 x 125,393 x 5 == 125,393^2 x 50 x 5 == 3.93E+12.  Since about 144 Blocks are created per day, this means that since the beginning of BitCoins, there have been 3.93E+12 / 144 == 2.73E+10 Total BitCoin Days ever.


The conversion from Bitcoin minutes to Bitcoin days doesn't make sense to me. Shouldn't you be dividing by the number of minutes in a day (1440)?
Think of the dimensional analysis, currently you have a figure that is Bitcoins * Minutes, and you want a figure that is Bitcoins*Days, thus you need to multiply by 1 Days/ 1440 Minutes giving 3.93E+12 / 1440 == 2.73E+9 Total BitCoin Days ever. Right?


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: luv2drnkbr on May 29, 2011, 10:45:29 AM
if I understand it correctly when you receive bitcoins it's like having a "bitcoin note" of the denomination of the amount that you received them. so if you mine 50 BTC you get a 50 "BTC note" say. For simplicity, say you only have that 50 BTC in your wallet. You spend 1 BTC, so that "note" has to be broken - so it's like all 50 are spent, 1 BTC goes to the address you sent it to and the change of 49 BTC is returned to an address you own. So now you have 49 BTC in your wallet that are fresh (i.e. zero days old). For the BTC days destroyed calculation it's like all 50 BTC have been spent (so days destroyed = 50 x # of days you've held them) even though in reality you've sent 1 BTC and still own the other 49.

hope that's right. someone can correct me if I'm wrong.

Since I don't quite get it myself, I can't confirm the accuracy of what you said, but if you are right, I now understand the metric.  Thank you for that clear explanation.  I truly appreciate it.  I finally get it!


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: Akiron on May 29, 2011, 10:19:20 PM
I've started an article on the wiki: https://en.bitcoin.it/wiki/Bitcoin_Days_Destroyed (https://en.bitcoin.it/wiki/Bitcoin_Days_Destroyed).


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: k on May 29, 2011, 10:32:10 PM
hi Akiron,

is the y-axis scale correct. looks like it's out by a factor of 100 if jerfelix's previous calculations were right.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: k on May 29, 2011, 10:54:08 PM
sorry Akiron,

just realized that your graph takes into account the 1440 minutes in a day factor that you mentioned in a post above.

the % of cumulative days destroyed/total BTC days at >20% seems quite high to me. does the calculation for days destroyed need to be corrected for the 1440 minutes in a day too?


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: error on June 02, 2011, 12:47:03 AM
I've made an update to my script. It now accepts a range of blocks to scan using the --block-start and --block-end options.

Examples:

Scan from a specific block to the end of the block chain (right now):
Code:
python bitcoindays.py --block-start=125000

Scan from the genesis block to a specific block:
Code:
python bitcoindays.py --block-end=1000

Scan a specified range of blocks:
Code:
python bitcoindays.py --block-start=125000 --block-end=125999

The original code, documentation, download link and Bitcoin donation address can be found earlier in the thread, here (https://forum.bitcoin.org/index.php?topic=9300.msg135639#msg135639).


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: SpaceLord on June 04, 2011, 04:58:27 AM
What's the current chart for this? Is it available online?


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: error on June 04, 2011, 05:03:53 AM
What's the current chart for this? Is it available online?

Not that I know of. You'll have to run it yourself (or have someone do it for you and send you the data).


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: Stephen Gornick on June 18, 2011, 06:33:17 PM
I've considered it; I think the existing one is a bit less friendly than it could be.

Incidentally, an open source block explorer variant is now being developed:
  - http://forum.bitcoin.org/index.php?topic=16141.0


Title: Re: [Bounty] Publish result of Days Destroyed calculation
Post by: John Tobey on June 22, 2011, 01:19:50 AM
I'm in for 3BTC if it tracks BitcoinDays over time and updates with each block. Good for a month.

Not sure if I made 1 month or you paid out already, but ABE now does this.  https://github.com/jtobey/bitcoin-abe  Here is your query:

select cc.block_height, b.block_nTime, 100 * (1 - b.block_satoshi_seconds / b.block_total_ss) percent_btcdd from chain_candidate cc join block b using (block_id) where cc.chain_id = 1 and cc.in_longest = 1 and b.block_total_ss > 0 order by cc.block_height;

About to be on http://john-edwin-tobey.org:2750/chain/Bitcoin/ as soon as the schema upgrade completes.  Though that site is "development" and I know of no "production" ABE site.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: jjiimm_64 on September 20, 2011, 01:08:07 AM
EDIT:  putting this quote in to clarify the below part:

As far as I can tell, I'm getting more or less the same results (with little differences here and there for some reason). You can see my full output here: http://dl.dropbox.com/u/28441300/output.txt


maybe I'm missing something but are there some errors in these numbers for BTC days destroyed? Some blocks have negative values for days destroyed.

For example see block 65711 has -151.03 BTC days destroyed. There are 48 other blocks in this csv file with negative numbers for days destroyed.

Very interesting data and analysis by the way. thanks to all concerned.


Well, looking at the Block Explorer for block 65711, it seems that the previous block 65710, which holds the redeemed output, actually has a timestamp that is later than block 65711. So, apparently the calculation is "correct", but I honestly don't know why the dates are backwards...

good spot on the time stamp inconsistencies. I was looking at the block explorer to try and make sense of the numbers but didn't notice that. Maybe someone else can explain why the time stamps are out of sync with the block numbers

Someone was screwing with the network at the time, I would guess.





Someone was screwing with the network at the time, I would guess.

OK,  I am only halfway thru this thread, but I had to comment on this before I read the rest.........

How is it possible for someone to "screwing with the network at the time,"   .......  This one line has scared me more then any other 'scams, hacks, trolls, stealing, stupidness, goxisms, brucisms"



If someone can "screw with the network"  how can I trust the blockchain??

Please someone explain.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: Stephen Gornick on September 20, 2011, 10:44:10 AM
Someone was screwing with the network at the time, I would guess.

OK,  I am only halfway thru this thread, but I had to comment on this before I read the rest.........

How is it possible for someone to "screwing with the network at the time,"

It probably was referring to how the timestamps do not necessarily have to be in chronological order -- due to having tolerance.

- http://en.bitcoin.it/wiki/Block_timestamp


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: deepceleron on September 29, 2011, 06:50:14 PM
This BitcoinDays Destroyed number still doesn't provide a perfect picture, it is just a much better measure than looking at raw spending totals.  Here's an example:

1.  Someone who mined 50 bitcoins exactly one year ago spends them.

Consider a slight variation on that ... example 5:
5. Someone who mined 50 bitcoins exactly one year ago spends 1 BTC.

In Case 5 only 1 BTC was spent and 49 BTC was returned as change.  There would still be 18,250 Bitcoin-days destroyed, even though the coins representing all but 365 of those Bitcoin-days remained in the same wallet.

I understood the first 4 examples, but not that example 5 you just explained.  Why are all 18250 BTC days destroyed?  Why not just 365?  Is it because some part of the 50 that was originally minted is finally spent, regardless of how many?  If so, why?

If you have 50BTC in one address, and spend 1BTC of it, the remaining unspent currency does not stay at that address, it gets sent to a new generated address in your wallet. This is to enhance anonymity. Although you still have the coins, it looks like you sent them. A transaction would look like:

2010-12-25:
 Generate 50 BTC -> address Wallet1

2011-09-25:
Input 50 BTC from address Wallet1 ->
 Output 1 BTC -> recipient
 Output 49 BTC -> Wallet2

So the coins were unmoved for nine months, and although only 1 BTC was actually spent on 9-25, all of them were sent to new addresses.


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: FreeMoney on September 29, 2011, 06:55:50 PM
Or 49 were spent and 1 moved to wallet. Or they used SendMany and all of it was spent (slim chance I know).


Title: Re: [PAID] Publish result of Days Destroyed calculation
Post by: osmosis on October 01, 2011, 11:47:37 PM
Regarding days destroyed, I have come to the conclusion that it could be useful to have a days destroyed chart that multiplies the days destroyed by the historic bitcoin price at the time of that block.  This would show a measure of how much relative value is actually moving on the blockchain, rather then just showing it by number of coins which have a rapidly changing value at this early time. This is essentially similar to how bitcoincharts allows us to look at volume in bitcoins or USD.