hey guys,
just wanted to add some facts around the actual state of the zero-conf transaction security right now as that seems to be not known widely.
First of all, sending a second transaction to double spend your own can only lead successfully to a double spend in a very small amount of time. Within 3 seconds the entire network has the first one sent, so if you wait longer your new transaction will simply get rejected by each and every peer. No effect. You basically need to do it at the exact same time as the original one that the merchant has to see.
A user that successfully sends two transactions and is already extremely lucky to make it into some miners mempools then gets into the gamble of getting the one they want mined. If that miner didn’t get the block, no luck.
This is a big gamble and most of the DS-attempts end up simply paying the merchant anyway. (which is why users trying this with DSProof in place lose their money most of the time).
DSProof protects against all those cases.
We didn’t make DSProofs any more strong than just a message to the merchant because the human factor is important. People testing, people confused and all that are relevant and various service minded companies will prefer to decide for themselves what the policy is. Anything from calling the police, confiscating the funds (in the ~80% chance of the DS failing) to simply giving a stern talking to. The currently deployed DSProof solution allows all of this.
An anonymous service or casino or vending machine are most likely just going to cancel the order and if the money arrives it will cover the administrative costs. The user that went out of their way to double spend loses it. I can’t lose any sleep over that…
There is another thing we want to do. An improvement of behavior when it comes to payment protocols. BIP 70 specifies that the customer is to send the transaction to the merchant and the merchant is then the one responsible for broadcasting it to the network. But this doesn’t happen in any current implementations.
Yet, having the merchant send the transaction to the network is super useful as it allows them to play with timing (we are talking about some 100s of milliseconds) of broadcasting the transaction.
This is super useful because the attacker has to know the timing in order to broadcast his offending transaction himself and have the right effect of his second transaction landing in the mempool of a miner. If the attacker is too fast, the merchant will instantly know as the transaction is rejected by the node he connects to (and he gets a bonus double spend proof).
If the attacker is too slow, the chance of the attack succeeding drops massively. (and still the merchant gets a double spend proof).
I learned recently that this exchange has added ds proofs ‘silently’. https://imgur.com/pKWZVLm for https://imgur.com/vk1p2w2
In short, in mainnet today:
- stealing from a receiver by double spending has a very low probability of succeeding.
- Any DS needs to be sent within a second, max two, in order to have any realistic chance at all. The merchant-run-full-nodes simple reject it as they are the ones that value the first-seen rule to be kept, there is no reason to think it won’t be kept.
- we can still improve when we start to develop better payment protocols which makes it even more certain that the money will go to the merchant.
- There is in practice no risk to a merchant that uses a proper backend (which all wallets and point of sale software do anyway) because then they WILL learn about the double spend attempt.
Matching the ridiculously low chance of success with a certainty of being caught and the repurcussions.
Here is an example of what happens when a wallet checks for double spend proofs. Notice that it doesn’t really take long at all after first seeing it: