What is Double-Spending?

Intermediate

4 mins read March 24, 2021

Double-spending is a common issue when it comes to digital currencies. It is a risk that a digital currency can be sent to different recipients and at the same time. Imagine Danielle had 1 BTC but she could copy that 1 BTC and have it sent to Alex and Evans at the same time. That would undermine the efficacy of the entire digital currency system and both Alex and Evans would not be able to verify that the funds they received hadn’t already been spent elsewhere.

Physical currencies do not have this kind of problem because they cannot be easily copied, users in the transaction can immediately verify the authenticity and ownership of the currency. When you buy a pizza at Dominos with cash, the cashier receives the money and you both can confirm that transaction.

It would be impossible for you to spend the money given to the cashier elsewhere unless you stole it. However, in the case of digital currencies, anyone could simply duplicate a transaction and have the funds spent elsewhere.

How does double-spending occur?

Let’s take a look at two case scenarios of double-spending. In the first scenario, Danielle wants to purchase a house from both Alex and Evans. She sends 1 BTC to both of them but since one person's transaction will be verified before the before, only one person gets paid the original currency. The second transaction he's thrown out. In this case, Danielle has sent two people the same digital currency, received the goods but only one person was paid.

The second scenario happens where Danielle makes a false copy of the original token and sends it to either Evans or Alex while keeping the original currency. In both scenarios, the recipient/seller suffers loss as the sender gets to keep the cryptocurrency as well as the seller's goods.

Common forms of double spend

  • 51% Attack
    This is when 51% of the hash power is controlled by a single entity. Hash power refers to the computational power needed to verify transactions. With this much control, a person can reverse a transaction and create copies that appear real. However, this form of attack hasn’t happened because it is extremely costly to control 51% of the network.
  • Race Attack
    A race attack happens when the attacker sends the same coin to two different addresses. In this scenario, what happens is that one of the addresses gets the transaction verified while the other gets the double-spent coin.
  • Finney Attack
    Finney attacks are when a miner does not add a block he has mined to the blockchain but instead spends it on another transaction which then renders the original transaction or payment with that coin invalid.

How can double-spending be prevented?

For physical transactions, both parties are present to verify the dealings of the transactions. In digital money transactions, the recipient doesn’t have to trust the sender. This is because users rely on the currency’s network to verify and ensure that a transaction is legit. This concept which was created by Satoshi is what we now know as the blockchain.

Prior to the creation of Bitcoin, there had been several attempts to create digital money but the major problem was that of double-spending; the fact that a user could simply duplicate money and spend it elsewhere. Bitcoin has been able to combat this issue through the powerful technology of blockchain which is how transactions can be verified, stopping anyone from copying digital money.

Although the bitcoin network is sophisticated and secure, there are people with a high level of understanding of the technology that are capable of manipulating it. So, how does blockchain ensure that transactions are verified and double-spending is prevented?

Let’s take Bitcoin for example. Since its inception in 2009, the cryptocurrency has had time-stamped records of every transaction in chronological order. Every 10 minutes, a block - which is essentially a group of transactions - is added to the blockchain and published to all nodes in the network which ensures the integrity of the system.

Let’s say you want to make a purchase and pay in BTC. You finally send funds to the vendor without knowing that you’re sending a coin that was on the same day and time spent by the hacker. Both transactions go into the pool of unconfirmed transactions and chances are that your transaction gets confirmed first and your purchase goes through or the hacker’s transaction goes through first and your purchase falls through. It all depends on which transaction gets confirmed first. This is why it is advised that you wait for at least 6 confirmations.

In conclusion...

Satoshi’s creation of the blockchain has by a long way solved the problem of double-spending however hackers are still trying various means to get past the verification system. Thankfully these attempts have only had very few success as most cases of theft in digital currency transactions are a result of users not safeguarding their wallets properly.

Disclaimer: This article is meant to provide general guidance and understanding of cryptocurrency and the Blockchain network. It’s not an exhaustive list and should not be taken as financial advice. Yellow Card Academy is not responsible for your investment decisions.

Crypto scoop

Sign up for our weekly newsletter

Stay informed with the latest updates to buy, sell, and store your crypto on the go.

phone

Download the Yellow Card app

Start trading crypto with ease

Get the Yellow Card app to buy, sell, and store your crypto on the go.