What is a Bitcoin Double Spend and how does it work?

4 stars based on 68 reviews

One article I am reading said that proof of work system is used in Bitcoin to prevent double spending. Imagine we are protecting against double spending in following way. When Bob receives transaction from Alice saying that "Alice transfers some BTC to Bob", bob would broadcast this to entire bitcoin double spend example to ask them to verify whether this is a legitimate bitcoin double spend example.

In the mean time say if Alice had sent also same message to Charlie saying that she is transfering same BTC to CharlieCharlie would have also broadcast this message and other nodes on the network would spot that Alice is trying to spend same BTC with two persons, and they would let Bob or Charlie know that this is invalid transaction. Or if all is ok Bob or Charlie would wait till some nodes send acknowledgment that this is valid transaction.

Above scheme would work but Alice could cheat bitcoin double spend example the following way. She could create say one million fake identities on network, and they would lie to Bob and Charlie that the transactions was valid- making them accept payment. Now comes my question. It seems proof of work was introduced in Bitcoin to prevent exactly the above kind of sock poppet attack.

But I fail to see how proof of work helps protect against above sock puppet attack. Why would Alice not be able to introduce those fake identities on the network anymore? I know what proof of work is, this question is more related how and why it prevents above mentioned sock puppet attack. It is not really bitcoin double spend example Proof of Work which prevents double spends but rather the blockchain itself which prevents double spends.

The Proof of Work is just one aspect of the blockchain. For a transaction to be considered final, it must be in the blockchain. Otherwise it could bitcoin double spend example forever and everyone forgets about it. For a transaction to be added to the blockchain, it must be included in a block, and miners will do a Proof of Work for the block. In order for the transaction to be included in a block, the outputs that it spends from must have not been spent by any other transaction in the blockchain nor by any other transaction in the block.

If such an other transaction exists in the blockchain, then the block will be invalid. It is this process of including transactions in blocks which avoids double spends. It essentially establishes an order and says "this transaction is the real transaction, all others which spends any of the outputs which this transaction bitcoin double spend example are fake". The proof of work mechanism exists in Bitcoin because that is what makes the blockchain immutable.

A valid proof bitcoin double spend example work means that a miner is proving that they did a certain amount of work, on average, in order to produce a block. In order to replace that block, someone else must also do about the same amount of work for that block. If someone wanted to modify a block in the blockchain and have everyone accept it, that person must perform the same amount of work that went into creating the block, then do the same for every single block that follows it because those blocks would be invalid since a block in their history has changed.

This makes the blockchain immutable; the amount of work required to rewrite history is considered to be infeasible and much too costly to do practically. That is what the Proof of Work is for. For a transaction to be bitcoin double spend example it is not enough to be broadcasted by the attacker or repeated by many nodes.

It must be added to the blockchain by some node in the network. Adding the transaction to the blockchain is not easy, as some node in the network bitcoin double spend example make PoW, which is bitcoin double spend example and processing power consuming. Inside single chain bitcoin double spend example cannot collide. Each node accepts longest chain as valid one so for an attack to succede the attacker must maintain two equally long chains.

Then some nodes will accept one chain and others other chain as valid, thus allowing an attacker to spend money twice - within one transaction on one chain and other 'colliding' transaction on other chain.

Thus there will exist in long term: As said, inside single chain transactions cannot colide, thus you cannot double spend. Since the amount of computation required do Hash Guessing to send rogue messages bitcoin double spend example so high, it becomes impractical to do 1M impersonation requests.

One can steal private keys of other nodes to create transactions on their behalf, but still it would follow Blockchain consensus principles. If Alice owns majority of the Blockchain nodes, then she can authenticate a rogue transaction using the consensus. Faking identities is quite difficult and the scenarios why it will eventually fail has been explained in croraf's answer. By posting your answer, you agree to the privacy policy and terms of service. Questions Tags Users Badges Unanswered.

Bitcoin Stack Exchange is a question and answer site for Bitcoin bitcoin double spend example enthusiasts. Join them; it only takes a minute: Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top.

How proof of work prevents double spend. Can someone ealaborate and explain? Only block chain would not suffice. All nodes have blockchain locally. So as in question if alice simultaneously sends same transaction to bob and charlie in both users' blockchain it would seem bitcoin double spend example the transaction is valid because that coin has not been spent yet. So you need a consesus protocol where bob and charlie would ask for example whole network if the transaction they receive is OK.

That's not how the blockchain works. The blockchain is the consensus protocol where Bob and Charlie asks the network whether the transaction they receive is ok. The blockchain is not something that is added to locally when new transactions are received. It is added to locally when new blocks are received, and new blocks can only be created by performing the proof of work. Blocks and transactions must also conform to the consensus rules that the node is following.

Those rules also include double spend protection. Here is article I referred to: And besides can you then explain maybe in answer WHY proof of work was added to bitcoin? The Sock Puppet reference Why would Alice not be able to introduce those fake identities on the network anymore? She could create say one million fake identities on network Sign up or log in Sign up using Google.

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Stack Overflow for Teams is Now Available. Bitcoin Stack Exchange works best with JavaScript enabled.

Calacanis bitcoin value

  • Cloudbased automated bitcoin arbitrage and trading botsjack huangblog

    Dogecoin solo dig

  • Tibia xenobot scripts free

    Selles abondantes et liquides en

Market liquidity and performance monitoring

  • Bitcoin growth bot nucleusico presale reviewfree giveaways

    E liquid stainless steel bottle

  • Bitcoin mining modules definition

    Free download bitcoin segweet b2x mp3

  • Pp2 bitcoinethereum bergbau linux cpu

    Lisa cheng bitcoin stock

Cordus bitcoin wallet

15 comments Circuito de sumo robot nxt codes

Wow ethereum jail or baileys

Kraken was the first Bitcoin exchange to have trading price and volume displayed on the Bloomberg Terminal, the first to pass a cryptographically verifiable proof-of-reserves audit, and is a partner in the first cryptocurrency bank.

Buy Bitcoin or sell, margin trading Ethereum, leverage trading. Admins may or may not choose to remove the comment or block the author. 1 395 Retweets; 1 244 Likes; Mir Josh Whittington J H QUINTIX. Does Bittrex have an app that will let me trade on my ios phone.