Author

Topic: Help me understand how to read the blockchain transaction history.. (Read 273 times)

legendary
Activity: 2352
Merit: 6089
bitcoindata.science
Are remaining BTC always sent to a new address after a transaction? i.e. the address always changes after every spend?

It is a best practice to always use a new address for every transaction.  However, there is no requirement to do so.  Therefore, there have been some wallets that the developers have chosen to send the remaining BTC back to the same address every time. I prefer NOT to use wallets that make such a lazy decision.

Additionally to the excellent explanation provided by DannyHamilton.

Using the same address doesn't consolidate your inputs. If you use a wallet which sends the change back to the original address you will have multiple inputs from the same address.
newbie
Activity: 6
Merit: 4
Thanks, its still a bit technical for me Smiley

Lets say I want to send 0.05 BTC from my Coinbase wallet to my friend who has a Bitpay wallet. Will this show up on the blockchain as one transaction with one input (my public address) and one output (friend's public address)?

The following analogy is not perfect, but it will get you started down a path of understanding.  There are a few more details to understand beyond the scope of the analogy, so don't get too caught up in the specifics...

Think of your bitcoin wallet as an actual physical wallet.  When someone pays you, think of that as them handing you a physical bill that you put into your physical wallet.

So, Alice pays you a $5 bill.  Then, Bob pays you a $10 bill. Then Carl pays you a $5 bill.

All together, you've received a total of $20, but what do you actually now have in your wallet?  Do you have a single $20 bill?  Or do you have a single $10 bill and two $5 bills?

Now, lets say you want to pay David $14?  You have to pull out two separate bills (the $10 and a $5). That's two inputs into your transaction to David, however, David gives you $1 back for your wallet.

The way Bitcoin works is similar to this (except the recipient doesn't send the change back, instead the sender creates the change when they create the transaction).

Every time you receive a payment (regardless of whether it is to the same address or a different address) the transaction paying you creates a new separate output that represents that payment.
Then when you want to make a payment, you need to choose from all the previous outputs that you received.  You need to choose enough of these separate outputs so that the sum of their value is at least the amount that you are trying to pay.  Each output that you choose gets listed as an input in the transaction that you are creating.  Then if the sum of all those inputs happens to be more than the amount you are trying to send, the transaction needs to create two new outputs, one for the value of the payment that you are sending, and another for the extra so that it can be added back to your wallet.

Note that it is possible to create a single transaction that pays multiple people.  So, if I want to pay Alice 0.1 BTC, and I want to pay Bob 0.2 BTC, and I want to pay Carl 0.3 BTC, and I have two outputs in my wallet each worth 0.5BTC, then I can create and send a transaction that has two inputs each valued at 0.5 BTC (for a total input value of 1 BTC), and has FOUR outputs (one for each person I'm paying plus an additional output worth 0.4 BTC back into my own wallet).

I cant merit as I'm too new I think, but just wanted to say thanks for the excellent explanation.
legendary
Activity: 3472
Merit: 4801
Thanks for the excellent explanation @DannyHamilton! If I understood it right, multiple inputs are due to the history of those particular bitcoins - they could be paid from 1 large source or consolidated from multiple smaller sources, presumably going all the way back to when they were created.

Are remaining BTC always sent to a new address after a transaction? i.e. the address always changes after every spend?

It is a best practice to always use a new address for every transaction.  However, there is no requirement to do so.  Therefore, there have been some wallets that the developers have chosen to send the remaining BTC back to the same address every time. I prefer NOT to use wallets that make such a lazy decision.
newbie
Activity: 25
Merit: 27
Thanks for the excellent explanation @DannyHamilton! If I understood it right, multiple inputs are due to the history of those particular bitcoins - they could be paid from 1 large source or consolidated from multiple smaller sources, presumably going all the way back to when they were created.

Are remaining BTC always sent to a new address after a transaction? i.e. the address always changes after every spend?
legendary
Activity: 3472
Merit: 4801
Thanks, its still a bit technical for me Smiley

Lets say I want to send 0.05 BTC from my Coinbase wallet to my friend who has a Bitpay wallet. Will this show up on the blockchain as one transaction with one input (my public address) and one output (friend's public address)?

The following analogy is not perfect, but it will get you started down a path of understanding.  There are a few more details to understand beyond the scope of the analogy, so don't get too caught up in the specifics...

Think of your bitcoin wallet as an actual physical wallet.  When someone pays you, think of that as them handing you a physical bill that you put into your physical wallet.

So, Alice pays you a $5 bill.  Then, Bob pays you a $10 bill. Then Carl pays you a $5 bill.

All together, you've received a total of $20, but what do you actually now have in your wallet?  Do you have a single $20 bill?  Or do you have a single $10 bill and two $5 bills?

Now, lets say you want to pay David $14?  You have to pull out two separate bills (the $10 and a $5). That's two inputs into your transaction to David, however, David gives you $1 back for your wallet.

The way Bitcoin works is similar to this (except the recipient doesn't send the change back, instead the sender creates the change when they create the transaction).

Every time you receive a payment (regardless of whether it is to the same address or a different address) the transaction paying you creates a new separate output that represents that payment.
Then when you want to make a payment, you need to choose from all the previous outputs that you received.  You need to choose enough of these separate outputs so that the sum of their value is at least the amount that you are trying to pay.  Each output that you choose gets listed as an input in the transaction that you are creating.  Then if the sum of all those inputs happens to be more than the amount you are trying to send, the transaction needs to create two new outputs, one for the value of the payment that you are sending, and another for the extra so that it can be added back to your wallet.

Note that it is possible to create a single transaction that pays multiple people.  So, if I want to pay Alice 0.1 BTC, and I want to pay Bob 0.2 BTC, and I want to pay Carl 0.3 BTC, and I have two outputs in my wallet each worth 0.5BTC, then I can create and send a transaction that has two inputs each valued at 0.5 BTC (for a total input value of 1 BTC), and has FOUR outputs (one for each person I'm paying plus an additional output worth 0.4 BTC back into my own wallet).
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
Thanks, its still a bit technical for me Smiley

Lets say I want to send 0.05 BTC from my Coinbase wallet to my friend who has a Bitpay wallet. Will this show up on the blockchain as one transaction with one input (my public address) and one output (friend's public address)?

You will have a better understanding if you stop using coinbase and move your funds to a real wallet.

For now you don't have access to your inputs, private keys, etc. All of that is done by your custodial service (coinbase) and you are paying them to do that (paying high fees for example).

Use the wallets I recommended (electrum or samourai) and everything will be much clear to you
hero member
Activity: 1358
Merit: 851
Will this show up on the blockchain as one transaction with one input (my public address) and one output (friend's public address)?
If you send through coinbase, your public address will not be visible; coinbase don't hold your fund in your public address. For instance; you have received fund in one of your coinbase address- the fund will not be in your address, it will be held by coinbase cold wallet. You may check it through one of your address when you receive fund through coinbase.
So, your friend's public address will be seen & the address coinbase used to send the fund will be seen in blockchain.

Because Coinbase isn't a wallet and they might process withdrawals in batch like other Exchanges do.

IDK if they implemented it already though, 'coz I stopped using their service years ago. (Their statement that mentioned batching: blog.coinbase.com)
You are right, they still send fund through a batch.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
Lets say I want to send 0.05 BTC from my Coinbase wallet to my friend who has a Bitpay wallet. Will this show up on the blockchain as one transaction with one input (my public address) and one output (friend's public address)?
That will probably come up as multiple inputs (from Coinbase's Hot wallet) and multiple outputs (to your friend and other users).
Because Coinbase isn't a wallet and they might process withdrawals in batch like other Exchanges do.

IDK if they implemented it already though, 'coz I stopped using their service years ago. (Their statement that mentioned batching: blog.coinbase.com)
newbie
Activity: 25
Merit: 27
Didn't understand why this is the case. [1] If the sender pays from different addresses, should the system not make each into a seperate transaction? [2] What is the cut-off for deciding which sends are consolidated into one transaction?
Let me.
  • 1. It will be less efficient in terms of transaction fee and if that's how transactions are made, the number of unconfirmed tx in the network will grow exponentially.
  • 2. Your client (wallet) decides which input(s) (UTXO: visually, the addresses you see in the "input") to use.
    The commonly used method is: choose the one with the closest balance to the amount being sent, if one isn't enough, the wallet will use two or more.
    Some clients are choosing random UTXO(s) for privacy purposes.


Thanks, its still a bit technical for me Smiley

Lets say I want to send 0.05 BTC from my Coinbase wallet to my friend who has a Bitpay wallet. Will this show up on the blockchain as one transaction with one input (my public address) and one output (friend's public address)?
legendary
Activity: 3472
Merit: 10611
I'm fascinated by the fact that we can set the fee. Suppose I set it to the minimum (or zero...?) is the transaction guarenteed to go through (with the delay)? Thanks.

The  minimum fee you can set is 1 sat/byte.

please note that 1 satoshi/byte is the minimum fee that you can set when using a wallet, and minimum fee that 99% of the nodes and miners have set in their minrelayfee which means they would reject any less than that.
but at protocol level the actual minimum fee is zero which means sending the entire amount.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
Didn't understand why this is the case. [1] If the sender pays from different addresses, should the system not make each into a seperate transaction? [2] What is the cut-off for deciding which sends are consolidated into one transaction?
Let me.
  • 1. It will be less efficient in terms of transaction fee and if that's how transactions are made, the number of unconfirmed tx in the network will grow exponentially.
  • 2. Your client (wallet) decides which input(s) (UTXO: visually, the addresses you see in the "input") to use.
    The commonly used method is: choose the one with the closest balance to the amount being sent, if one isn't enough, the wallet will use two or more.
    Some clients are choosing random UTXO(s) for privacy purposes.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
I'm fascinated by the fact that we can set the fee. Suppose I set it to the minimum (or zero...?) is the transaction guarenteed to go through (with the delay)? Thanks.

The  minimum fee you can set is 1 sat/byte.
The total fee depends on the size of your transaction, which increases with the number of inputs and outputs (so the total fee vary)

Even 1 Sat/byte transactions are guaranteed to go through,  but you may have to wait a couple of days. Personally,  I see no problem in waiting a few hours or even 2days (never waited more than 36hours and i always use 1sat/byte.

One additional parameter which let you control the fee is the type of address.  If it is segwit  your transactions are smaller so they are cheaper. I recommend  you download electrum.org wallet for desktop or samurai wallet for android to get to know bitcoin a little more

Few years ago you could make 0sat /byte transactions,  but not anymore.
legendary
Activity: 2380
Merit: 5213
Didn't understand why this is the case. If the sender pays from different addresses, should the system not make each into a seperate transaction? What is the cut-off for deciding which sends are consolidated into one transaction?
We can have several inputs and outputs in a single transaction.

Quote
I'm fascinated by the fact that we can set the fee. Suppose I set it to the minimum (or zero...?) is the transaction guarenteed to go through (with the delay)? Thanks.
The fee should be higher than zero, so the transaction is included in a block.
You can use the link below for the calculation of the required fee.
https://www.buybitcoinworldwide.com/fee-calculator/


By the way, making multiple posts in a row is against forum rules.
Please delete the last post you made and merge it into the previous one.
1. Edit the last post you made. 2. Copy the entire post into your clipboard. 3. Edit the previous post and paste your clipboard content. 4. delete your last post.
legendary
Activity: 2744
Merit: 3096
Top Crypto Casino
I'm fascinated by the fact that we can set the fee. Suppose I set it to the minimum (or zero...?) is the transaction guarenteed to go through (with the delay)? Thanks.
Some web wallets doesn't allaw their customers to customize fees.
a transaction with zero fee will not be relayed. The minimum is 1 sat/b (1 sat/vB for segwit transactions).

Transaction confirmation time depends on how much fees you pay though. The higher the fees are, the faster your transaction get confirmed.
newbie
Activity: 25
Merit: 27
Quote
Is the fee (0.00105 BTC in the example) always paid by and deducted from the sender?
Yes. Note that this fee was much higher than needed for this transaction.

Transaction fee  is calculated by satoshi per byte (sat/byte). Fees are calculated by the size, in bytes, of the transaction.

That transaction spent 200 sat/byte, which is ridiculously high. What wallet are you using? Is it blockchain.com?

You can easily and somehow quickly confirm transactions with less than 30 sat/byte. If you are not in hurry (if you can wait 12- 36 hours) you can even send with 1-2 sat/byte

So far only have a wallet on localbitcoins. The transaction I linked to was random, not mine.

I'm fascinated by the fact that we can set the fee. Suppose I set it to the minimum (or zero...?) is the transaction guarenteed to go through (with the delay)? Thanks.
newbie
Activity: 25
Merit: 27
Thanks!


The sender uses Bitcoins from different addresses. Compare it to paying in cash: you give a $20, a $10 and a $1 bill.
One transaction can pay to more than one address. In this case, there are 2 outputs, so it's likely one of them is a change address owned by the sender. In dollar terms: think of it as getting a nickel back.


Didn't understand why this is the case. If the sender pays from different addresses, should the system not make each into a seperate transaction? What is the cut-off for deciding which sends are consolidated into one transaction?

legendary
Activity: 2352
Merit: 6089
bitcoindata.science
Quote
Is the fee (0.00105 BTC in the example) always paid by and deducted from the sender?
Yes. Note that this fee was much higher than needed for this transaction.

Transaction fee  is calculated by satoshi per byte (sat/byte). Fees are calculated by the size, in bytes, of the transaction.

That transaction spent 200 sat/byte, which is ridiculously high. What wallet are you using? Is it blockchain.com?

You can easily and somehow quickly confirm transactions with less than 30 sat/byte. If you are not in hurry (if you can wait 12- 36 hours) you can even send with 1-2 sat/byte
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
Firstly, to confirm, is 'input' the sender/spender and 'output' the receiver of the bitcoins?
Correct.

Quote
Is the link above ONE transaction, i.e. when a person pays x BTCs from his wallet to another wallet?
Yes.

Quote
If so, why are there multiple ins and outs?
The sender uses Bitcoins from different addresses. Compare it to paying in cash: you give a $20, a $10 and a $1 bill.
One transaction can pay to more than one address. In this case, there are 2 outputs, so it's likely one of them is a change address owned by the sender. In dollar terms: think of it as getting a nickel back.

Quote
Is the 'hash' (also in the URL) basically the 'transaction reference (or number)' so to speak?
Yes.

Quote
Is the fee (0.00105 BTC in the example) always paid by and deducted from the sender?
Yes. Note that this fee was much higher than needed for this transaction.
newbie
Activity: 25
Merit: 27
For an example transaction:
https://www.blockchain.com/btc/tx/71df79fe8f379134adf95d44bcf451391726bd5d211a26b7fa90be83585adb4c

Firstly, to confirm, is 'input' the sender/spender and 'output' the receiver of the bitcoins?

Is the link above ONE transaction, i.e. when a person pays x BTCs from his wallet to another wallet? If so, why are there multiple ins and outs?

Is the 'hash' (also in the URL) basically the 'transaction reference (or number)' so to speak?

Is the fee (0.00105 BTC in the example) always paid by and deducted from the sender?

Thanks in advance..
Jump to: