<p>The attack is this simple:</p>

<ol>
<li><p>You connect to both the merchant and every major mining pool.</p></li>
<li><p>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.</p></li>
<li><p>The merchant sees the transaction paying them, and accepts it with zero confirmations.</p></li>
<li><p>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.</p></li>
</ol>

<p>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.)</p>

CC BY-SA 3.0
2013-12-22T16:58:53.173Z
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!
michael.schuett
CC BY-SA 3.0
2013-12-22T08:10:26.947Z
2013-12-22T08:10:26.947Z
David Schwartz
<p>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 <a href="https://bitcoin.stackexchange.com/questions/10686/what-are-the-risks-of-running-an-online-store-via-a-bitcoind-connection-using-le/11523#11523">What are the risks of running an online store via a bitcoind connection using less than the minimum of 8 connections?</a> 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.</p>

<doublespend><merchants>
Inbound connection merchant risk
michael.schuett
# Inbound connection merchant risk

(Asked by: username_0 on 2013-12-21)

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?](https://bitcoin.stackexchange.com/questions/10686/what-are-the-risks-of-running-an-online-store-via-a-bitcoind-connection-using-le/11523#11523) 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.

**Tags:** doublespend, merchants


---

## 1 answers

### Answer by username_1 on 2013-12-22. Score: 1 | Accepted answer

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.)

> **Comments:**
> **username_0**: 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 username_1!  

---

