Hacker News new | ask | show | jobs
by wjdp 2019 days ago
Why would there be "change" in a Bitcoin transaction?

Is this: send me £10 in BTC but actually send me £15 in case the price changes and I'll send you back the difference.

2 comments

In Bitcoin, reusing an address gives folks who watch the blockchain information about whose money this is and what they use it for.

Let's say you have $20 in your address, and you want to spend $10 on candy bars. A common pattern of use is to spend all $20: $10 goes to the candy bar company, and $10 goes to a new address you just created. This helps obfuscate how much money you actually have.

It isn't just about obfuscation: even if you always send money back to your own address that ends up being a round-trip on your own money as "change". And "in your address" also doesn't help the mental model here because addresses only have money by summing up all of the outputs that are spendable by the associated key, which leads to the change question in the first place (as you definitely can spend part of your money).

The analogy I would use is that Bitcoin exists in your wallet as like a bag of gold nuggets. To do a Bitcoin transactions is to take a pile of gold nuggets, melt them together, and then pour off a handful of new piles that you let cool back into nuggets. These nuggets are inherently of awkward value units as, if nothing else, the price of gold keeps changing. So you aren't going to have a set of nuggets that ever correctly maps to "price of hamburger". What you do with the resulting nuggets is up to you, but the total amount of gold in the input nuggets and the total amount of gold in the output nuggets has to be the same. This inherently will lead to most transactions involving creating an output nugget that is "change" (all the gold left over from the input nuggets that I wasn't actively intending to use).