We’re rewarding the question askers & reputations are being recalculated! Read more.
39

The Finney attack is named after Hal Finney, who suggested it in this comment. (Hal happens to be the first recipient of a Bitcoin transaction, and the first person to comment on the release of the Bitcoin source code.) It is a double spending attack with the following features: It only works if the merchant accepts unconfirmed transactions. It still works,...


33

The details are very complex, but the core concept is fairly simple. Ripple solves the double-spend problem by consensus. The analogy I use is an "agreement room". To walk into the room, you have to agree with everyone who is already in there. If you want to disagree, you have to leave and form your own room. Everyone who is honest wants to get into the ...


23

As others have said "copying a bitcoin" is trivial but of no value. Your wallet consists of addresses and each of those addresses has a certain value. When your wallet says you have "20 bitcoins" it simply an abstraction. Currently your wallet file consists of multiple addresses and the combined value of those addresses according to the bitcoin block ...


21

A double spend is an attack where the given set of coins is spent in more than one transaction. There are a couple main ways to perform a double spend: Send two conflicting transactions in rapid succession into the Bitcoin network. This is called a race attack. Pre-mine one transaction into a block and spend the same coins before releasing the block to ...


19

The big advantage on the Bitcoin side is that its technology is now well-proven. Ripple's consensus system is the newcomer. Ripple was designed by people who had the benefit of seeing exactly what Bitcoin was doing and its strengths and weaknesses. Ripple's consensus process can validate a transaction such that irreversibility is reasonably assured much ...


16

I can't speak for what it does every time but I just tested Mr. Schwartz's comment, so I can speak for what it did this one time. I remote controlled a geographically distant machine running an identical copy of Bitcoin on it and my local PC (with identical wallets). I sent identical conflicting transactions for my entire balance within a few milliseconds of ...


15

If a merchant accepts 0-confirmation transactions, he has to accept that the transaction can be reversed. So he only should do that if he trusts you for more than the amount you transferred to him. You won't get any bragging rights for doing that, since Bitcoin never promised to be secure without sufficient confirmations. That trust may come from different ...


14

The Finney attack is a variation of a double-spend attack. The attacker creates two transactions - one crediting the victim and one crediting themselves. They keep the first transaction for now and proceed to try mining the second one into a block. When they succeed (this may take awhile), they quickly make a purchase with the first transaction, get the ...


13

For what it's worth, MyBitcoin.com claimed that their closure was precipitated by a series of double-spend attacks: Our programmer was under the assumption that one block was good enough to secure a transaction. Two years ago when the software was written, this single confirm myth was a popular belief. User theymos (an administrator of the ...


13

Essentially, there is no such thing as a "suspicous transaction" and bitcoin is already set up to work in the way that you want. Double spending is handled like this -- if two transactions spending the same input(s) happen in the same block, both will be rejected. If one transaction makes it into a block before the other, the first one will be accepted and ...


13

Every full Bitcoin node maintains a database of which unspent outputs are left. When verifying a transaction, all its inputs are fetched from the database. If one is missing, validation fails. Among the data retrieved is the value of those unspent outputs, and their script (od address), which define the conditions under which the output can be spent. This ...


11

Ripple solves the double spend problem by consensus. Everyone who wants to run a server on the Ripple network picks a set of validators and tries to reach a consensus with them on which transactions are valid. The Ripple equivalent of Bitcoin's 51% attack would be if some group obtained control over enough validators that the consensus process failed. ...


10

This question has been asked several times in several different places, and nobody has yet come forward with evidence of a double-spend attack. It is, of course, possible that nobody is bothering with such an attack because everyone waits for confirmations anyway. Your analysis is correct. You can act on fewer confirmations with the same level of ...


10

Double-spending has nothing to do with double clicking the send button. It involves a malicious user, who will not use the standard client. It will hack one to avoid any client-side limits, sending two transactions to a different side of a blockchain fork, so both sides don't know about the transaction sent to the counterpart and includes the transaction in ...


10

This is definitely a concern, and is the reason why Bitcoin users are encouraged to wait for several confirmations before accepting a transaction and delivering goods. It's not quite as easy as you suggest, though. When you made your transaction at the cafe, it was, as you say, broadcast across the network. Barring connectivity problems, every node on the ...


9

