Post
Topic
Board Bitcoin Technical Support
Re: Trying to understand double spending after 1 confirmation.
by
ranochigo
on 13/07/2023, 08:05:05 UTC
With full RBF becoming more commonplace, this attack is becoming possible with any transaction, whether or not it is opted in to RBF.

You might also be interested to read this post, which describes how a miner can double spend a transaction with one confirmation: https://bitcointalk.org/index.php?topic=36788.msg463391#msg463391. It is essentially the same scenario described by ranochigo above where there are two competing blocks at the same height, with some of the network working on one and some of the network working on the other, but the scenario has been deliberately engineered in order to give the attack the highest chance of success. The advantage of this method for the attacker is they do not need a large amount of the hashrate as you only need to mine a single block to attempt the attack.
The caveat being that the amount that you're depositing has to be more than your block reward at least for the attack to the worthwhile. Given how well the mining pools are connected to each other, it's unlikely that your block would be able to propagate faster than them so the scenario whereby your block gets stale is much more likely. The minimum cost for this attack would likely be more than the block reward, if you were to factor everything in.

It would also fail if the person receiving the funds sees the other block first with how the topology of Bitcoin network is designed. A more worthwhile attack would be the selfish mining, where an attacker tries to withhold and generate blocks faster than the rest.