Author

Topic: Balance not corresponding with blockchain (Read 1104 times)

legendary
Activity: 3472
Merit: 4801
January 19, 2014, 09:23:55 AM
#5
So you can loose 8 BTC if you're not careful to sent those back to yourself??

Most wallets take care of this for you, so it isn't something that you have to remember to do.

If you are writing a program that builds and transmits bitcoin transactions, then yes it is VERY important that your program knows to send the change back to yourself.
legendary
Activity: 1064
Merit: 1001
January 19, 2014, 04:57:23 AM
#4
So you can loose 8 BTC if you're not careful to sent those back to yourself??
newbie
Activity: 49
Merit: 0
January 19, 2014, 01:42:52 AM
#3
The Blockchain.info website is reporting the technical details of how transactions work at the protocol level.

Your wallet is protecting you from these details so you won't become confused.

Now you've gone and looked at the technical details and have become confused.  This is why your wallet protects you from such details.

Specifically:
https://en.bitcoin.it/wiki/Change


Also, from a quick Google search:

Quote
With the way bitcoin works, you can't partially spend a previous output that you received.  It has to be completely spent.  So, if you receive 10 BTC all in a single transaction from someone/somewhere at an address, then that address now has a single 10 BTC output.

Later if you want to send 2 BTC to somebody, the program can use the previous 10 BTC output as an input into the transaction, and create a 2 BTC output to the address where you want to send it.  This leaves 8 BTC leftover in the transaction.  If you don't send those 8 BTC somewhere, then they become miner fees and end up in the coinbase transaction of the new block for the miner to keep.  If you don't want to give those 8 BTC away as fees to the miner, then you need to include a second output in your transaction sending the 8 BTC back to your own wallet.  As an analogy, think of pulling a $10 bill out of your pocket to pay for something that costs $2, you get $8 back in "change".

The way Bitcoin-Qt does this is to create a new bitcoin address that it doesn't tell you about and keeps track of that address and the associated private key in your wallet.dat.  Since this isn't an address that you requested in the "Receive Coins" tab of the user interface, it doesn't show up in that list.  Bitcoin-Qt knows about the address since it is in the wallet.dat file, so it includes it in the balance that it shows you.  Bitcoin-Qt uses a new change address for every transaction.  So if you create 10 different transactions, each sending bitcoins somewhere, then your wallet will have used 10 different change addresses (although some of them may be empty if Bitcoin-Qt used the bitcoins associated with some of those address as inputs into other transactions).

Thanks a lot, that actually makes sense.
I thought BTC 'parts' in your wallet could actually be partially spent, but I was wrong. I didn't know the remaining part got sent back to yourself to prevent it from being a miners fee.
legendary
Activity: 3472
Merit: 4801
January 19, 2014, 01:39:04 AM
#2
The Blockchain.info website is reporting the technical details of how transactions work at the protocol level.

Your wallet is protecting you from these details so you won't become confused.

Now you've gone and looked at the technical details and have become confused.  This is why your wallet protects you from such details.

Specifically:
https://en.bitcoin.it/wiki/Change


Also, from a quick Google search:

Quote
With the way bitcoin works, you can't partially spend a previous output that you received.  It has to be completely spent.  So, if you receive 10 BTC all in a single transaction from someone/somewhere at an address, then that address now has a single 10 BTC output.

Later if you want to send 2 BTC to somebody, the program can use the previous 10 BTC output as an input into the transaction, and create a 2 BTC output to the address where you want to send it.  This leaves 8 BTC leftover in the transaction.  If you don't send those 8 BTC somewhere, then they become miner fees and end up in the coinbase transaction of the new block for the miner to keep.  If you don't want to give those 8 BTC away as fees to the miner, then you need to include a second output in your transaction sending the 8 BTC back to your own wallet.  As an analogy, think of pulling a $10 bill out of your pocket to pay for something that costs $2, you get $8 back in "change".

The way Bitcoin-Qt does this is to create a new bitcoin address that it doesn't tell you about and keeps track of that address and the associated private key in your wallet.dat.  Since this isn't an address that you requested in the "Receive Coins" tab of the user interface, it doesn't show up in that list.  Bitcoin-Qt knows about the address since it is in the wallet.dat file, so it includes it in the balance that it shows you.  Bitcoin-Qt uses a new change address for every transaction.  So if you create 10 different transactions, each sending bitcoins somewhere, then your wallet will have used 10 different change addresses (although some of them may be empty if Bitcoin-Qt used the bitcoins associated with some of those address as inputs into other transactions).
newbie
Activity: 49
Merit: 0
January 19, 2014, 01:28:01 AM
#1
Hi all,

I need some help with the following issue. Today I wanted to check the block chain just for fun. There it says that my balance is actually 2.5BTC, but my wallet after syncing tells me it is around 5 BTC. So what the hell is going on here?

Is it possible a virus sent my BTC away? I do have my wallet password protected.

My address on the chain is here: https://blockchain.info/nl/address/12fXL5fonYtxWg4fFJtuZ3anbP3iNvLJNM
I see a transaction from January 14th, where I actually transfered 0.999BTC (I did this myself), but in the same transaction, 2.4BTC got set away, I did NOT do that...

Any idea what could be going on here?

Thanks in advance!
Jump to: