The Bitcoin Double-Spend Controversy Explained

Giottus
4 min readFeb 8, 2021

On 20th Jan, 2021 a tweet from BitMexResearch suggested a crisis of epic proportions. A small ‘double spend’ of around 0.00062063 BTC ($21). The market spooked, resulting in an 11% drop in Bitcoin’s price.

Now to many of us, questions arose, like: What is Double-spending? Why does Double-spending cause so much panic? Was the recent Double-spend real?

What is Double-spending?

Double-spending is the potential risk attached to Digital currencies — that of users being able to spend them twice. It’s a unique problem limited to digital currencies that, for the longest time, held back their invention and true adoption. Because digital information can be replicated easily on devices, if your money were to be a file — what would stop you from copying it and paying using it at multiple places?

Let me give you an example: let’s say you go to a local fruit shop and you purchase fruits worth $5. You’ve paid the money to the shopkeeper, now can you again buy fruits from the same $5 which you’ve already spent? The answer is ‘no’ unless you steal that $5. But Bitcoin is not physical, it’s digital cash so it has a possibility of being copied.

We don’t face this issue with physical currency as there’s a third-party (a human) to verify the transaction. Sure, counterfeit notes exist, but even for the malicious agents, they’re far from easy to execute.

In simple words therefore, when the same currency is spent twice it is called “Double-spending”

Initially, this was a challenge with Bitcoin as well.

It’s why Bitcoin came up with a mechanism based on transaction logs, known as the blockchain, to verify the authenticity of each transaction and prevent double-counting.

How does the blockchain prevent double spending?

The blockchain is a type of database — a collection of information that is stored electronically. It’s designed to store significantly larger amounts of information that can be accessed, filtered, and manipulated quickly and easily by any number of users at once.

A blockchain collects information together in groups, also known as blocks, that hold sets of information. Blocks have certain storage capacities and, when filled, are chained onto the previously filled block, forming a chain of data known as the “blockchain.”

To prevent double spending, the blockchain provides a way for all nodes to be aware of every transaction. It allows itself to be copied entirely with every entity on the network. In other words, all transactions are publicly announced to all nodes. They can then agree on a single history of the order in which they were received.

Bitcoin’s solution to double-spending is that if the majority of the nodes agree on which transaction was first to be received, later attempts to double-spend are irrelevant.

Why does double spending cause so much panic?

So the reason for panic can be double-spend attacks.

Types of double-spend attacks

While not all cryptocurrencies use the same confirmation mechanism, most of them can counter double-spending. However, it is still theoretically possible for a double-spend attack to occur. Here’s how:

Race attack

This is when someone sends two conflicting transactions rapidly into the Bitcoin network and the first transaction gets overridden by the second one, but the sender still benefits from both of the transactions.

Finney attack

Named after Hal Finney, who suggested it, a Finney attack occurs when the merchant doesn’t wait for confirmation of the transaction. In this case, a miner transfers funds from one wallet to another but doesn’t validate the block immediately. Then, he or she uses the source wallet to make a purchase. Once the second transaction is set, the miner broadcasts the previously mined block, which also includes the first transaction.

51% attack

Perhap the most popular form of a blockchain attack, a 51% attack is an attack on Blockchain by a group of miners controlling more than 50% of the hash rate and computing power. In other words, they can decide which version of the blockchain to agree on for the entire network. Attackers can prevent new transactions from getting confirmation, allowing them to halt payments between some or all users. They’ll also have the power to reverse transactions that were completed while they were in control of the network, meaning they could double-spend coins.

Was the recent Double-spend real?

The answer to this question is “No”.

So what actually happened?

In this particular case, the fee was quite low, so the transaction took some time to confirm. The sender then tried to outpace it by sending what’s called a “replace by fee transaction” (RBF). However instead of the RBF, replacing the slow transaction as intended, the lower fee transaction cleared and made it to the block (which was mined onto the longest chain).

Meanwhile, the higher fee transaction found its way onto a stale block. The final result: 0.00062063 BTC is recorded as existing on the address 1D6aebVY5DbS1v7rNTnX2xeYcfWM3os1va on the irrelevant transaction history while 0.00014499 BTC exists on the same address but on the relevant transaction ledger.

In short:

The double spend didn’t actually happen. And we moved past the FUD.

--

--