What problems does Bitcoin solve?
Tags: bitcoin, blockchain, mining
Published: 2022-12-23 15:05:14

Something I learned along the way in an ever-changing field of web development, where you have a new JavaScript Framework every other week, is that in a sea of free resources, it doesn’t matter how many tools you have if you don’t know how to use them, they will never be enough. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a08yf9b08c7zzfdpc1n6.jpg)
When the problem is not well understood, “fancy solutions” only create other new problems, these new problems only end up deviating you away from what you intended to do in the first place. This is why I think it’s a good idea to approach a new technology like Bitcoin through the lenses of the problem it was made to solve. To filter out the signal from all the noise. 

So in today’s lesson we will take a look at 
1 ) Why Bitcoin was created
2) What technical problems Bitcoin had to solve
3) The drawbacks of this type of solution
Why Bitcoin was created?
As you may know, Bitcoin is a decentralized digital currency that allows users to make transactions directly with one another, without the need for a central authority like a bank. But did you know that Bitcoin was actually created in response to a major economic crisis?
In 2008, the global economy was hit by a financial crisis that was caused by the collapse of the housing market in the United States. This crisis, known as the Great Recession, had a ripple effect on the rest of the world, leading to high levels of unemployment, bankruptcy, and overall economic instability.

One of the key factors that contributed to the crisis was the fact that many banks and financial institutions had engaged in irresponsibly risky lending practices, so when the housing market crashed, these institutions were left with large amounts of bad debt. This led to a credit freeze, where banks were unwilling to lend money to individuals and businesses, which further exacerbated the economic downturn. Right now, you might be thinking. Pff serves them right for gambling, how does that affect me? Let them go bankrupt. 

The politicians decided to bail out the banks during the 2008 financial crisis because they believed that it was necessary to prevent a complete collapse of the financial system. The banks were considered "too big to fail," meaning that their failure would have had catastrophic consequences for the economy as a whole.
The bailouts were controversial at the time, and remain so to this day. Another option would have been for the government to allow some of the banks to fail and be taken over by healthier institutions, in order to allow the market to correct itself, but no, they just printed away all that debt diluting the value of the US Dollar. 
 



Inflation can be seen as a form of modern slavery in some ways because it can erode the purchasing power of people's wages and savings over time. When the prices of goods and services rise due to inflation, it means that the same amount of money will buy less than it did previously. This can make it difficult for people to afford the things they need to live, and can leave them feeling financially trapped.
In the midst of all this, a mysterious person or group using the pseudonym "Satoshi Nakamoto" published a white paper detailing a new kind of digital currency called Bitcoin. According to Nakamoto, Bitcoin was designed in such a way that it would be resistant to inflation and immune to the kind of financial manipulation and interference that had contributed to the 2008 crisis. 

What technical problems did Bitcoin Solve?
When Satoshi created Bitcoin, he really created two distinctly valuable products that by necessity are joined at the hip: the first ever Blockchain ( a ledger – a record of time-stamped transactions), and the first ever cryptocurrency (a digital currency made with the use of encryption technologies to function both as a currency and as a virtual accounting system).
If the blockchain was created to get rid of the necessity of trusting a middleman & the problem of them abusing that power, then bitcoin was created to solve the blockchain’s incentive problem. Without a middle man to pay for all the bills of keeping a network up and running, the network needs to be self suficient. 
To achieve this Satoshi and his early collaborators had to solve two specific technical issues. The Byzantines general problem, and the Double spend problem. Let’s dive into each problem and how it was solved. 

1 ) The Byzantine Generals problem
Is a thought experiment that illustrates the challenges of achieving consensus in a distributed network? By consensus I mean how multiple computers agree on what is true. 


