Bitcoin Forum
May 27, 2024, 10:30:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What does "change" mean in the context of sending coins?  (Read 441 times)
hyena_face (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
December 11, 2013, 05:37:50 PM
 #1

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.
ScripterRon
Full Member
***
Offline Offline

Activity: 136
Merit: 120


View Profile
December 11, 2013, 10:50:42 PM
 #2

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.
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1032



View Profile WWW
December 11, 2013, 10:58:33 PM
 #3

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.



Source: see my signature
zubelutte
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
December 11, 2013, 11:04:33 PM
 #4

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  Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!