0

I'm quite confused about the input count that affect the transaction size, example:

x1 = my receive btc address

x2 = my another receive btc address

x3 = my another receive btc address

Scenario A

P1 send 1 btc to address x1

P2 send 1 btc to address x1

P3 send 1 btc to address x1

Scenario B

P1 send 1 btc to address x1

P2 send 1 btc to address x2

P3 send 1 btc to address x3

So my wallet will have total balance 3 btc.

My question is when I try to send 3 btc to P4 (Another user), scenario A will count as 3 inputs or scenario B will count as 3 inputs or both is same 3 inputs?

1

Transaction inputs need to reference the Unspent Transaction Output (UTXO) they are spending with the outpoint of that UTXO. The outpoint is the transaction id of the transaction that created the transaction output concatenated with a colon and the output position in that transaction: txid:vout.

Let's say you were sent 1 BTC by P1 to address x1 in transaction uiaex and it was the second output (vout = 1 because we start counting at 0), the corresponding outpoint would be uiaex:1.

The UTXO reference therefore is independent of the address that the funds were sent to previously.

The transaction size is therefore the same whether you received all outputs to the same address or different addresses. There are no savings in transaction size by receiving funds to the same address multiple times.

-1

There are three inputs to the transaction in both scenario A and scenario B.

Your scenarios, with a little more details:

Scenario A

P1 makes transaction t1, and sends 1 btc to address x1 in transaction output 0

P2 makes transaction t2, and sends 1 btc to address x1 in transaction output 0

P3 makes transaction t3, and sends 1 btc to address x1 in transaction output 0

Scenario B

P1 makes transaction t1, and sends 1 btc to address x1 in transaction output 0

P2 makes transaction t2, and sends 1 btc to address x2 in transaction output 0

P3 makes transaction t3, and sends 1 btc to address x3 in transaction output 0

Transactions

With scenario A, sending 3 btc to P4 translates to the following transaction: merge t1-output0, t2-output0, t3-output0 together, and send 3 btc to P4's address. There are no transaction fees.

With scenario B, it is the same transaction-wise: merge t1-output0, t2-output0, t3-output0 together, and send 3 btc to P4's address. There are no transaction fees.

  • Thanks for your reply bro, you mean both scenario also no network fee? This 3 inputs will not increase the next payment transaction size? I saw many article mentioned inputs+outputs+10 = best fee to pay.. – Wei Keat Dec 15 '17 at 5:38
  • 1
    "There are no transaction fees" is misleading. It's true that you have described transactions that don't include any fees. If you try to actually make such transactions, they will most likely not be confirmed. If you want them to be confirmed, you will need to include fees, which means that you will not be able to send a full 3 BTC to P4, but rather slightly less. However, the amount of fees needed will be the same in either case, since both transactions would be the same number of bytes. – Nate Eldredge Feb 21 '18 at 0:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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