40

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 ...


22

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 ...


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

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

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

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." ...


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

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

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

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 ...


6

This will be possible using the 'raw transaction interface' that was added recently and scheduled to be part of the 0.7.0 release. With listunspent you can request a list of available coins sent to a particular (wallet) address, and with createrawtransaction you can build a transaction that consumes specified coins. Finally, sendrawtransaction can be used ...


6

You should also know that the task of finding an SHA256 collision (same hash for two different byte arrays) is a pretty complex one. Miners are spending terahashes per second to find a hash which is smaller than a target. An exact match would be very hard to find. Also, the attacker in this task is required to be a miner with enough power to solve and ...


6

A really quick answer is this: The proof of work system is a solution to the distributed synchronization issue; in another guise it is called the Byzantine Generals' Problem. Thus, any solution to this problem is an acceptable alternative, however the proof-of-work solution is particularly suited to distributed systems. You can read Satoshi Nakamoto's ...


6

Both Bitcoin and Ripple are systems made of many components. One such component is a method to synchronize transactions and secure against double-spending; Bitcoin uses mining based on proof of work for that, while Ripple uses a consensus mechanism. Another component is the initial issuing of coins - Bitcoin uses mining for that as well, while Ripple uses ...


6

From http://www.cryptocoinsnews.com/news/the-mathematically-secure-way-to-accept-zero-confirmation-transactions/2014/02/13, here is what services like MyCelium and BitPay may be doing: More specifically, with every additional second a larger percentage of active Bitcoin nodes will have heard the original transaction and everyone viewing the blockchain can ...


6

When a node hears about a new transaction, they try to accept it to their in-memory pool of transactions. If a node hears about a transaction that conflicts with one of the transactions that is already in their mem-pool, then they simply won't accept it to their mem-pool. The default client also won't forward the transaction on to any other nodes, either. ...


6

The other two answers explain what has to be done to discover doublespends. I'll try to explain how it works. There are no "balances", there are "coins" A common misunderstanding is that there is a register of balances for addresses, and when you spend bitcoins, some of your balance gets deducted from your address. Actually, that's not a good description of ...


6

Occasionally, minor alternate chains emerge if multiple blocks are found for a given blockheight. Usually, these alternate chains only last for a single blocked, and are quickly dropped once another block has been found, allowing one chain to become longer (and thus have more work). More rarely, these chains might last for a couple of blocks. Block 525890 ...


5

As a merchant, you can reduce the likelihood of losses from a race attack double spend by having your node properly configured (no incoming transactions, explicit outgoing connections to well-connected nodes). There still is a tiny risk of getting cheated even with this configuration but it is rare and relatively random. Thus the disincentive to the ...


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