We start by discussing a number of countermeasures to alleviate this attack. We also present a solution that is integrated in Bitcoin XT and we analyze the limitations of this solution.
Adopting a Listening Period
As advocated in , one possible way for V to detect double-spending attempts is to adopt a listening period of a few seconds before delivering its service to A; during this period, V monitors all the transactions it receives, and checks if any of them attempt to double-spend the coins that V previously received from A. This techniques are based on the intuition that since it takes every transaction a few seconds to propagate to every node in the Bitcoin network, then it is highly likely that V would receive both TRy and TRa within the listening period (and before granting service to A).
This detection technique can be circumvented by A as follows. A can attempt to delay the transmission of TRa such that t =(ty - ty) exceeds the listening period (requirement (3)) while TRa still has a significant chance of being spread in the network. On one hand, as t increases, the probability that all the immediate neighbors of V in the Bitcoin P2P network receive TRy first also increases; when they receive TRa later on, TRa will not be added to the memory pool of V’s neighbors and as such TRa will not be forwarded to V .On the other hand, A should make sure that TRa was received by enough peers so that requirement (2) can be satisfied. To that end, A can increase the number of helpers it controls.
As shown in Table 4.2 (results adapted from ), an adversary can successfully double-spend transactions even if the merchant adopts a listening period of 15 seconds. The detection probability in this case varies between 10% and 80% depending on the topology of the underlying overlay Bitcoin network. Even worse, as shown in Table 4.3, there are cases in which the vendor can never detect a doublespending attack even if he or she adopts an infinite listening period time. These cases correspond to the scenario where all the neighbors of V have received TRy first and therefore they will never forward TRa to V.