1

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

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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