Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: sed on July 28, 2014, 01:05:03 AM



Title: Has there ever been a double-spend?
Post by: sed on July 28, 2014, 01:05:03 AM
As far as I understand (and part of the point of this thread is for someone to correct me if I'm wrong about this), the possibility of a double-spend is tied to the ability of a someone who wants to perpetrate that getting the double spend into the blockchain.  Also, as far as I know, if this happened, people would complain and the main effect would be that confidence in the bitcoin "system" would be damaged.  However, if it happened relatively early, maybe not so many people would have heard about btc yet so maybe it would have been possible that such a double spend is somewhere early in the block chain.  Is this the case?  Am I totally off the mark?


Title: Re: Has there ever been a double-spend?
Post by: confirmation120 on July 28, 2014, 01:51:43 AM
Yes there have been several double spends throughout Bitcoin history. There is nothing that the person who was suppose to receive the bitcoin can do about it.

One notable double spend attack was by addresses associated with ghash who double spent coins on a dice site for when they lost the bet.


Title: Re: Has there ever been a double-spend?
Post by: sed on July 28, 2014, 02:20:38 AM
Yes there have been several double spends throughout Bitcoin history. There is nothing that the person who was suppose to receive the bitcoin can do about it.

One notable double spend attack was by addresses associated with ghash who double spent coins on a dice site for when they lost the bet.

That's very interesting.  Can you point me to the documentation/discussion of these events?


Title: Re: Has there ever been a double-spend?
Post by: ncsupanda on July 28, 2014, 02:46:04 AM
I found this:

https://bitcointalk.org/index.php?topic=130764.0


Title: Re: Has there ever been a double-spend?
Post by: sed on July 28, 2014, 02:59:44 AM
I found this:

https://bitcointalk.org/index.php?topic=130764.0

Thanks!  I looked at that thread and it seems like it wasn't actually a double spend because the first send had 0 transactions.  The poster indeed got to roll at satoshidice twice with the same btc, but this isn't the same as spending the same btc twice in the blockchain.


Title: Re: Has there ever been a double-spend?
Post by: gmaxwell on July 28, 2014, 03:51:32 AM
but this isn't the same as spending the same btc twice in the blockchain.
What you sound like you're looking for here is fundamentally impossible. As a rule all nodes impose the constraint that a coin can only be spent once in the chain, if you find a blockchain that has two spends in it it isn't a bitcoin blockchain and your node software will just ignore it as though it were never there.

An actual double-spend that can exist involves getting someone to take an irreversible action based on one spend, while a different spend is what ends up in the long term history— and this has happened many times, primarily against websites (esp gambling sites) that take irreversible actions with 0/1 confirmations.


Title: Re: Has there ever been a double-spend?
Post by: sed on July 28, 2014, 04:09:58 AM
but this isn't the same as spending the same btc twice in the blockchain.
What you sound like you're looking for here is fundamentally impossible. As a rule all nodes impose the constraint that a coin can only be spent once in the chain, if you find a blockchain that has two spends in it it isn't a bitcoin blockchain and your node software will just ignore it as though it were never there.

An actual double-spend that can exist involves getting someone to take an irreversible action based on one spend, while a different spend is what ends up in the long term history— and this has happened many times, primarily against websites (esp gambling sites) that take irreversible actions with 0/1 confirmations.

This is totally the kind of enlightenment I was looking for.  So, if i understand you, the network software won't allow a blockchain with two spends of the same coin.  The only kinds of double spends than can exist is that someone "accepts" a coin that ends up spent elsewhere according to the eventual blockchain.  Is that right?


Title: Re: Has there ever been a double-spend?
Post by: gmaxwell on July 28, 2014, 04:25:59 AM
This is totally the kind of enlightenment I was looking for.  So, if i understand you, the network software won't allow a blockchain with two spends of the same coin.  The only kinds of double spends than can exist is that someone "accepts" a coin that ends up spent elsewhere according to the eventual blockchain.  Is that right?
Yep.  Bitcoin completely prevents a double spend within the context of a single blockchain, no amount of lying nodes or miners can break that. ... but a blockchain is at best only eventually consistent, if you depend on transactions staying put before they're adequately confirmed (or when a lot of hashpower is controlled by a single entity) all bets are off— since the 'eventual blockchain' may not include the transactions you're looking at right now.


Title: Re: Has there ever been a double-spend?
Post by: sed on July 28, 2014, 04:48:08 AM
This is totally the kind of enlightenment I was looking for.  So, if i understand you, the network software won't allow a blockchain with two spends of the same coin.  The only kinds of double spends than can exist is that someone "accepts" a coin that ends up spent elsewhere according to the eventual blockchain.  Is that right?
Yep.  Bitcoin completely prevents a double spend within the context of a single blockchain, no amount of lying nodes or miners can break that. ... but a blockchain is at best only eventually consistent, if you depend on transactions staying put before they're adequately confirmed (or when a lot of hashpower is controlled by a single entity) all bets are off— since the 'eventual blockchain' may not include the transactions you're looking at right now.


Thanks gmaxwell.  I think that totally answers my question.  I'm going to go ahead and lock this thread.

Cheers!