What is the double spending problem? How does Bitcoin solve the double spending problem?
Double spending simply means spending the same money twice. For example, you enter a coffee shop, took some sips of Espresso. Now, you take a 10 $ bill and pay for it. That 10$ bill cannot be simply be paid twice, as the ‘real’ 10$ bill has been handover from you to the waiter. You paid it and it’s gone from you unless you steal from him/her(which have a minimum change of happening and of course other severe consequences !).
By all means, that 10 $ note is gone from you and you have been given a cup of coffee in exchange(a true barter system, right !). Once you give that bill, the payment was instantly made and verified by the waiter.
But, unlike our traditional transaction method, the cryptocurrencies like bitcoin, there is no human involved for the confirmation and verification of the payment you just made. So, it can lead to a double spending problem. Since the digital information can be easily reproduced, the same currency can be copied resulting in double spending problem as there is no actual being to confirm the payment.
The main feature of the Satoshi’s paper(Satoshi Nakamoto: An anonymous individual who pioneered the Bitcoin through his bitcoin white paper) was its unique solution to prevent the double spending problem by introducing a universal ledger system known as the blockchain.
Every single transaction made in bitcoin is included in the shared ledger or blockchain. These transactional blocks are stored in this ledger in an orderly fashion with time-stamp attached to each of these little transactions. That’s why it is known as the blockchain.
The blockchain gets longer and longer over time where more and more transaction records are added. The blockchain is maintained by the network of nodes that use the bitcoin software. Since the process of adding the transaction records to the blockchain required intense computation and algorithms, it takes a certain amount of time to verify it. When a transaction block is added to this public ledger known as the blockchain, all the nodes on the blockchain network keep the copy of the global ledger or blockchain. This entire process requires an intense amount of computational power. It’s really difficult to hack into the system as its complexity increases each seconds.No one can manage such expense of hardware and electricity cost single-handedly just to hack a single bitcoin from the blockchain unless you have control over more than 50% of the hash power of the blockchain network.