<p>As you may know, transactions have inputs and outputs. The outputs give the addresses to which coins are being sent, and the inputs link back to outputs of the prior transactions that gave the coins to this transaction's sender, thus forming a chain. Anyone on the network can step along this chain to verify that all the coins in circulation legitimately got to their present owners.</p>

<p>To make it easier to verify the chain, the Bitcoin protocol has a rule that each input must spend all the coins that were in the output that it links to. (I am presuming that Litecoin is the same.) So if the smallest (or only) transaction to your address had
an output of 150 LTC, then you have to spend 150 LTC. But since you only really want to spend 45 LTC, your wallet gives the transaction a second output that sends the remaining 105 LTC back to you, as "change".</p>

<p>Rather than sending the change back to the same address that is spending the coins, some wallets choose to generate a new address and send the change there. I am not exactly sure why; perhaps it's to help obscure what addresses belong to whom, for privacy. But in any case, you should find that your wallet holds the private key to this new address. The 105  coins are still yours, they're just at a different address.</p>

CC BY-SA 3.0
2013-08-29T15:36:52.557Z
Thanks. Indeed, running `validateaddress` confirms that the 'unfamiliar' addresses belongs to me, meaning I hold theirs private key. I didn't know a private key can generate/verify more than one address.
ElyaSh
CC BY-SA 3.0
2013-08-29T15:45:39.110Z
@elyash: It doesn't. Each address has its own private key, and your wallet holds all of them.
Nate Eldredge
CC BY-SA 3.0
2013-09-01T06:42:24.997Z
10x. Point to myself - storing the private key of the initial address is useless, once you spend some of the coins. Only wallet.dat backup will be suffice
ElyaSh
CC BY-SA 3.0
2013-09-01T12:06:59.897Z
@elyash: True. Some wallets pre-generate a bunch of keys/addresses so they can be  backed up with wallet.dat even  before they are used.
Nate Eldredge
CC BY-SA 3.0
2013-08-29T15:11:53.847Z
2013-08-29T15:18:45.147Z
2013-08-29T15:18:45.147Z
Nate Eldredge
<p>I use litecoin-qt, but my guess it'll be the same for Bitcoin or any other crypto coin.</p>

<p>I created a new wallet, added an address and received the coins I expected. Then I created another wallet on different PC added another (non default) address, and sent some of the coins from first address mentioned to the second. I used 'sendfrom' command.</p>

<p>Now both wallets show exactly what I would expect, however on any online block explorer I see something strange. When I enter the first address, I see the transaction with the initial amount, but then another row that withdraw that amount. Clicking on the transaction I see that the second address is credited with the amount I sent, and the rest goes to an unfamiliar address.</p>

<p>What does it mean or what am I missing?
Where's this 3rd address coming from?
I thought I know how things are working with cryptocoins, but now I'm completely lost.</p>

CC BY-SA 3.0
2013-08-29T15:19:53.840Z
Can you give this question a more descriptive title, please?
Nate Eldredge
<transactions>
spending some of the coins nullifies address' balance. where does the remainder goes?
ElyaSh
# spending some of the coins nullifies address' balance. where does the remainder goes?

(Asked by: username_0 on 2013-08-29)

I use litecoin-qt, but my guess it'll be the same for Bitcoin or any other crypto coin.

I created a new wallet, added an address and received the coins I expected. Then I created another wallet on different PC added another (non default) address, and sent some of the coins from first address mentioned to the second. I used 'sendfrom' command.

Now both wallets show exactly what I would expect, however on any online block explorer I see something strange. When I enter the first address, I see the transaction with the initial amount, but then another row that withdraw that amount. Clicking on the transaction I see that the second address is credited with the amount I sent, and the rest goes to an unfamiliar address.

What does it mean or what am I missing?
Where's this 3rd address coming from?
I thought I know how things are working with cryptocoins, but now I'm completely lost.

**Tags:** transactions

> **Comments:**
> **username_1**: Can you give this question a more descriptive title, please?  

---

## 1 answers

### Answer by username_1 on 2013-08-29. Score: 3 | Accepted answer

As you may know, transactions have inputs and outputs. The outputs give the addresses to which coins are being sent, and the inputs link back to outputs of the prior transactions that gave the coins to this transaction's sender, thus forming a chain. Anyone on the network can step along this chain to verify that all the coins in circulation legitimately got to their present owners.

To make it easier to verify the chain, the Bitcoin protocol has a rule that each input must spend all the coins that were in the output that it links to. (I am presuming that Litecoin is the same.) So if the smallest (or only) transaction to your address had
an output of 150 LTC, then you have to spend 150 LTC. But since you only really want to spend 45 LTC, your wallet gives the transaction a second output that sends the remaining 105 LTC back to you, as "change".

Rather than sending the change back to the same address that is spending the coins, some wallets choose to generate a new address and send the change there. I am not exactly sure why; perhaps it's to help obscure what addresses belong to whom, for privacy. But in any case, you should find that your wallet holds the private key to this new address. The 105 coins are still yours, they're just at a different address.

> **Comments:**
> **username_0**: Thanks. Indeed, running `validateaddress` confirms that the 'unfamiliar' addresses belongs to me, meaning I hold theirs private key. I didn't know a private key can generate/verify more than one address.  
> **username_1**: @elyash: It doesn't. Each address has its own private key, and your wallet holds all of them.  
> **username_0**: 10x. Point to myself - storing the private key of the initial address is useless, once you spend some of the coins. Only wallet.dat backup will be suffice  
> **username_1**: @elyash: True. Some wallets pre-generate a bunch of keys/addresses so they can be  backed up with wallet.dat even  before they are used.  

---

