People will always look for ways to cheat the system. This has never changed and it is doubtful that it ever will. That is why exceptional security and scrutiny systems are put in place.
Throughout time the act of counterfeiting money has been a prominent exploit of fiat cash. Even in contemporary Western countries where fiat currency is intricately crafted so as to prevent this, people still find ways of faking it. Technologies such as counterfeit money detectors offer a way of stopping this problem in its tracks, but these aren’t enough either. Cryptocurrency and blockchain technology may provide the best system to turn counterfeiting money into a thing of the past, but this does come with its own problem which goes by the name of double spending.
What is double spending?
Double spending is the act of using the same set of coins to make two transactions. Say for instance you had 1 BTC and you wanted to buy both a camera and a computer. Each product costs 1 BTC so you don’t have the finances to buy both, but through an elaborate technique aimed at cheating the blockchain, you can spend your 1 BTC twice, therefore allowing you to buy both products despite not having the sufficient funds.
Double spending is occasionally compared to with counterfeiting fiat because it is essentially a means of creating fake coins. Double spending is not possible in every cryptocurrency but it is for most. It is still a rampant issue which is spreading fast.
What is the solution?
There are several solutions which can and are implemented across numerous coins to prevent double spending. Multiple solutions are needed because there are multiple different ways of double spending, and not every coin works in the same way as others. For instance, IOTA cannot use the same methods of preventing double spending as others because it doesn’t even have its own blockchain (it uses Tangle technology instead). With that being said, almost every solution revolves around checking to make sure that every transaction is both real and possible.
How does Bitcoin prevent double spending?
Bitcoin’s blockchain technology itself attempts to prevent double spending, and for the most part this works well, but it doesn’t stop all attacks. The blockchain itself is useful for stopping double spends because by its very nature it is a public document of all transactions which are fulfilled with an accurate time-stamp attached to them. The time-stamp is important because without it the blockchain could not be chronological, which would make double-spending easier to do as it revolves around having transactions cheat the chronology of the blockchain. This can happen when somebody decides to make one transaction with a low priority fee (a low transaction fee) and then subsequently makes another transaction with the same money but with a high priority fee (a high transaction fee). The low priority transaction will take longer to be fulfilled, but it won’t take too long for the receiver to initially learn about its existence. The high priority transaction will get fulfilled extremely fast (sometimes near instantly). If the receiver who gets notified about the low priority transaction and decides to accept it even before it is fulfilled then they may fall victim to a type of double spend known as a Race Attack. The sender can take advantages of the receiver who accepts early by not actually sending the money and instead using it for the high priority transaction. The high priority transaction reaches the blockchain first and is therefore signed and accepted first, but the low priority transaction is still visible so the receiver may choose to accept it themselves.
The best way for a vendor or receiver to protect themselves against double spending is to only accept Bitcoin transactions when they have reached six confirmations, and absolutely never to accept a transaction with zero. A confirmation represents the number of blocks which have been placed on the blockchain related to the transaction. Six confirmations (or six blocks on the chain) are considered to be the minimum amount of confirmations needed to be confident that double spending is not going to happen. Zero confirmations means that there are no relevant blocks currently on the chain.
When it comes to Bitcoin, make sure to only accept a transaction if it has six or more confirmations. Any less than that and double spending becomes a possibility. It is also worth finding out how many confirmations are needed for any other cryptocurrency you use to prevent double spending, as some currencies do not require the same amount. Vitalik Buterin, co-founder of Ethereum , suggests that 12 confirmations are needed for ETH, Dash (DASH) requires 100 confirmations.