0

I'm a complete beginner to anything and everything about cyrpto. I've been trying to research a lot about it, and I have recently just been trying to learn and understand some of the basics.

I was wondering if double spending ever happens at all?
Does it happen every day, rarely, or not at all?

  • 2
    Related: There is a website to track doublespends on Bitcoin Cash: doublespend.cash – Murch Dec 14 '18 at 18:46
0

This question is difficult as only the miners can answer it 100% correctly, but let me try:

You need to differentiate between:


  • successfull double spendings

Double-Spending is not really possible because of the consensus. The miners need to check wheather the bitcoins are still unspent. But: The scenario of a chain-fork (because of a 51% attack or a bug) could cause a temporary double-spend-problem. This guy tells about a bug that caused a chain-fork of 26 blocks and multiple double spends (but that seems to be happend only once).


  • and only trying to double-spend

It's not illigal to try it (so far, as I know). I tried it because I wanted to know how it works. I think, a lot of people experimented to send the same bitcoin to 2 or more different addresses at the same time but of course it did not work.

| improve this answer | |
  • RBF is interesting application of "trying to double-spend". – sanket1729 Mar 28 '18 at 8:39
0

It depends on what you mean by 'double spend'. Spending bitcoin just means using it to buy something. Therefore 'successfully' double spending bitcoin would just mean that you were able to buy something from two different people, even though one (or maybe both) end up being short of the bitcoin they thought they received.

The way bitcoin works is that there is a blockchain which contains all the bitcoin transactions that have ever happened. An interesting property of the blockchain is that the longer a transaction has been included in the blockchain, the more certain you can be that it'll remain there in the future. Transactions are added in 'blocks' which are produced on average every 10 minutes.

In this way, merchants would decide how long to wait before considering a transaction as 'final', ie when they will complete their half of the exchange with a customer. So for example, if a merchant was selling a house, they may wait until 6 blocks before handing over the deeds. Similarly, a coffee shop might accept a bitcoin transaction even before it has been added to the blockchain, as long as they can see it has been broadcast.

Since most online stores would wait for say 3 blocks, and it probably isn't that profitable to pull it off in any coffee shops or bars accepting bitcoins, it probably doesn't happen that often.

It's worth noting that nobody can know for sure how often double spends happen, not even miners. There's no information on the blockchain about whether bitcoins were successfully exchanged for other goods.

| improve this answer | |
0

Double Spend Attack

A double spend attack occurs when an attacker successfully sends the same cryptocurrency to two different parties and they in return give something of value back to the attacker. To achieve this, you have to convince the network that both transactions are valid.

The way a node in the network determines if a transaction is valid, is by looking back at the blockchain and making sure you have ownership of the coins you're trying to spend. If you do, the transaction is accepted and mined into a block (which means you're now handing over ownership to the coins to the merchant).

Here comes the hard part. Now the attacker has to fork the blockchain, so each merchant has a different view of the blockchains history. That means the attacker has to spend their coins on one side, then mine blocks on the other side of the split and omit that transaction so they can spend it again.

Once the attacker stops the attack, the blockchain reaches consensus again, and there is only one valid chain. The merchant on the forked chain is out of luck because their transaction is now in an invalid block. They no longer have ownership of the coins and they also don't have their good/service. This is why it's a good practice for merchants to wait for 6 confirmations (the transactions to be buried 6 blocks deep), so they can be confident the transaction was made on the heaviest chain.

Why it's Infeasible in Bitcoin

To perform this attack you need to be technically savy and have a significant amount of hashing power in the network to create the forked view of the blockchain. This has never happened in Bitcoin because it is sufficiently decentralized and the vast amount of hashing power it has behind it.

There are a few important things to note:

  • An attacker can only spend coins they already own.
  • If you have the amount of hashing power to fork the blockchain, you're economically incentivized to contribute to the network because you earn a block reward and transaction fees for each legitimate block you mine.
  • It also harms the integrity of the network. If a double spend attack is successful then confidence is lost in the currency and the value drops. You've already had to have invest a lot of capital into the hardware to perform the attack and now the currency isn't worth anything and now your hardware is useless.

Double spend attacks generally happen to altcoins that share the same hashing algorithm as Bitcoin, so they can benefit from the attack and still use their mining equipment.

| improve this answer | |

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.