Solving the Double Spending Problem!

What is the double spending problem? How do we solve this problem in a distributed system?

Happy Friday! Todays newsletter is a technical one. The double spend problem can exist in any economic system, but it is a fundamental aspect of Bitcoin. Bear with it, I’ve added a lot of extra resources that should help understand my writing.

Solving the Double-Spending Problem!

The double-spending problem is a flaw in digital cash systems, in which the same token can be spent more than once.

Digital tokens are tangible, thus infinitely duplicable and falsifiable. This leads to ownership of tokens being unidentifiable unless declared by a chosen authority.

Double spending leads to inflation, and devaluation of currency, such as we see with counterfeit money. Simply supply and demand.

Centralized currencies such as USD, use “trusted” third parties, such as banks, this more often than not leads to a single point of failure.

To avoid using trusted third parties, decentralized currencies use many servers that must store identical up-to-date copies of a public transaction ledger.

As transactions are broadcast, they will arrive at each server at slightly different times.

If two transactions attempt to spend the same token, each server will consider the first transaction to be valid, Once the server disagrees there is no way to determine true balances.

Most decentralized systems solve this problem with consensus algorithms as a way to bring the servers back in sync.

Bitcoin, for example, uses a proof of work consensus mechanism. Where transactions are batched into blocks which are chained together using a linked list of hash pointers, this is a blockchain.

Any server can produce a block, but a computational puzzle must be solved, this is the function of a miner.

The block commits to the entire history of bitcoin transactions, the miner is rewarded in bitcoins as reward.

In this system the double-spending problem can still persist.

To solve this, if two blocks are added at the same time, both will be kept temporarily. As new blocks arrive, the servers must commit to one history of blocks.

Eventually a single chain of transactions will continue, are the other(s) will be considered invalid.

Closing Thoughts:

In decentralized systems a lot of extra mechanisms must exist so it doesn’t have to rely on a third party. In the long run a decentralized cash system can be more reliable, as transactions are immutable, making fraud and corruption costly.

Thanks

Ben - AKA Waldo

Reply

or to participate.