I'm new to bitcoin in general and coinbase.com in particular. Can somebody explain what happens when I order a payment (in bitcoins) from their web interface?

Say that my acount owns 1 BTC. I create an address AAA to pay 0.1 BTC for my loaf of bread to my baker's address BBB. I order the transfer from coinbase.com web interface, and looking at blockchain.info, I see the following (amounts rounded):

// webUI says I own 1.0 BTC

AAA  pays 0.1032   --> X = 0.1     BTC to BBB (my baker)  // what I wanted
                   --> Y = 0.0002  BTC as network fees    // fine with that
                   --> Z = 0.003   BTC to CCC             // what is that ?

// after payment, webUI says I own 0.8998 (= 1.0 - X - Y)
// The mysterious Z = 0.003 BTC have *not* been removed.

But what is that 0.003 BTC transfer to an address I don't know CCC? Apparently I own this address, or at least coinbase.com does on my behalf. Is it a standard way of processing I'm not aware of? Is it a safety feature managed by coinbase to authenticate the transaction?

Obviously there are a lot of informations on this reddit, but it's too technical for me.

  • 2
    It looks like change. – Nate Eldredge Jan 10 '17 at 17:36
  • Your scenario is a bit confused in that you do not create AAA at the time of transacting, rather when you create a transaction, you use the funds that you previously received to AAA. – Murch Nov 19 '17 at 22:27

When you receive money, a UTXO (unspent transaction output) is generated and assigned to your address. When you want to spend money, you can only ever spend entire UTXOs. However, you may have received 1 BTC but you only bought goods worth 80 mBTC in an online shop, so you don't want to send your entire 1 BTC UTXO to the merchant.

Enter change. A transaction can have an arbitrary number of outputs. 2 outputs to different addresses are very common. In the scenario described above, you send 80 mBTC to the merchant and 920 mBTC back to you. The latter is called change.

Now, it is possible to send the change back to the address you sent the money from. This way, it's possible to only ever use one address to hold your money. However, people could learn that that you always send from that address and associate it with you. This means reduced privacy.

It's of course not as bad as with banks where it's cumbersome to open a new account, everyone who sends money to you or receives money from you knows your name, you even have to use your ID to get an account in the first place, and in most cases people can even steal money from you when they just know your bank information which everyone you ever exchanged money with using that account knows.

But if it's worth doing, it's worth overdoing, because people. companies, and governments are still trying to figure out who made which transaction. To make this harder, wallet software uses new addresses for each transaction. You cant still receive money again and again payed by different people to the same address and will be able to spend it but if you get an arbitrary number of addresses completely for free, why not take the opportunity to improve your privacy? Some wallets let you control where the change goes but there aren't many reasons to not use a new address each time.

  • So, it's not a historic/backward compatibility/backward security matter as the linked reddit sounds like (to my inexperienced mind): Coinbase makes an effort to have the inputs to outgoing transactions spend from outputs associated with addresses only associated with your account. In earlier days certain systems (and some still do) made the horribly broken decision of assuming addresses associated with transaction inputs are under the control of the user making the transaction and thus are a reasonable refund/return address – PPC Jan 10 '17 at 21:07
  • 1
    No, it's not a historic artifact or only there for backwards compatibility. It's done for a good reason and that reason is the same, HD wallets exist in the first place. However, the person you quoted talked about something else: blockchain.info creating a transaction from their own wallet to the an address of the user spending money, and then creating a second transactions already spending the funds they just sent to the user's address. This has nothing to do with change. They created 2 transactions. What you're seeing is 1 transactions having 2 outputs (like most transactions have). – UTF-8 Jan 10 '17 at 21:23
  • 1
    very well explained for the most part, I just want to add my 2 cents; a transaction is made by "outputs", and they must be 100% spent to new outputs, you don't actually send a tx to the miners, they take the unclaimed btc from the not spent outputs. So if you have address_mine_1 has an output called output1 with 1 btc, if you want to pay a merchant 0.1 btc it would kind of be like this the tx: output1(address_mine_1) => merchant_address 0.1, address_mine_2 0.895 <-- that's a sum of 0.995 and therefor the miners can (and do) take the 0.005 or they'll be gone forever – Joe Tannoury Jan 10 '17 at 22:17

Your Answer