Each full node must maintain a list of all unspent outputs. Currently there are 15 million unspent outputs with a total size of 525 MB. To check whether a new transaction is a double-spend, Bitcoin sees whether the outputs being spent are in this unspent transaction output (UTXO) database. If they are, the new transaction is not a double-spend, and if the ...


9

My question then is: why doesn't bitcoin specify a maximum duration of time and/or a maximum number of confirmations, after which a competing/forking block is rejected even if it's backed by a longer chain of (secretly premined) child blocks? Because you can't prove that to nodes that weren't on the network at the time of the attack. Which means that either:...


9

There are multiple definitions of the term "double spending" at play here. First, there is the actual definition of double spending: to spend the same money multiple times. A simple example of this is the coin on a string in a vending machine. You put tie a string to a coin, when you put the coin in the machine, it thinks you paid, you get whatever you want ...


8

A double-spend would be blackletter law illegal, guys. Fraud and theft include a wide variety of intentional deception wrongfully depriving someone of property - use of a government-minted currency is not, and never was, a required element. Look at any larceny or fraud statute - it will refer to loss of or damage to person and property not "dollars." ...


8

First, a quick clarification: assuming two chains both have valid blocks, it's the chain with the most proof of work that wins, not necessarily the chain with the most blocks. Second, thanks for the psuedocode. It's always nice answering a question written in clear code. The answer is that we want nodes to be able to agree on the best block chain based ...


8

How to Double Spend You can double spend using Electrum quite easily. Even without duplicating your wallet, be it on the same or on 2 different machines. Btw.: Duplicating wallets is super easy with Electrum. Just go to Tools → Preferences → Transactions and check View transaction before signing. Close the settings, go to the "Send" tab, and enter the ...


7

Assuming all else is equal (same network hashrate, etc) then the attacker still represents the same percentage of the overall hashrate and therefore may claim the same percent of the blocks for his/her attack. While it's true that faster block time increases the total number of blocks, reduces the difficulty and makes it so that the attacker has more ...


7

On March 11th, 2013 there was an unplanned hard fork and as a result there was at least one double spend attack performed in which a large amount of funds (bitcoins worth $10K USD) were double spent. http://bitcointalk.org/index.php?topic=152348 http://www.bitcoinmoney.com/post/47048259653


7

If you are attempting a 0-confirm double spend then which transactions (if any) are included in the next block is irrelevant. Your goal is to simply complete both transaction prior to either merchant getting notification of the other one. The "problem" is that the network is fairly quick at passing transactions from one node to the next. Unless you have ...


7

Bitcoin's security rests on the assumption that the majority of the hashing power follows the protocol. If instead miners/pools break protocol for a quick buck by switching to a conflicting transaction which is clearly a double-spend attempt, this assumption no longer fully holds. One can only hope that the mining pool (or any block issuing agent) will ...


7

When a node receives two conflicting transactions, it will only relay the first one that it received, dropping the other. If one transaction fully propagates through the network before the other is sent, the first will prevent the second from ever reaching any miner nodes. If both transactions are sent at roughly the same time, the network will be in ...


7

At the moment there's very little orphaning of blocks, and next to no occurrence of two-block side chains. Unless you're dealing with large amounts (larger than two block rewards worth, probably), your chances of attack are incredibly incredibly low. If you're dealing with amounts less than a few BTC, I'd personally be happy accepting one-confirmation ...


7

Double spending is not about doubling, but about using the same UTXO twice. So, you won't gain anything by double spending coins to yourself. Let me explain you, with a simple example, how double-spending works: Lets Alice be an attacker trying to double spend some coins. Alice goes to Bob's store to buy some goods. In order to pay for the goods, she ...


7

So are bitcoins, or the smallest allowable bitcoin fractions, distinctly labeled entities? They are unspent amounts (outputs of prior transactions) associated with addresses. Unspent transaction outputs are abbreviated UTXO. Bitcoins or fractions (millibits, Satoshis etc) don't exist as entities in computers running Bitcoin software. The computers just ...


6

You won't be able to see a double-spend in the block chain, because it is invalid. You will see one of the transactions included in the chain though. Blockchain.info has a page showing the most recent double-spends. Double spend is just two (or more) transactions claiming the same input, so they will look like an ordinary pair of transaction. One of them ...


Only top voted, non community-wiki answers of a minimum length are eligible