Introduction to the Blockchain
Blockchain Technology didn't just pop up overnight. So how did we get here?
Decentralization and Distributed Ledgers
Components of a Block
Coming Soon: Mining and Consensus
Coming Soon: Blockchains vs. Cryptocurrency
Coming Soon: How is Ethereum Different than Bitcoin?
Coming Soon: Scaling and Goverance
Coming Soon: Private Blockchains
The Double Spend Problem
While Bitcoin solved the Byzantine General’s problem, there were still issues that had to be addressed in order to ensure the security of a decentralized network. We’ll explore some of these vulnerabilities and how blockchains protect against these various methods of attacks.
Double spending is when a person spends the same currency for two or more transactions. Before the problem was addressed, duplicating digital currencies is as simple as copy and pasting.
For example, let’s imagine that Alice has only one coin and yet she owes both Bob and Charlie one coin each. Alice can attempt to pay both of them using the same coin. She can take her coin, cryptographically sign it to prove that it is hers and then send it along to Bob. However, she can them take that same string of data that represents her coin, sign it again and send it along to Charlie. She is double spending the same coin. It’s not hard to see how this leads very quickly to massive inflation that would destroy the currency.
Prior to the invention of Bitcoin, this was a major problem because it eliminates the scarcity of digital currencies, which is an essential feature for any currency to be viable. If each unit of currency can be spent an infinite amount of times, then each unit would have no real value.
The Bitcoin blockchain solved double spending by implementing a consensus mechanism that checks transactions against each other to make sure that the same bitcoin isn’t being spent twice. If someone attempts to spend the same cryptocurrency, both transactions are sent to a pool of pending transactions that are waiting for miner confirmation. As soon as one of the transactions receives a sufficient amount of confirmations, the second transaction will be voided, as it will not be able to receive the required confirmations; the miners will deem this transaction as invalid and it won’t be added to the chain.
“The risk that a digital currency can be spent twice. Double-spending is a potential problem unique to digital currencies because digital information can be reproduced relatively easily. Physical currencies do not have this issue because they cannot be easily replicated, and the parties involved in a transaction can immediately verify the bona fides of the physical currency. With digital currency, there is a risk that the holder could make a copy of the digital token and send it to a merchant or another party while retaining the original. This was a concern initially with Bitcoin, the most popular digital currency or “cryptocurrency,” since it is a decentralized currency with no central agency to verify that it is spent only once. However, Bitcoin has a mechanism based on transaction logs to verify the authenticity of each transaction and prevent double-counting.”