Post
Topic
Board Beginners & Help
Merits 5 from 3 users
Re: Help with stuck transaction [Newb mistake]
by
witcher_sense
on 05/02/2021, 07:24:54 UTC
⭐ Merited by DdmrDdmr (2) ,o_e_l_e_o (2) ,rabbitfairferry (1)
Earlier transaction: Send 1 btc @ lower fee
Later transaction: Send 2 btc @ higher fee.

(1) Would it be correct to say that the 2 btc transaction will replace the 1 btc transaction?

(2) How does the bitcoin network distinguish this from there being 2 separate transactions eg. to send a total of 3 btc? Assumption here is that the UTXO has more than 3 btc.

Thanks.
1) The second transaction doesn't replace the first one since they both are in the pool of unconfirmed transaction. Both are valid until one of them gets confirmed. The reason the higher fee transaction may be confirmed faster than the previous low fee one is that miners are usually incentivized to maximize their profits and strive to include transactions with a higher fee. 

2) The thing is you can't spend part of the UTXO. So if your UTXO contains 3BTC, and you need to buy a cup of coffee worth 1BTC, you end up sending 1BTC to the coffee shop owner and 2BTC back to yourself. That transaction will destroy the old 3 BTC UTXO and create two new ones 1BTC for coffee 2BTC as change. For simplicity, I didn't include transaction fee.