Hi guys I am doing some research on double spending in the bitcoin network several ideas have been confusing me:

In prevention of Race attacks, merchants are advised to "connect to a large random sample nodes in the network".

First of all, What do they mean by this? How is it done?

Secondly, how do attackers initiate the attack? All I know is they make 2 transactions of same reference, one to themselves the other to the merchant who recognizes only the latter and surrenders his goods.

In an article on prevention, it states "We assume that the attacker may connect to an arbitrary number of nodes in the network to broadcast any number of transactions claiming outputs to its possession."

What exactly does this mean?

Thank you guys, I know this question is very condensed but I appreciate any help.

EDIT: Does it mean that I can go out and send X amount of bitcoins to myself and immediately spend the same amount, X on a merchant to defraud him?

Isn't that just too easy?

1 Answer 1


You have already answered your question. The basic double spending attack in question is just that: The attacker initiates a Bitcoin transaction and claims a benefit from it. Then the attacker does the same thing again, potentially broadcasting the new, conflicting transaction to a larger number of nodes in the Bitcoin network, in an attempt to have the new transaction confirm instead of the first one. If that succeeds depends on which kind of miner, one having seen the initial or the later transaction first, manages to mine the next new block (with a few extra caveats, like that miner actually choosing to include said transaction in his newly mined block).

Computer scientists call this general phenomenon where the overall outcome from concurrent processes depends on what happens first a race condition. The race condition I just described can continue if nodes continue mining on different subchains where one contains the first transaction and the other subchain contains the other transaction from the double spending attack.

There are also more complicated forms of double spending attacks, but all of them have a race condition to some extent, and hence I would call all of them eligible for the description "Race Double Spend." You may also be interested in one, the Finney Attack, that makes the race condition almost disappear through premining, such that the attacker has an almost unbeatable head start if the recipient (e.g. the merchant) instantly accepts an unconfirmed transaction.

  • "conflicting transaction to a larger number of nodes in the Bitcoin network" How do they do this? I am still very new to bitcoins, I thought 1 device was connected to 1 node?
    – user14900
    Commented Mar 30, 2014 at 1:48
  • A node refers to one running instance of a Bitcoin client acting as a node in the peer-to-peer Bitcoin network. Usually it connects to several other nodes, amongst other things to propagate your Bitcoin transactions. A malicious party can obviously program his Bitcoin client differently, including the option to connect to very many other nodes in an attempt to spread one of teh double spending transactions particularly quickly.
    – user6049
    Commented Mar 30, 2014 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.