Skip to main content

Command Palette

Search for a command to run...

Cryptocurrency - Double spending

Published
2 min read
Cryptocurrency - Double spending

Double spending refers to spending the same money twice. Any transaction can be processed only in two ways, one is offline, and the other is online.

Offline: A transaction which involves physical currency or cash is known as an offline transaction.

Online: A transaction which involves digital cash is known as an online transaction.

Let us consider this example:

You go to Restaurants and order a cappuccino worth $5. You pay in cash. The service provider at Restaurants instantly confirmed that you have paid, and you received your coffee in exchange for the money. Now is it possible to spend the same $5 somewhere else to make another purchase? The answer is NO. But what if the answer is YES? It means the same person can use the same cash more than one time. This type of problem is known as Double Spending Problem.

In a physical currency, the double-spending problem can never arise. However, in digital cash-like bitcoin, a double-spending problem can arise. Hence, bitcoin transactions have a possibility of being copied and rebroadcasted. It opens up the possibility that the same BTC could be spent twice by its owner.

How cryptocurrencies cope-with the Double Spending dilemma?

Bitcoin handles double-spending by implementing a confirmation mechanism and maintaining a universal ledger called blockchain.

Let us suppose you have 1 bitcoin and try to spend it twice.

You sent 1 bitcoin to Alice, again, you sign and send the same 1 bitcoin to Bob. Both transactions go into a pool of unconfirmed transactions where various unconfirmed transactions are stored. Whichever transaction first receives confirmations and is verified by miners, will be considered valid. The transaction which could not get sufficient confirmations will be pulled out of the network. In this example, transaction "T1" is valid, and Alice will receive the bitcoin.

More from this blog

U

Untitled Publication

51 posts