What Is the Double Spending Problem?

James HeadshotAuthor: James Page
Last Updated: July 2020

Disclaimer: We may receive a commission for purchases made through the links on our site. However, this does not impact our reviews and comparisons. Learn more about our Affiliate Disclosure.

The idea for an electronic payment system where users will trade digital coins and transact directly, without the need for third-party involvement, goes back to the 1980s.

However, this proved to be a much more complex job than computer scientists initially thought, and it took another thirty years before the first digital coin was launched. In 2009, Satoshi Nakamoto mined the first Bitcoin, using the blockchain technology he had perfected.

You might wonder what took them that long and what was the biggest difficulty these engineers had to tackle? Namely, the double spending problem, or the existing risk that a single coin would be spent twice.

If you’re curious to find out more about the double spending problem and how computer scientists were finally able to solve it, just keep reading!

The Double Spend Problem Explained

By the 1990s, credit cards were already in use for more than two decades. The first online transaction took place in 1994 on NetMarket, a website run by a 21-year-old entrepreneur named Dan Kohn. Technology was quickly soaring to new heights.

What then postponed the emergence of virtual currencies?

At the core of the mechanism behind cryptocurrencies lay the problem of how to surmount the double spending. This problem resulted from the lack of verification that a single digital token won’t be multiplied and spent more than once, for more than one service.

This is something that fiat currencies are exempt from because when you go to the deli to buy a $5 sandwich, for example, the cashier takes your $5 bill, and there’s no way for you to spend it on that coffee to go.

In their groundbreaking book, Blockchain Revolution: How the Technology Behind Bitcoin Is Changing Money, Business, and the World (2016), Don and Alex Tapscott explain this scenario in more detail:

“On the Internet, people haven’t been able to transact or do business directly for the simple reason that money isn’t like other information goods and intellectual property per se. You can send the same selfie to all your friends, but you ought not give your friend a dollar that you’ve already given to someone else. The money must leave your account and go into your friend’s. It can’t exist in both places, let alone multiple places. And so there’s a risk of your spending a unit of digital currency in two places and having one of them bounce like a bad check. That’s called the double-spend problem.” 

If people used the same input for online transactions multiple times, this would lead to inflation and cryptocurrencies would lose their value. To prevent this, we handed the regulation over to the financial institutions that acted as intermediaries and verified the transactions.

Early Attempts to Solve the Double Spending Problem

But wasn’t the main idea of cryptocurrencies to ensure privacy and get rid of any centralized authority? Exactly.

Having banks to regulate the double spend problem results in loss of privacy, high transaction fees, frequent delays, and lack of sufficient protection. But computer scientists were relentless.

In 1982, David Chaum, an American cryptographer, developed the blind signatures, which when used to sign transactions, concealed the identity of the sender and the amount that’s being transferred. This was made possible by using encrypted public keys, but while it addressed the problem with lack of privacy, the system was still centralized.

A year later, Wei Dai, a computer engineer at the University of Washington, published his proposal for B-Money, where he describes two types of protocolsby which these services [the exchange of money] can be provided to and by untraceable entities” on a decentralized network. Similarly to Chaum’s blind signatures, Dai’s system was to use encrypted public keys as pseudonyms for both senders and receivers.

In the first protocol, every network user has a database with the money owned by every single user listed by his/her private key, and the whole network agrees on the ownership of money. The second protocol chooses a group of network users (servers), who have to deposit a certain amount of their money, and assigns them the task of authenticating transactions.

Although B-Money was the first serious proposal of a decentralized network that would tackle the double spend problem, it was never launched because the right technology that would implement the suggested protocols was yet to be created.

How Blockchain Prevented Double Spending

In 2008, in the now famous white paper, Satoshi Nakamoto introduced the first completely functional non-trust based digital payment system. The system was built using blockchain technology that was able to include a revised consensus mechanism based on Wei Dai’s first type of protocol, known as Proof of Work (PoW).

So, how does PoW work?

Instead of entrusting a central authority to have control over the money transfers, the blockchain network gives that power to all of its users, known as miners because they “mine” blocks of data to store the transactions.

This is done by solving a complex mathematical problem. The miners run the data through a hash function and try to generate a hash value that when hashed with the same function begins with the required number of zero bits. This has to be repeated a number of times because every single attempt produces a different hash value. The number of hash attempts per second is known as a hash rate.

This prevents double spending since the newly mined block includes the hash value of the previous one, and therefore, anyone who tries to make changes to it would have to alter all the preceding blocks as well. Additionally, what makes the transactions even more reliable is that they have to receive 6 confirmations from 6 different miners.

Is There a Risk?

The greatest risk with this type of PoW mechanism is the so-called “51% attack”. This is a situation in which an individual (or a group of individuals) succeeds in gaining control over more than 50% of the whole computing power, or hash rate, that keeps the blockchain network running.

This is the only way that someone could tamper with the data stored on the ledger and undo the miners’ work on previous transactions. This is possible only on relatively new blockchains, as they would have less mining power than the Bitcoin blockchain for example, whose current hash rate is 110 EH/s!

For more cool blockchain insights, check out our page on Blockchain Statistics.

About The Author

James Page

James Headshot

James is the main editor. With a passion for finance and anything blockchain, cryptocurrency is right up his alley. He's responsible for most of the content on the site, trying his best to keep everything up to date and as informative as possible.

Disclaimer: Digital currencies and cryptocurrencies are volatile and can involve a lot of risk. Their prices and performance is very unpredictable and past performance is no guarantee of future performance. Consult a financial advisor or obtain your own advice independent of this site before relying and acting on the information provided.

Our most recommended Cryptocurrency Exchange

Binance LogoVisit The Site