Questions tagged [change]

Splitting a transaction and sending some of the coins back to the sender. Necessary for some currencies due to the design of the protocol.

With Bitcoin and its relatives, the protocol specifies that when a transaction spends an output of a previous transaction, it must spend the entire amount. If the sender doesn't actually want to spend that much, the new transaction includes an extra output, sending the remaining coins back to a (new or existing) address belonging to the sender. This is called change by analogy with the real-world process of paying a large note for a small purchase, and receiving the difference back in smaller denominations.

More information can be found at https://en.bitcoin.it/wiki/Change.

127 questions
52
votes
3 answers

How does change work in a bitcoin transaction?

It seems that when you send a bitcoin transaction, all the coins in the sending address are spent in that transaction, divided into the amount that you intended to send, and "change", which goes back to you, but at another (newly created) receiving…
Thilo
  • 4,751
  • 5
  • 25
  • 37
31
votes
2 answers

Why are there two transaction outputs when sending to one address?

I did a small transaction some days ago: https://www.blockchain.com/btc/tx/4c07a07dfd9d5b79d168ec6835df876c64e82350a8f9211bf586d858a5aeb9ba Some info: 1JFWE8THcAQQRYx99c43DXSGyoPL9Zs62D is my wallet 1PCGNxgheKTaeT6xvTabcY8ZbS3gDpFtb is the wallet I…
Macarse
  • 537
  • 1
  • 5
  • 10
19
votes
1 answer

How does blockchain.info calculate the "Estimated Transaction Value?"

Consider the following transaction: https://blockchain.info/tx/aa5eb27652bd85dc444ea2508bf0ff6ff1b484141e2d7e69f31976fafb21e06e Each of the output addresses has never before been used, and there is only one input address. Why does blockchain.info…
Yaacov
  • 301
  • 2
  • 4
16
votes
3 answers

How to get all addresses - including the "change" addresses - from bitcoind?

I want to get all my addresses - including the auto-generated "change" addresses - from a running bitcoind somehow. I haven't been able to do it in a simple way. "getaddressesbyaccount" and all the other API options are only listing the "public"…
Karel Bílek
  • 2,655
  • 3
  • 24
  • 45
15
votes
6 answers

Why is there "Change" in Bitcoins?

I have read about a change address and wondered why there even is the concept of change? Let's say I received 1 BTC from some person A and I want to send 0.4 BTC to another person B, afterwards. From what I have understood, I have to send the 1 BTC,…
André Kuhlmann
  • 261
  • 2
  • 6
15
votes
4 answers

Can a Bitcoin transaction have the same address for input and output?

Can a Bitcoin transaction have the same address for input and output, i.e. spend some of the coins that are linked to an address and send the rest back to that same address? Is there some reason why it is imprudent to do so?
Murch
  • 71,155
  • 33
  • 180
  • 600
12
votes
4 answers

If bitcoin is indivisible, where does change come from?

Let's say I want to give Alice .22 BTC. I currently have in my wallet 1 BTC. Because Bitcoin is indivisible, I have to spend the 1 BTC I have as input, and .78 BTC will be returned to me as change, while the other .22 BTC is sent to Alice. My…
rb612
  • 289
  • 2
  • 10
10
votes
1 answer

What does change address mean inside Electrum wallet?

I am bit confused with the change label that is inside Electrum Wallet . Can I receive bitcoin if i give this address which are under change label? What is the difference between Receiving and Change Label Address?
william Henery
  • 101
  • 1
  • 1
  • 3
8
votes
2 answers

Why is the change address for a transaction the same as the originator address?

I was under the impression that if address abc has 100 BTC assigned to it, and it pays address def 20 BTC, 80 BTC will be transferred from abc to a new address ghi. But in this…
ffxsam
  • 185
  • 5
6
votes
1 answer

Wallet design: What to do with dust amounts in change?

I'm working on some quirks of a wallet I'm developing, and one of the issues is what to do with change amounts that are larger than dust ~600 satoshis, but less than a practical amount to be sent again with a fee. Should I return the near-dust…
m1xolyd1an
  • 5,566
  • 2
  • 14
  • 30
6
votes
4 answers

How to find the change / sender address given a txid?

Suppose I'm making a service like SatoshiDice and when I receive a transaction I want to give some money back. Where can I find the sender address? If I run this, e.g.: bitcoin-cli gettransaction…
Felipe
  • 1,688
  • 3
  • 19
  • 31
6
votes
1 answer

Spending own generated unconfirmed change in the v.0.9.0 era

Reading about spending own generated unconfirmed change some time ago I stumbled upon this reddit thread that convinced me that doing so is a really bad idea and could prove catastrophic for any business that allows it. Now in the bitcoin core…
5
votes
1 answer

How to turn off "change" address in bitcoind?

I would like to keep backup of my wallet on paper, but that's impossible or at least impractical when the bitcoind keeps creating new addresses for "change". I know it is possible in theory to do it by sending the change back to the sending address.…
Zouppen
  • 217
  • 1
  • 6
5
votes
1 answer

Trying to create a bitcoin public/private key using bitcoin-core

I want to create a single bitcoin address to which I can send and receive funds too. Using the bitcoin-core console, I typed in the following: Input: getnewaddress Output: Address: mhYC9ybAa2aHivEjYzyp7WcMXtpcmJvgV2 Input: …
5
votes
3 answers

Where does the change go in blockchain.info when using a paper wallet?

When using a paper wallet as watch only via block chain.info and you send partial amounts out from it. Where does the change go? I've read you can lose all your coins if the client doesn't handle change properly. What's a scenario that could lead…
Patoshi パトシ
  • 10,956
  • 18
  • 80
  • 151
1
2 3
8 9