I was recently looking at the safest way to set up an online bitcoin service. When looking for security concerns I ran across this post on stackexchange What are the risks of running an online store via a bitcoind connection using less than the minimum of 8 connections? under the main question Stephen Gornick talks about how allowing inbound connections on 0 conf could open you up to huge double spends. I looked all over for the reason for this but was hoping someone could explain this vulnerability to me.

1 Answer 1


The attack is this simple:

  1. You connect to both the merchant and every major mining pool.

  2. At the same time, you send a transaction paying the merchant to the merchant and a conflicting transaction that pays yourself to every major mining pool.

  3. The merchant sees the transaction paying them, and accepts it with zero confirmations.

  4. The mining pools see the transaction paying yourself first, so they try to work that transaction into blocks. Eventually, one of them succeeds and the merchant will never get paid.

If you accept payments with zero confirmations, you should connect directly to multiple points in the Bitcoin network as close to major mining pools as possible and monitor for any conflicting transactions -- even if seen later. (There are other things you must do too. It's not trivial.)

  • I am still doing a lot of research on the matter. I do not intend to accept 0 conf but was just curious on the matter. You're the best David! Dec 22, 2013 at 16:58

Your Answer

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

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