If you have seen the movie brave heart, with actor Mel Gibson plays William Wallace, a medieval Scottish patriot who is spurred into revolt against the English when the love of his life is slaughtered. In that movie,
There is a specific scene where there is a great battle with the potential to end it all and where Scotland not only could have regained the land they lost but also bring down one of the biggest armies of that time, just by winning this one single battle. but it would only work if all 3 bands united and attacked at the same time.
Long story short, the Scottish army who had beforehand agreed to unite, ends up betraying Wallace in the middle of the battle they walk out on him, and the rebels loose. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4m3el98o19oyptynrd4k.gif)

This is the Byzantines general’s problem, in a nutshell. How can you be sure all 3 bands come to an agreement and none of them have colluded against you before you make a decision that could very well cost you your life? This is at its core a trust problem. 

The 2008 financial crisis caused huge and lasting damage to a lot of people’s trust in the banking system. People trusted banks to do responsible, safe, socially productive things, and it turned out they were doing incompetent checking in the name of profit that caused an economic crisis.
Bitcoin solves the Byzantine Generals Problem by being distributed: The computer’s data aren’t kept on any one particular machine but spread out among lots of computers. Using a Proof-of-Work consensus algorithm it syncs up all of these machines. By consensus I mean the method a network of computers use to know what is true. In place of a trusted third party, Nakamoto used a chain of cryptographically-signed transactions secured by proof-of-work to order and validate payments. And thus, the blockchain was born.
 
What is proof of work?
In Bitcoin, proof of work is a mechanism that is used to secure the network and ensure that consensus is reached on the state of the blockchain. It is the process by which transactions are validated and new blocks are added to the blockchain.
Proof of work involves miners, who are individuals or groups of individuals that use specialized computers to solve complex mathematical problems. These problems are designed to be difficult to solve, but easy to verify once a solution has been found.


When a miner solves one of these problems, they are able to create a new block and add it to the blockchain. This process is called mining. In order to create a new block, the miner must include a list of all the transactions that have occurred on the network since the last block was added, as well as a reference to the previous block in the chain.
Proof of work not only make the network self-sustainable but it also creates the needed transparency to eliminate the need for a trusted third party that could willingly or unwillingly reverse transactions or in the case of William Wallace’s battle, change their minds all of a sudden & betray him. If only William Wallace had Bitcoin back then, maybe he could have conquered England. 

2) Double spend problem
Now going back to the cryptocurrency called Bitcoin, that enables the network to be self-sustainable. This is a digital coin, issued by the network, and you can only get this coin by mining it (ponying up your computers resources, electricity and internet bandwidth) or buying it from another person. 
Digital money had been thought up for a lot of years but it was difficult to implement, in a world where you can simply copy and paste stuff, costless duplication is not a desirable trait you want in money.
The Double Spend Problem describes the difficulty of ensuring digital money is not easily duplicated.

When money is physical, the Double Spend Problem is of no concern. The same physical bill or coin cannot be in two places at once. The Double Spend Problem only occurs in digital systems, where the same file or data can be present in two places at once. Trusted third parties such as banks prevent double spends by privately verifying each transaction. They make sure you don’t spend the same dollar twice, but we don’t want middle man so how can we check this?
Bitcoin solves the double spend problem by using a decentralized ledger, which all users can access. Because all members of the Bitcoin network can examine the full history of transactions, they can be sure that neither their coins nor any other coins have been double spent. When one user sends bitcoin to another, they destroy the coin they own and create a new coin owned by the receiver. The destruction of the sender’s coin is recorded for all to see, so that they can never send it to someone else.

