Take the 2-minute tour ×
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It's 100% free, no registration required.

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?

share|improve this question

4 Answers 4

up vote 8 down vote accepted

At the protocol level, there is no such thing as "balance of an address". There are individual unspent outputs (like coins in a wallet), which must be individually spent. You can't partially spend an output, but you can split/combine it.

So for example, you have a 70 BTC output assigned to an address, and a 80 BTC output assigned to the same address. Some software will show this as 150 BTC balance of that address, but you still need to know the individual outputs to spend them. If you want to send 100 BTC to someone, you would consume those two outputs in a transaction, and create two new outputs using it, a 100 BTC one (to the recipient) and a 50 BTC one (back to yourself).

Whether you use a new address for that 50 BTC "change" output doesn't matter to the protocol. You can reuse the old one, but will make it obvious to everyone in the world which who was the sender and who was the recipient in the transaction. Using a fresh address improves privacy.

Seen otherwise: reusing the same address may look convenient, as it allows you (and software you use) to more easily distinguish what your balance is, but it does this at the cost of making it obvious to everyone in the world. This hurts Bitcoin's privacy - not just yours, but that of everyone in the system.

share|improve this answer

Yes, and you might want to read up on handling change as that's one good reason to do so.

share|improve this answer

You can even have a transaction with only 1 input and 1 output, both being the same address

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.