Pages:
Author

Topic: [PAID] Publish result of Days Destroyed calculation - page 3. (Read 11617 times)

sr. member
Activity: 266
Merit: 250


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".
sr. member
Activity: 297
Merit: 251
Founder, Filmmaker, Fun Guy
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
  - Developed in python and licensed MIT/X11
  - BitcoinDays Destroyed Calculation following ByteCoin's recommendation:
      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?
hero member
Activity: 793
Merit: 1026
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!!!
sr. member
Activity: 266
Merit: 250
Coins sent.
That was awesome, and very nice of you!!  Thanks!
legendary
Activity: 1526
Merit: 1134
Coins sent.
sr. member
Activity: 266
Merit: 250
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!
hero member
Activity: 588
Merit: 500
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 Tongue )

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).
full member
Activity: 126
Merit: 100
Darn, darn, darn. I just managed to iron out the last snags in my code.  Cry

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 Grin)
hero member
Activity: 588
Merit: 500
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. Smiley

Instructions:

1. Download 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.  Grin  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.
hero member
Activity: 588
Merit: 500
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).
full member
Activity: 126
Merit: 100
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...
hero member
Activity: 588
Merit: 500
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.
hero member
Activity: 588
Merit: 500
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. Smiley

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
legendary
Activity: 1246
Merit: 1016
Strength in numbers
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. Smiley

It's a really nice thing to have, would suck if it went down even for a little while. Good to have another.
hero member
Activity: 588
Merit: 500
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.
legendary
Activity: 1246
Merit: 1016
Strength in numbers
I'm in for 3BTC if it tracks BitcoinDays over time and updates with each block. Good for a month.
hero member
Activity: 588
Merit: 500
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. Smiley
legendary
Activity: 2506
Merit: 1010
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.
hero member
Activity: 588
Merit: 500
Do you just want a total for each block, or a calculation for each transaction in each block?
legendary
Activity: 2506
Merit: 1010
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
  - Developed in python and licensed MIT/X11
  - BitcoinDays Destroyed Calculation following ByteCoin's recommendation:
      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
Pages:
Jump to: