Bitcoin Forum

Economy => Economics => Topic started by: molecular on January 13, 2013, 05:19:12 PM



Title: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: molecular on January 13, 2013, 05:19:12 PM
As discovered not long ago there was/is a bug in the Satoshi client: https://bitcointalk.org/index.php?topic=128042.msg1398752#msg1398752

In a nutshell it means that the change output of a transaction is never the last output (outputs are ordered). For transactions with 2 output this means that output #0 is the change and output #1 is the actual amount sent.

As we can see here, transactions with exactly 2 outputs make up the majority of both number and volume of transactions:

(click images for slightly larger version)

https://i.imgur.com/VpaRWl.png (https://i.imgur.com/VpaRW.png)

So let's look at the volume by output index:

https://i.imgur.com/CBzwyl.png (https://i.imgur.com/CBzwy.png)

We can clearly see the supposed change output (output #0, yellow) is a lot larger than the supposed actual amount output (output #1, red). Outputs with index higher than 2 (blue) have relatively low volume.

So now under the assumption that most transactions are 2-output transaction generated by the satoshi client we can look at only the volume of output #1 and hope to see a good approximation of Bitcoins actual transaction volume:

https://i.imgur.com/Kue01l.png (https://i.imgur.com/Kue01.png)

EDIT: queries used: http://pastebin.com/Mg1FdEts

Any ideas how correct this might or might not be, how big the error could be, how to estimate it or any other comments on this?


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: Nite69 on January 13, 2013, 05:49:20 PM
Just a small note:
I introduced that bug with the 'sendmany' command two years ago (commit b9d1ed85).

So you should exclude data which is older than the day this bug were widespread. Not much difference, thought.


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: molecular on January 13, 2013, 06:13:35 PM
Just a small note:
I introduced that bug with the 'sendmany' command two years ago (commit b9d1ed85).

So you should exclude data which is older than the day this bug were widespread. Not much difference, thought.

Good point, thanks. Not much data to be seen in 2009 anyway, though.


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: molecular on January 13, 2013, 07:46:58 PM
I joined mtgox trade data and made a daily (previous charts are weekly) chart of output #1 transaction volume in USD (by multiplying the output #1 transaction volume in BTC with the respective days volume-weighted mtGoxUSD rate):

https://i.imgur.com/CCrng.png

Now either the assumptions don't hold to the extent I'm wishing for (for example more prevalent use of alternative clients without the bug) or we are really moving a shitload of money nowadays (maybe both).


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: iCEBREAKER on January 13, 2013, 08:32:29 PM
Nice work, pretty charts!

https://i.imgur.com/A6BUf.jpg


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: robocoin on January 13, 2013, 08:38:04 PM
Thx for the picture. Kudos for running this against MTG trading data. I'll take some time to look further in to this.

I am curious if this 'little' bug has been exploited in some way we can't even think of. For data mining, tracing... We'll see.


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: Stephen Gornick on January 14, 2013, 04:25:47 AM
or we are really moving a shitload of money nowadays (maybe both).

Eyeballing this, it roughly correlates to an increased number of transactions as well. 

I would be curious to know if the average for output #1 is increasing much though.


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: molecular on January 14, 2013, 06:31:50 AM
or we are really moving a shitload of money nowadays (maybe both).

Eyeballing this, it roughly correlates to an increased number of transactions as well. 

I would be curious to know if the average for output #1 is increasing much though.

What average do you mean? You can see the average per day in the chart. Maybe you're talking about the average per transaction?


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: SgtSpike on January 14, 2013, 05:47:23 PM
This really showcases definite growth of BTC.  Even though the bug is now fixed, the correlation between transaction volume and USD volume can likely be used for a decent while into the future to continue calculating close-to-actual USD transaction volume.  Anyone want to calculate a regression between the two?  Molecular, are you willing to share the spreadsheet of data?  I am curious what the r-squared value is.

Also, this could be compared to market cap to find out whether BTC is currently over or under valued compared to prior dates, could it not?  I think that'd be a neat analysis.  :)  In fact, we can at least easily compare the two charts.

https://i.imgur.com/CCrng.png

https://i.imgur.com/vGRxP.png


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: molecular on January 14, 2013, 09:30:07 PM
This really showcases definite growth of BTC.  Even though the bug is now fixed, the correlation between transaction volume and USD volume can likely be used for a decent while into the future to continue calculating close-to-actual USD transaction volume.  Anyone want to calculate a regression between the two?  Molecular, are you willing to share the spreadsheet of data?  I am curious what the r-squared value is.

sure. http://pastebin.com/jBmECtVS


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: molecular on January 14, 2013, 09:34:44 PM
Also, this could be compared to market cap to find out whether BTC is currently over or under valued compared to prior dates, could it not?  I think that'd be a neat analysis.  :)  In fact, we can at least easily compare the two charts.

I'm not sure...

firstly: think about what you see when you remove the exchange rate from both charts (they have it in common, right?)

secondly: bitcoins value only stems from its transactional features in part. In fact I think the majority of it's value is rooted in its store-of-wealth features. So you can't judge wether or not bitcoin is over-/undervalued just by looking at transaction volume. It surely plays its part because it indicates usage and increase in usage definitely results in increase of bitcoins value.


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: dree12 on January 14, 2013, 09:38:39 PM
Also, this could be compared to market cap to find out whether BTC is currently over or under valued compared to prior dates, could it not?  I think that'd be a neat analysis.  :)  In fact, we can at least easily compare the two charts.

I'm not sure...

firstly: think about what you see when you remove the exchange rate from both charts (they have it in common, right?)

secondly: bitcoins value only stems from its transactional features in part. In fact I think the majority of it's value is rooted in its store-of-wealth features. So you can't judge wether or not bitcoin is over-/undervalued just by looking at transaction volume. It surely plays its part because it indicates usage and increase in usage definitely results in increase of bitcoins value.

Could you calculate the average ratio between change and transaction output? Or better yet, chart this ratio? That would be insanely useful.


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: molecular on January 14, 2013, 09:52:11 PM
Also, this could be compared to market cap to find out whether BTC is currently over or under valued compared to prior dates, could it not?  I think that'd be a neat analysis.  :)  In fact, we can at least easily compare the two charts.

I'm not sure...

firstly: think about what you see when you remove the exchange rate from both charts (they have it in common, right?)

secondly: bitcoins value only stems from its transactional features in part. In fact I think the majority of it's value is rooted in its store-of-wealth features. So you can't judge wether or not bitcoin is over-/undervalued just by looking at transaction volume. It surely plays its part because it indicates usage and increase in usage definitely results in increase of bitcoins value.

Could you calculate the average ratio between change and transaction output? Or better yet, chart this ratio? That would be insanely useful.

would you want me to calculate the ratio per transaction and then average that ("avg(output0/output1)") or add up the outputs per day and take that ratio ("sum(output0)/sum(output1)") ?

If the latter, you can kind of see that ratio in my first chart (yellow vs. red)


Title: Re: [CHART] Bitcoin Actual Transaction Volume? (using "change is never last" bug)
Post by: zebedee on February 01, 2013, 02:07:45 PM
As I mentioned in the opposite thread, since the emergence of alternative clients you can't take these numbers as good.  Electrum until last week always sent the change as the last output, so you'll be misinterpreting over one-year's worth of Electrum transactions.