coin selection - why selecting transactions with confirmations first better

2

I know that selecting transactions with confirmations first are much better than spending transactions with 0 confirmations direct.

But why is that?

Adam

Posted 2018-01-04T10:49:24.067

Reputation: 3 215

Answers

2

Many wallet implementations prefer spending confirmed inputs over unconfirmed inputs. There are multiple reasons for this preference:

  1. Bitcoin Core (and perhaps other software as well) does not propagate chains of unconfirmed transactions beyond a certain depth. If you continuously reuse unconfirmed UTXOs, eventually your transactions will not be seen on the network until some predecessors confirm.

  2. Transactions using unconfirmed inputs are susceptible to become invalid due to a parent transaction being replaced or doublespent.

  3. A transaction building on top of an unconfirmed change cannot be confirmed until the parent transaction is confirmed. This dependency is used by child-pays-for-parent transactions positively to increase the priority of the parent transaction, but can also be a handicap, when a low fee transaction essentially puts the onus on the recipient to bump the transaction in order to gain access to their funds.

Murch

Posted 2018-01-04T10:49:24.067

Reputation: 41 609

1

If you spend zero conf transactions, the spend will not confirm until the transaction they source confirms. You can end up with a chain of transactions all waiting for the first one to confirm. Computers are ok with this, but people get confused. :)

harrym

Posted 2018-01-04T10:49:24.067

Reputation: 91

is it the only reason? Because what I that if you received unconfirmed transaction you can push it by re-spending that transaction with higher fee.Adam 2018-01-04T17:21:23.893

This is a different question, but in brief, there are ways to push the transactions along (child pays for parent (cpfp), replace by fee (rbf), miner accelerators).harrym 2018-01-04T21:35:28.663