Post
Topic
Board Development & Technical Discussion
Merits 2 from 1 user
Re: Doubt about double spending
by
o_e_l_e_o
on 29/09/2021, 12:38:16 UTC
⭐ Merited by pooya87 (2)
If it has an unconfirmed parent(s), any of the parent transaction shouldn't be marked as replaceable as well.
You shouldn't really accept zero confirmations for any transaction which has any unconfirmed parents regardless of their RBF status, since transaction malleability would allow a miner to invalidate the child transaction without invalidating/double-spending the parent transaction(s) (unless all the unconfirmed parents only spend bech32 segwit inputs).

By the way, very interesting, if you scroll down a bit there's a so-called vector76 attack, which is possible even though as a recipient you see 1 confirmation. So I would always wait for like 3 confirmations if I'm in a hurry and the amount is not large, but for anything else 6 confirmations.
As noted on the wiki page, for this attack to be successful the attacker's block which contains their deposit transaction would need to lose to the competing block at the same height, and therefore become stale. So if the attacker is trying to scam you for less than the block reward plus fees, then it makes no sense for them to perform this attack since they would make more money by just broadcasting their block and claiming the block reward. I'd still be happy to accept 1 confirmation for small values.