21

The Bitcoin wiki states, "Addresses are not wallets nor accounts, and do not carry balances."

Yet, there's a zillion articles online about Bitcoin address balances, the Bitcoin blockchain explorers show balances, and so on.

Can you explain the Bitcoin wiki's statement to me?

2 Answers 2

37

The wiki is correct, it is a technicality. Bitcoin "balances" are actually just unspent transaction outputs (UTXOs, from previous transactions) which you have the ability to spend. In most cases, that means knowing the private key corresponding to an address which the transaction was sent to. But the address itself doesn't have a balance, it just "locks up" the UTXOs corresponding to it, requiring a private key.

The important point is that the blockchain doesn't store a "total balance" of an address anywhere, to find the "balance" of an address requires looking through the chain to find the unspent transaction outputs sent to that address and summing their amounts.

Then to spend bitcoins, you spend specific UTXOs, you do not just subtract the amount from your "balance".

6
  • Ok so I suppose that saying "address balance" is really just a convenience thing - an easier way of saying "unspent transaction outputs.
    – Howiecamp
    Commented Mar 28, 2018 at 0:53
  • 1
    @Howiecamp correct in some cases, but using that word also promotes misunderstanding, as people are inclined to think about addresses in the same way as bank account numbers which is wrong Commented Mar 28, 2018 at 0:54
  • In that case it's too bad that nomenclature has taken hold - because it certainly is pervasive.
    – Howiecamp
    Commented Mar 28, 2018 at 0:56
  • 1
    Very true. There's an interesting talk Andreas Antonopolous gives at Harvard from 2015 where he talks about this same topic. Here it is (youtube.com/watch?v=Ur037LYsb8M)
    – m1xolyd1an
    Commented Mar 28, 2018 at 1:42
  • 1
    @CodesInChaos you need to sign a transaction using a private key to prove you own the bitcoins you are trying to spend Commented Mar 28, 2018 at 12:23
16

Bitcoin addresses do not actually exist on the Bitcoin network. They are an abstraction for humans to be able to easily send money to each other.

What Bitcoin actually uses are transaction outputs. A transaction creates outputs which consist of the value and the output script. When you send money to someone, you are spending from an Unspent Transaction Output (UTXO) and creating new UTXOs.

When you send to an address, you are really creating a UTXO with the value you want and an output script that is specified by the address. Addresses encode a version number and some data (usually a hash). So your wallet software takes the address, decodes it, and constructs an output script based upon the data and the version number (the version number specifies what the output script format should be).

So addresses themselves do not actually exist on the network; they do not actually carry a balance nor do you actually send to or from an address. However many places will just say "balance of an address" and show such information as a convenience. This "balance" is calculated by constructing the output script an address specifies and then searching through the UTXO set for UTXOs with output scripts that match the constructed script. The values of these UTXOs are summed and that becomes the address's balance.

2
  • Wow your answer is dense in information, I love it. Can you elaborate on "Bitcoin addresses do not actually exist on the Bitcoin network" - isn't the address directly stored in blocks? Hey curious, how did you come to this level of knowledge? What do you do?
    – Howiecamp
    Commented Mar 28, 2018 at 1:25
  • 1
    No, as I said in the answer, the address only contains information that is used to construct the output scripts. It isn't actually stored in the blockchain, but the data that it encoded is. Learning about all of this requires reading through developer documentation (bitcoin.org has lots of stuff there) and the Bitcoin Core source code.
    – Ava Chow
    Commented Mar 28, 2018 at 1:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.