This is the second of two posts exploring the uses of graph visualization to understand cryptocurrency. We’ll use Bitcoin data throughout, but the concepts could also be applied to other cryptocurrencies.
In part one, we introduced the topic of cryptocurrency and Bitcoin, and visualized some Bitcoin blocks, to identify different kinds of transactions. While visualizing an entire block can be interesting, and useful for understanding transaction patterns and anomalies, it can also be restrictive.
A different approach is to explore individual transactions and how they link to other transactions in other blocks. That’s what we’ll do in this post, with the help of our sequential layout.
The first-ever Bitcoin transaction happened at block height 170 on 12th January 2009. Before this point, Bitcoin blocks contained no transactions beyond the miner reward.
It was between Bitcoin founder Satoshi Nakamoto and programmer Hal Finney, and follows a typical transaction structure. Here, Nakamoto sent Finney a total of 10 Bitcoins, using a 50 Bitcoin input and a 40 Bitcoin output as change.
Exploring these data in the transaction-centric view reveals some interesting details.
In this visualization, grey nodes with the double arrow icon represent transactions, orange links are inputs and teal links are outputs as before. Filled nodes represent unspent outputs, and empty nodes represent spent outputs.
We can see Nakamoto’s 50 Bitcoin input on the left, and Finney’s output and Nakamoto’s change are on the right.
Double-clicking on a spent output will fetch data about that output from the Bitcoin API. This data is then parsed and loaded into the chart, expanding it in place.
This user interaction allows the user to explore transaction data through time, both forward and backward, in a controllable, logical way. It’s a powerful technique for investigating specific transactions of incidents, without suffering data overload.
Expanding Nakamoto’s input node, we can see the origins of the Bitcoins he transferred to Finney. They originated from the miner rewards for the block at height 9, meaning Nakamoto successfully mined the ninth block in the Bitcoin blockchain.
Exploring in the other direction, we can find out how the outputs from this historic transaction were later spent.
First looking at Finney’s output, we can see that this remained unspent until block 92,240, almost 3 years after he received the funds.
After this point, the outputs were spent in a series of transactions over a short time period. Some of these transactions feature unspent outputs totaling 1.69 Bitcoins, the private keys for which could potentially be lost.
Alternatively, we can expand Nakamoto’s side of the transaction. Shortly after the initial transaction, he made a 10 Bitcoin payment to another address, which has not yet been spent.
This left Nakamoto with 30 Bitcoins on his address, and he immediately went on to pay 1 Bitcoin to yet another address. Following this, Nakamoto made a series of further transactions, leaving him with 18 Bitcoins on this address of his, which remains unspent to this day.
It is worth noting that the reason we are able to gain this level of insight is because this transaction was announced and the participants were known (The cryptographic addresses involved could be associated with the users behind them).
Let’s look at another notable transaction from Bitcoin’s history.
On 17 May 2010, Laszlo Hanyecz posted a request on a Bitcoin forum. He was offering to pay 10,000 Bitcoins, then worth about $41, for two pizzas.
On 22 May 2010, fellow forum user ‘jercos’ took him up on the offer and ordered the two Papa John’s pizzas. Laszlo couldn’t know at the time that, had he kept the Bitcoins instead of buying two pizzas, he would have been $100,000,000 richer today. Proof of this historic purchase can be found in block 00000000152340ca42227603908689183edc47355204e7aca59383b0aaac1fd8.
In this block, there are two transactions. The first one is the pizza payment transaction from Laszlo to jercos. The second is the generation transaction: the reward for the Bitcoin user who successfully mined the block.
Let’s visualize this block with KeyLines:
Grouping nodes that share an address gives a clearer picture:
The structure is immediately clear. Laszlo used multiple unspent outputs from previous transactions to one of his addresses as inputs to the pizza transaction.
At the time of writing, if Laszlo had saved the original Bitcoins, he would have been able to order 6 million Papa John’s extra-large pepperoni pizzas, leaving a sizeable tip for the delivery driver. He should probably have kept hold of them.
The great thing about Bitcoin is all the data is publicly available, meaning anyone can visualize it and explore it for themselves. Our graph visualization toolkits make it quick and easy to build powerful visualization tools that can be deployed to unlimited end-users, anywhere in the world.
Want to try them for yourself? Request a free trial