Imagine that you have 1 BTC and you attempt to spend it twice in two separate transactions. You could attempt to do this by sending the same BTC to two separate bitcoin wallet addresses. Both of these transactions will then go into the pool of unconfirmed transactions. The first transaction would be approved via the confirmation mechanism and then verified into the subsequent block. However, the second transaction would be recognized as invalid by the confirmation process and would not be verified. If both transactions are pulled from the pool for confirmation simultaneously, the transaction with the highest number of confirmations will be included in the blockchain, while the other one will be discarded.
While this effectively deals with the issue of double spending, it is not without its issues.  
For example, the intended recipient of the second (failed) transaction would not have part in the transaction itself failing, and yet that person would not receive the bitcoin they had anticipated. Many merchants wait for at least 6 confirmations of a transaction (meaning that six subsequent blocks of transactions were added to the blockchain after the transaction in question). At this point, the merchant can safely assume that the transaction is valid but he can never be 100% sure, just as time goes by he is more confident but this system does not have an absolute finality. I guess Satoshi was a Fan of Star Wars
(only Sith deal in absolutes) 
The problem with Proof of work?
Blockchain is basically a trust machine, it helps you trade with people you do not trust. That trust is made possible by duplicating and verifying the information across multiple computers in a network, for this reason alone, many original blockchains can’t process more transactions than a single computer in the network can handle.
As of this date, Bitcoin was unable to handle more than about seven transactions per second and Ethereum, the second-most popular crypto network, was limited to about 15 per second. 
In contrast Visa what we currently use for credit cards worldwide, handles around 20k transactions per second. 
VisaNet, the card network's payment processing system, handles an average of 150 million transactions per day and the firm claims it is capable of processing more than 24,000 Visa transactions per second.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kpqpv5zo405b8v3tkrol.gif)

Imagine an Internet service provider, that gets slower and more expensive the more you use it, its insane, it should be the total opposite. Technology innovation is all about speed and making things cheaper at scale. No one in their right mind would pay for internet that gets laggier and more costly by the minute, why would you do the same for Bitcoin?

This wasn’t a problem back when crypto was a niche technology used by a core of enthusiasts. Now that traditional finance and other mainstream industries are turning to blockchains as a hedge against inflation, and a trusted environment for exchange and collaboration, these limitations are crippling to say the least.
Did anyone see this coming?

Yes. Computer scientist Hal Finney, who received the very first Bitcoin transaction from the token’s pseudonymous founder Satoshi Nakamoto, flagged early on that blockchains in their original design can’t scale on their own. He proposed adding a simpler, more efficient secondary system on top of the main blockchain. “Bitcoin itself cannot scale to have every single financial transaction in the world be broadcast to everyone and included in the block chain,” Finney wrote in a forum back in 2010.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oqq25jcsyvk3370osdot.jpg)
Later Ethereum co-founder Vitalik Buterin coined the term “Blockchain trilemma” in 2017, laying out the trade-offs required to achieve “scalability.”
Because expanding a blockchain beyond a certain point inevitably compromises two of its fundamental characteristics: its decentralized structure, which confers the transparency and user trust for it to function independently of third parties and governments, and its security (protecting the data from hackers). In short, you can have “scalability,” and decentralization or “scalability” and security, but you cannot have all three at the same time. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/la857f8pg93yb2h7j4kv.jpg)
Is there a solution?

There have been several innovations to improve the performance of blockchains, but a closer look shows that they all water down decentralization or security for the sake of scalability. Here are some approaches: 

• Bigger blocks: a blockchain is altered to bundle transactions into larger packets before they are validated and added to the network, improving its performance. This can be achieved by splitting a new blockchain off from the original one in a process known as “forking.” Bitcoin Cash is among the most prominent of these offshoots.

• New layers: A protocol built on top of an existing blockchain that can manage transactions independently -- something more akin to what Finney was suggesting. Some examples of these so-called “Layer-2” protocols are Ethereum’s Polygon and Bitcoin’s Lightning Network

• Sharding: Splitting chunks of data into smaller parts to spread the computational and storage workload across the network. The information in one shard can still be shared, helping to keep the network relatively decentralized and secure.

Conclusion
So, we saw why Bitcoin was created, the problem it tried to solve and the technical challenges it had to overcome. We also saw that Bitcoins proof of work is a double ended sword that makes BTC incredibly resilient but at a cost of speed. I hope this video helps you explain to others what Bitcoin is for and see its limitations.