Headline: What is the double spending problem with cryptocurrency?

Date: 10/14/2022

Body:  I have read more than a couple of articles about cryptocurrency, and I keep running into something called the “double-spending problem” with cryptocurrency.  I don’t fully understand this, and I would imagine that I am not the only one confused.   So, let’s dig in.

“Double spending” is the proper economics-speak for what is being attempted, but I would like you to think of another word you are more comfortable with, counterfeit.    Let’s say that you put together a press in your basement and have the correct paper and inks necessary to print money.  But, at heart, what you have is a photocopier.  Once you have run  a good number of $100 bills, you notice that they look VERY real, but, all of the serial numbers are identical.  So, once you spend the first one, the chances for you to get caught go up appreciably, as the Secret Service will clearly be looking for bills with that serial number.  Spend the same dollar multiple times and you are risking prison.  Bitcoin and other cryptocurrencies do not have serial numbers( or fiat currency that you turn over to a person in return for a good or service) , so, there is a risk of double-spending, and the process must have a functionality to prevent this.  Enter the blockchain.

In this ecosystem, the miners make sure that the transactions come from a sufficient source, go to the right wallet and do this by a consensus system, but the vast majority of the reward goes to the miner who verifies the transaction first.  The key here, is two-fold:

  1. Multiple miners who don’t know about the identities of the other miners, verify the transactions independently.  The block of transactions is only added when all details have been confirmed.
  2. The ledger behind this process is “distributed” and simultaneously held by millions of people.  Hacking is deemed almost impossible.
  3. Once recorded on the blockchain, the transaction is immutable, and cannot be erased.

In this way, no  central Bank is necessary, and the decentralized system can work its magic.

Well, this is neat, but how is double-spending avoided?

Let’s have some fun here and take the worst case scenario.   Let’s say that you have 1,000 BTC.  You spend it once on a house, then you buy a 2nd house with the same 1,000 coins.  As they come into the system, both transactions are placed into a suspense file until they can be verified, usually within 10 minutes.  So, the result will be verification of the first transaction and rejection of the second.  It is a fairly well-known guideline that many merchants wait for 6 confirmations of one transaction.

OK, good, but what exactly do these miners do?

This is referred to as the consensus model.  There are several of them.   The first used by Bitcoin was the Proof of work.  This is effectively an extremely complicated math problem.   The miner is given a hash function involving original data.  Once solved, a hash total of the same length will result (and the details of the transaction are confirmed), and the miner will receive a reward in Bitcoin.  Because they are not economically punished for incorrect guesses, people can set up impressive “rigs” to send out a huge long series of hash totals, guessing until they get the right hash total to evaluate the function.  Once a correct answer is obtained by 6 miners, this answer that solves the hash is transmitted to the entire network.  This process makes counterfeiting nearly impossible.

“Nearly impossible?”

OK, there will always be bad actors in any social network, and the blockchain is no exception.  There are 3 main kind of attacks, but, they are all very haphazardly successful.  They are as follows:

Type of AttackComment
Race attacksIn these attacks, a legitimate transaction is sent through first.   Then, a second transaction(less legitimate) is sent through within the same 10 minute period.  The hope is that the first one being found legit will lead one to assume that the second one is legit too.
Finney  attacksThis is nearly the same as the Race attack, but the attacker is a legitimate miner.  They use a block code for a legit block to code for a less legitimate block.
51% attacksThis is when a group of people control more than 51% of the computing power contributing to the consensus model.   But the bitcoin network is so vast, this kind of attack is virtually impossible.

How concerned should I be?

Don’t’ be.  Like the Hitchhiker’s Guide to the Galaxy, the entry here would be “mostly harmless.”   The bottom line is that if you don’t accept any transactions, that you are not expecting, you won’t be fooled by these techniques.

The Verdict

I work for the U.S. Government and I almost laughed when I first heard of “double spending.”   Then I realized that it was an attempt to defraud.  Fortunately, it turns out that the person who designed this cryptocurrency system had thought of this and made it extremely difficult to execute.   This would tend to make cryptocurrency more secure to invest in.  Just be aware that there is severe price volatility that you have to consider.   Also, it should be borne in mind that bad actors are cobbling together more and more sophisticated rigs, every year.  Bitcoin buyer beware.

REFERENCES

https://www.investopedia.com/ask/answers/061915/how-does-block-chain-prevent-doublespending-bitcoins.asp

https://www.sofi.com/learn/content/double-spending/

https://www.gemini.com/cryptopedia/double-spending-problem-crypto

https://www.coindesk.com/tech/2021/01/21/the-bitcoin-double-spend-that-never-happened/

https://academy.binance.com/en/articles/double-spending-explained

Editor’s Note: Please note that the information contained herein is meant only for general education: This should not be construed as Tax Advice.   Personal attributes could make a material difference in the advice given, so, before taking action, please consult your tax advisor or CPA.

 

Leave a comment

Your email address will not be published. Required fields are marked *

Share via
Copy link
Powered by Social Snap