Bitcoin Forum

Other => Beginners & Help => Topic started by: hairypoints on December 12, 2020, 11:05:55 PM



Title: Can you change/modify a btc transaction?
Post by: hairypoints on December 12, 2020, 11:05:55 PM
Whats it called when you modify a btc already sent transaction?



Title: Re: Can you change/modify a btc transaction?
Post by: BitMaxz on December 12, 2020, 11:38:09 PM
What wallet you currently used?

What exactly do you want to do with your transaction?

Do you want to change the transaction fee?

Electrum wallet can be able to do that if RBF is enabled.


Title: Re: Can you change/modify a btc transaction?
Post by: NotATether on December 12, 2020, 11:49:47 PM
Once a transaction is signed and broadcasted, it cannot be modified except to raise the transaction fee inside it (If some conditions are met, other properties can be changed, see answer below mine), if you turned on RBF for that transaction. This creates a new transaction with higher fees but otherwise has the same addresses and payment amounts as the first transaction. And  this new transaction needs to be signed and broadcasted in order to replace the first transaction.

But there is no way to modify the sending addresses, receiving addresses or payment amounts or fees if you turned off RBF after the transaction is already sent, because it has already been signed.


Title: Re: Can you change/modify a btc transaction?
Post by: hosseinimr93 on December 13, 2020, 12:23:11 AM
Once a transaction is signed and broadcasted, it cannot be modified except to raise the transaction fee inside it, if you turned on RBF for that transaction.
The replacing transaction can have different inputs and outputs as well.
Any RBF transaction can be replaced by a new one if the following two conditions are met.

1. The replacing transaction must have a higher fee.
2. The replacing transaction must have at least 1 same input.


Title: Re: Can you change/modify a btc transaction?
Post by: pooya87 on December 13, 2020, 05:34:48 AM
It is called double spending, which technically means spending the same transaction output in a different transaction. There are 3 forms of double spending:
1. The easiest one called Replace By Fee (RBF) only applied unconfirmed transactions that are also market by RBF (to put simply have lower than max sequence) and is usually used to bump the fee.

2. The harder one which again is applied to unconfirmed transactions but the tx is not market as RBF hence the nodes reject the new transaction they receive as a bad double spend and if the initial tx is propagated properly it is extremely hard to get the second on to propagate.

3. The impossible one which is applied to confirmed transactions which is impossible due to extremely high cost of it since it requires a 51% attack and controlling a huge amount of hashrate that costs a lot of money. It also gets harder with each block that is added on top of the block containing the transaction.


Title: Re: Can you change/modify a btc transaction?
Post by: o_e_l_e_o on December 13, 2020, 09:01:44 AM
This creates a new transaction with higher fees but otherwise has the same addresses and payment amounts as the first transaction.
Specifically, this is called First-Seen-Safe RBF, or FSS RBF. This means that RBF can only be used if the new transaction pays all the same outputs as the first transaction by at least the same amount. It can pay more, it can pay additional outputs, it can spend additional inputs, it will obviously need a higher fee, but it must pay all the original outputs the same or more. You can read more about it here: https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki#motivation. In reality, very few nodes actually enforce this, and most just use standard RBF as described by hosseinimr93 above.



More generally, there is also transaction malleability which allows a transaction to be modified after it has been broadcast. It will still spend the same inputs and pay the same outputs, but the transaction hash will be changed, which is why it is never safe to accept an unconfirmed transaction with one or more unconfirmed parents.