Rabbit holes are deep
- Bitcoin's blockchain doesn't really know who owns anything.
- Bitcoins don't exist as things whose ownership can be reassigned.
- Bitcoins have no individual continuity.
Yes the Blockchain effectively keeps track of changes of something that often corresponds to what we think of as ownership of money. However the blockchain cannot distinguish between Alice sending 1 BTC to Bob (money changing hands) and Alice sending 1 BTC to a different address in one of her wallets (rearranging her money, no change of ownership).
Wallets can process transaction data to keep track of a set of unspent transaction outputs (UTXOs) removing outputs that have been spent and adding newly created outputs.
The total monetary amount of the UTXO set should add up to 18.5 million (or whatever the quantity mined so far adds up to).
However the identity of bitcoins is not preserved. It is only the total amounts that always sum up to the correct current money supply.
If you think of UTXO's as coins, the mined transactions effectively melt all the input coins down and use the combined molten metal to cast a new set of coins. No coins change hands, all coins are destroyed in every transaction and new coins created.
For example in the following transaction there is no way to say that certain inputs correspond to certain outputs. This is true regardless of the amounts although you can sometimes make inferences. An exchange might consolidate several of its users transactions into one bitcoin transaction with dozens of inputs and dozens of outputs and there's no certain way to determine which inputs correspond to which outputs.
In block 669188 there is a transaction 1218…d33e. If you look at that in a blockchain explorer such as blockchair the details will be shown as
Senders
Amount |
Address |
0.00149566 BTC |
3PxGWkwnxQ88zQw8TgBiYrH4pQxhakmN16 |
0.05809775 BTC |
3CDcCbis6dEBeksMY8uYhWyU3EaLN6vh82 |
Recipients
Address |
Amount |
1C7cDqqGK5vscgPfD9d6gwcMw2tSRb4Q1Q |
0.01076317 BTC |
3BwbGdAidTuFLYdAhgVX1DgnoPCJ9fECRY |
0.04809524 BTC |
See footnote.
Where did the 0.00149566 BTC end up? At 1C7c…4Q1q
or at 3Bwb…ECRY
? No one can say, it may not be a meaningful question.
So the notion "the blockchain actually states where all bitcoins in existence are at" isn't meaningful because there are no things called bitcoins, there are only amounts of money specified in a unit of measure named Bitcoin.
The reality is simply that the total amount of mined bitcoin is kept track of as a list of amounts, each of which is associated with a bitcoin-script.
Footnote
The data under "Senders" doesn't all come from the transaction data directly.
Inputs are specified by the transaction ID of a prior transaction they were created in (received in) and an index number into the list of outputs of that transaction.
You can look at the raw data, for example by clicking on "raw data" in the Blockchair web page. It will show a Hex and a JSON view of the actual data
0200000000010274d82567d8e55f9b25628093bd151289543e8630c3f18656cfcd090953cf2ab601000000171600140cabe7062ed5a42e1c6dc75efb708e980efc9aa9ffffffffbc06dcfee104538ef7c333cc16be005de31a4fecec6d766da23ecb2ae6bebda001000000171600148a1e82051ee5b269209d35aee915ca71c2d80a47ffffffff025d6c1000000000001976a91479e947df07c7941727d79ea4cac9b909c43d3c1c88ac346349000000000017a9147072ead5bae0971c1aed1b49b61a822b502c6b3d8702473044022038577fabbcee921e0b4613df3f1b146f32bcc8cde69f0a298b4e0d481231dff402204db6efa7e562a103e103679870188bc7953bea4a0dfed014d6f32dff55bc8d7b012102988d62c603eddc6bd7b4972b03a8173b497bf2647b1ea0a8d2bb64ad7aa22f1b02473044022029fd501198a4dc7692fefc4d48a63c5a6d5a2936215ce0b3a7b1fb449428f13a02201d4f354d61ebd81300e27361e064fb0628ad807f4308ded893238767b68351d4012102ee971f8d307d7b75de716c743b49b579b577b2247f75465820407347feced7d900000000
That's hard to make sense of so they provide a JSON view (or JSON interpretation):
{
"txid": "1218039587a3fc96f0c6f3d0fb0d49404f54917a3d63cb52158a1ef84f27d33e",
"hash": "cb44308832dfeceeba412633b937ebc3bbf5c4629a463f7fa04442b74c76d53d",
"version": 2,
"size": 420,
"vsize": 258,
"weight": 1032,
"locktime": 0,
"vin": [
{
"txid": "b62acf530909cdcf5686f1c330863e54891215bd938062259b5fe5d86725d874",
"vout": 1,
"scriptSig": {
"asm": "00140cabe7062ed5a42e1c6dc75efb708e980efc9aa9",
"hex": "1600140cabe7062ed5a42e1c6dc75efb708e980efc9aa9"
},
"txinwitness": [
"3044022038577fabbcee921e0b4613df3f1b146f32bcc8cde69f0a298b4e0d481231dff402204db6efa7e562a103e103679870188bc7953bea4a0dfed014d6f32dff55bc8d7b01",
"02988d62c603eddc6bd7b4972b03a8173b497bf2647b1ea0a8d2bb64ad7aa22f1b"
],
"sequence": 4294967295
},
{
"txid": "a0bdbee62acb3ea26d766decec4f1ae35d00be16cc33c3f78e5304e1fedc06bc",
"vout": 1,
"scriptSig": {
"asm": "00148a1e82051ee5b269209d35aee915ca71c2d80a47",
"hex": "1600148a1e82051ee5b269209d35aee915ca71c2d80a47"
},
"txinwitness": [
"3044022029fd501198a4dc7692fefc4d48a63c5a6d5a2936215ce0b3a7b1fb449428f13a02201d4f354d61ebd81300e27361e064fb0628ad807f4308ded893238767b68351d401",
"02ee971f8d307d7b75de716c743b49b579b577b2247f75465820407347feced7d9"
],
"sequence": 4294967295
}
],
"vout": [
{
"value": 0.01076317,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 79e947df07c7941727d79ea4cac9b909c43d3c1c OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a91479e947df07c7941727d79ea4cac9b909c43d3c1c88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"1C7cDqqGK5vscgPfD9d6gwcMw2tSRb4Q1Q"
]
}
},
{
"value": 0.04809524,
"n": 1,
"scriptPubKey": {
"asm": "OP_HASH160 7072ead5bae0971c1aed1b49b61a822b502c6b3d OP_EQUAL",
"hex": "a9147072ead5bae0971c1aed1b49b61a822b502c6b3d87",
"reqSigs": 1,
"type": "scripthash",
"addresses": [
"3BwbGdAidTuFLYdAhgVX1DgnoPCJ9fECRY"
]
}
}
]
}
Note that the two inputs listed under vin
are
txid |
vout |
scriptsig etc |
b62a…d874 |
1 |
… |
a0bd…06bc |
1 |
… |
So the two inputs are specified, not using an address and an amount but by specifying a source transaction and a position in the list of outputs (vout
). There is also other data, essentially proof of right to spend. So the blockchain explorer can use txid & vout as an index to look up additional details of those inputs from its records of the specified earlier transactions (e.g. "date received" for each vin
)