Blockchain double spending is a term that is common in the blockchain space, most especially in blockchain like the bitcoin blockchain. Like the name says, blockchain double spending is basically a term that is used to refer to when a user spends the same amount of coins twice. In the conventional financial does not have the issue of double spending because it is impossible to double spend the same physical currency since a physical currency cannot be in multiple places at the same time.
In digital currency like cryptocurrency or bitcoin, double spending can be an issue because highly technical bad actors can somehow manipulate their way into spending the same coin twice before they are verified on the blockchain. Also, in double-spending, highly technical bad actors can manipulate the system and send out an identical fake version of the coin they stole from a wallet. This issue mostly occurs on proof of work blockchains like bitcoin where the confirmation time is a bit higher.
To explain how double spending happens, let’s take for instance, bitcoin… bitcoin is basically a digital currency and by digital, it means that there is a possibility of being manipulated and duplicated by highly technical bad actors. This act of spending the same bitcoin twice is known as double spending.
The way double spending happens is that, for instance, person A who is a highly technical bad actor wants to manipulate the system, has just 1BTC and decides to send that 1BTC to person B, the transaction which we will label as transactionA, goes into a pool of unconfirmed transactions. TransactionA will sit in the unconfirmed transactions pool until it is confirmed on the blockchain network.
While transactionA is still in the unconfirmed transactions pool, person A sends 1 BTC to person C. This transaction which we will label as transactionB will also enter into the pool of unconfirmed transactions. With that, it means that person A sent the same 1BTC twice. The transactions in the pool of unconfirmed transactions leave the pool and enters into the blockchain where the validity is checked.
One of the transactions in the pool will leave the pool and be verified before being stored on the blockchain and the other transaction will become invalid and unverified because since one of the 1BTC transactions has already being verified, it means that the second identical 1BTC transaction no longer has the 1BTC for the transaction to go through.
However, there is still a possibility that both transactionA and transactionB can happen simultaneously and both transaction would leave the pool at the same time and shown as a valid transaction. When this happens, there will be two branches of the blockchain with each of the transactions, and a race will kick off. The winner will be determined by the transaction that achieves the next block of confirmation. Until the transactions are confirmed and stored on the blockchain, both transactions can be cancelled, which is why it is important for users to wait for full confirmation rounds before being sure that the transaction is successful. On the bitcoin blockchain, 6 confirmations rounds reduces the risk of cancellation.
How bitcoin handles this problem
Bitcoin handles the double spending problem with the minimum of 6 confirmations. This is why it is important for receivers to wait for atleast a minimum of 6 confirmations before considering the transaction successful because it will only take a minimum of 6th confirmations to have a winner if there is a race between two simultaneous transactions racing for confirmation. By 6 confirmation on the blockchain network, it means that 6 more blocks would have to be added after the transaction was added to the blockchain.
Because 6 more blocks were added after the transaction was added to the blockchain, it means that the transaction is a legit and valid one because blocks that are added to the blockchain has a relationship with the previous block in the chain. This is where irreversibility and immutability comes in because once there are new blocks of transactions added after the previous block of transaction, the previous block is immutable and cannot be reversed. Because of this, anyone can prevent being a victim of double spending just by waiting for the minimum of 6 confirmations on the blockchain.