<p>Yes, double spend attempts can happen. They're the reason we need a blockchain in the first place. To be able to know which transaction was "first" and which one was the double spend we need an agreed-upon record of history: the blockchain.</p>

<p>Until a transaction is in the blockchain, there is no way to know whether it was the first or a double spend, so it's actually pretty irrelevant which is which. Once a transaction is in the blockchain it by definition becomes the "first", and all further attempts are "double spends" (and invalid, so they'll never go into that blockchain).</p>

<p>Proof of Work mining provides a slow ticking (and very hard to fake) clock that defines the order of transactions.</p>

<p>The only thing that can still screw you over is a re-org: another branch of the blockchain with possibly different transactions overtaking the branch that you were looking at before and becoming the de facto accepted branch. That's actually not uncommon to happen if you only have one or two confirmations but becomes exponentially less likely with each additional confirmation. That's why the white paper suggests waiting for six.</p>

CC BY-SA 3.0
2018-04-23T02:42:48.727Z
2018-04-23T11:01:24.917Z
2018-04-23T11:01:24.917Z
Jannes
<p>I am trying to learn more about Bitcoin.</p>

<p>I was looking at this video to understand how a "double-spend attack" is kept from taking place on the Blockchain (in Bitcoin).</p>

<p><a href="https://youtu.be/Lx9zgZCMqXE?t=12m13s" rel="nofollow noreferrer">https://youtu.be/Lx9zgZCMqXE?t=12m13s</a></p>

<p>In this case, Alice might send money to Bob to purchase an item.</p>

<p>Alice may use the same input to send money to Joe for another item at the same time.</p>

<p>It then becomes a race as to which one will get approved and which one will get rejected (the one sent to Bob or Joe).</p>

<p>It is my understanding that a "double-spend attack" could not take place because all of the nodes will be working at the same time.</p>

<p>I have heard of transactions not being processed for days because of a low miners fee.</p>

<p>In such a situation, would not this allow ample time for a "double-spend attack" to take place?</p>

<p>TIA</p>

<race-attack>
Can this double-spend attack happen in Bitcoin?
Casey Harrils
# Can this double-spend attack happen in Bitcoin?

(Asked by: username_0 on 2018-04-22)

I am trying to learn more about Bitcoin.

I was looking at this video to understand how a "double-spend attack" is kept from taking place on the Blockchain (in Bitcoin).

<https://youtu.be/Lx9zgZCMqXE?t=12m13s>

In this case, Alice might send money to Bob to purchase an item.

Alice may use the same input to send money to Joe for another item at the same time.

It then becomes a race as to which one will get approved and which one will get rejected (the one sent to Bob or Joe).

It is my understanding that a "double-spend attack" could not take place because all of the nodes will be working at the same time.

I have heard of transactions not being processed for days because of a low miners fee.

In such a situation, would not this allow ample time for a "double-spend attack" to take place?

TIA

**Tags:** race-attack


---

## 1 answers

### Answer by username_1 on 2018-04-23. Score: 3 | Accepted answer

Yes, double spend attempts can happen. They're the reason we need a blockchain in the first place. To be able to know which transaction was "first" and which one was the double spend we need an agreed-upon record of history: the blockchain.

Until a transaction is in the blockchain, there is no way to know whether it was the first or a double spend, so it's actually pretty irrelevant which is which. Once a transaction is in the blockchain it by definition becomes the "first", and all further attempts are "double spends" (and invalid, so they'll never go into that blockchain).

Proof of Work mining provides a slow ticking (and very hard to fake) clock that defines the order of transactions.

The only thing that can still screw you over is a re-org: another branch of the blockchain with possibly different transactions overtaking the branch that you were looking at before and becoming the de facto accepted branch. That's actually not uncommon to happen if you only have one or two confirmations but becomes exponentially less likely with each additional confirmation. That's why the white paper suggests waiting for six.


---

