Title: What does "change" mean in the context of sending coins? Post by: hyena_face on December 11, 2013, 05:37:50 PM What is "change" in a bitcoin context?
For example: "As the value of a previous bitcoin transaction cannot be spent partially, the surplus is returned to the sender as change." I understand that when I send coins to a recipient, I sign the transaction with my private key and I send it to the public key of the recipient (his/her bitcoin address). I appreciate that the blockchain is comprised of a series of such transactions. So, for example, when I recieve coins the transaction is based on the sender's private key and my public key (my bitcoin address). But I don't understand this issue of change though. If I send 1.123 BTC to you then I send the correct amount of 1.123 BTC (plus any fees). Why would I need or want any "change"? Obviously I don't understand what "change" means. Can someone please explain it to me in a simple fashion! Thanks. Title: Re: What does "change" mean in the context of sending coins? Post by: ScripterRon on December 11, 2013, 10:50:42 PM Suppose Person-A sent you 2.0 BTC. You now have a single unspent output for 2.0 BTC. Then you want to send 0.05 BTC to Person-B. The client will use the 2.0 BTC as input to the transaction and set one output to Person-B for 0.05 BTC. That leaves 1.5 BTC that has to be accounted for (inputs are consumed by the transaction). So a second output will be set to a change address in your wallet to return the 1.5 BTC to you. If you included a miner fee of 0.0001 BTC, then the change would be 1.4999 BTC (the difference between inputs and outputs is the miner fee).
Some clients send the change back to the original address while others generate a new address for each change output. Title: Re: What does "change" mean in the context of sending coins? Post by: deepceleron on December 11, 2013, 10:58:33 PM Transactions are comprised of a list of inputs, individual payments that were previously received by a wallet, and outputs, a list of amounts and addresses to which the bitcoins will be transferred.
Only the full amount of an input can be spent. If the exact amount of the transaction can’t be constructed from available inputs, an additional output, called change, is added, which sends the remainder back to a new address in the user’s wallet. Change addresses are not shown to the user. http://we.lovebitco.in/img/transaction.png Source: see my signature Title: Re: What does "change" mean in the context of sending coins? Post by: zubelutte on December 11, 2013, 11:04:33 PM Obviously I don't understand what "change" means. Can someone please explain it to me in a simple fashion! Thanks. Consider your shopping cost $80 but you have only $100 bill. Obviously the change will be $20 bill :) |