Bitcoin Forum
May 15, 2024, 02:48:18 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question about transaction  (Read 430 times)
ETSAH (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
May 06, 2017, 09:22:50 AM
 #1

I have sent 0.02 BTC from my address to a address where I wanted to deposit
I am using bitcoin core

This is the tx:
https://blockchain.info/tx/23a133145509e61c9defb29869d08c0915b685f10ec0994649ccac245805e89c

The address i sent from has ~0.25BTC

Why is in my tx another address, which receives 0.08BTC ?
Where can I see this address in my Bitcoin core wallet ?
I assume it is my change, but why is my change not 0.25 - 0.02 ?
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4188



View Profile
May 06, 2017, 12:42:58 PM
Last edit: May 06, 2017, 03:08:29 PM by ranochigo
 #2

Why is in my tx another address, which receives 0.08BTC ?
That is the change address, the remainder of your coins are sent after deducting amount to your intended recipient and fees.
Where can I see this address in my Bitcoin core wallet ?
It isn't displayed in the UI. You need to go Help>Debug Window> Console and key in 'listaddressgroupings'. You should be able to see all your addresses.
I assume it is my change, but why is my change not 0.25 - 0.02 ?

Your wallet doesn't use the entire UXTO in the address for every transaction. It analyses and select the input which is most suitable for it. In this case, your wallet chose the input https://blockchain.info/tx-index/233438884/1 to spend from. If you press 'show script and coinbase', you should be able to see it.

Your change is the total amount of inputs* - given as fee - the total amount of the outputs.

* Huge mistake on my part. Thanks HCP for correcting me. (More proof reading in the future i guess Cheesy)

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
May 06, 2017, 02:56:46 PM
 #3

I assume it is my change, but why is my change not 0.25 - 0.02 ?

Your wallet doesn't use the entire UXTO in the address for every transaction. It analyses and select the input which is most suitable for it. In this case, your wallet chose the input https://blockchain.info/tx-index/233438884/1 to spend from. If you press 'show script and coinbase', you should be able to see it.

Your change is the total amount spent/given as fee - the total amount of the inputs.
Ummmm close... but backwards Wink

Change = Total Amount of Inputs - (Total Amount spent + Mining Fee)

Also... just to clarify why your change isn't 0.25 - 0.02...

The address you sent from: 14m5YnAypdnEdYo35qNRB6FC88fJgGpAmV had 2 inputs in it... one for ~0.14 and one for ~0.101... because you're only spending 0.02, the wallet does not need to use both of those inputs... so it picked one (most wallets try to use the smallest inputs first)... and it chose the ~0.101 input...

Thus, your change is = ~0.101 - (~0.2 + 0.0002) => ~0.8 Wink

If you had tried to spend say 0.12, your wallet would have probably tried to use the ~0.14 input in the transaction... and if you had tried to send ~0.2, it would have had to use both inputs.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
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!