Everyone has heard the word ‘Bitcoin’ by now. It is the most famous cryptocurrency that has ever been in the market. Historically, it was the first use of blockchain technology, to create monetary value on a digital platform.
There are no physical banknotes or coins for the currency. So, how did this come to be and how does it work?
We will talk about blockchain and how it brought the currency to life. This is just an introduction to familiarize you with the concept of a ledger, blockchain and a little about bitcoin. How do they all relate?
Now that we know how blockchain technology works and how the distributed ledger works, it will be easy to understand how bitcoin works.
The Three Essentials of a Block in a Chain
To make you understand this further, we will look at the three parts that make a blockchain what it is.
- The blocks store information which contains transaction details like date time and dollar amount of the purchases you make.
- The blocks store information about who is taking part in these transactions. They do not record any personal information. However, they will record the unique digital signature (kind of like a username) that you assigned yourself.
- We design the blockchains to store information which distinguishes one block from the others. Each of these blocks has a unique code called the ‘hash’. This hash allows us to differentiate them.
In our example, we have made it seem like one block record one transaction. However, that is not exactly accurate. Each of the blocks can store up to 1MB of data. Mathematically, a single block can store thousands of transactions.
Privacy in a Blockchain
Anyone can see the contents of the blockchain. Users have the option of connecting their computers to the blockchain network. When a user does that, they receive a copy of the blockchain. This copy will get an update anytime it adds a new block.
Think of the update like a news feed on Facebook when a new status gets posted
Every computer in the blockchain network has a copy of the ledger, so there are thousands or millions (like in Bitcoin) of the blockchain’s ledger copies. Even though each of these is identical, spreading them out in the network makes it harder to manipulate them.
Even though it is easy to access these copies and see what is on them, the user data is protected by:
- That no single person can change the contents
When you look at the Bitcoin blockchain, you notice that you do not have access to identifying information about the people who are making the transactions. Even though the transactions are not entirely anonymous, personal information is very limited to just two things:
- The digital signature
- The username
Tracking down anyone with just this limited information is near impossible.
The way this works, raises another serious question: if you cannot know the person adding blocks to the blockchain, how can you trust the network or the computers that keep it running?
Is the Blockchain Secure?
Security and trust are an issue that the blockchain takes care of in several methods.
- First, the new blocks are all stored linearly and in chronological order. That means they add any new block to the ‘end’ of the blockchain. One look at the bitcoin blockchain will show you that each of these blocks has a position on the chain we call a ‘height’. At the time of writing this, the height is around 603,105.
- After it adds each block to the blockchain, it is very hard to go back and change the contents of the transaction. The hash allows this to happen. It creates the hash points using a math function that transforms digital information into strings of numbers and letters. If we edit the information, the hash code will change.
The Hash Codes
Here is how that helps with security: Let’s assume some hacker tries to edit the transaction in a way that forces you to pay twice for the same purchase. As soon as they change the amount of money you have to pay, the hash of that block changes.
The next block in the chain will have the old hash and the hacker will need to change that too. This change will change the next block’s hash and so on for an entire chain with thousands or millions of blocks.
This is difficult because the hacker would need to recalculate all the hashes. The computing power needed to make the calculations and the hacking possible is too great for any hacker to access.
Once a block is added to the chain, it becomes impossible to edit or delete.
Vetting New Computers
In taking care of the trust issues people have with new computers joining the network, most networks have implemented tests for computers that want to join and add blocks. These tests are called ‘consensus models’ and they require user proof.
In Bitcoin, they use the ‘proof of work’ system. This is where computers have to solve a complex math problem. If they can solve the problem, we think of them as having done ‘work’.
After the solution, they become eligible for the chain. Adding blocks to the chain is difficult. There is a technical term for it (mining).
Mining is Difficult
The odds of a computer having the ability to solve one of these problems were about 1 in 5.8 trillion in February 2019. With odds like that, the computers must run programs that cost significant amounts of power and energy (that means you fork over a lot of money for that kind of juice).
Proof of work is not a perfect system for making hacking impossible. However, it makes hacking useless.
To hack the system, a person would need to have a coordinated plan of attack that would require the power that can solve a math problem at 1 in 5.8 trillion odds like everyone else. The cost is higher than the benefits.
Blockchain and Bitcoin
Blockchain’s goal has always been to allow recording of digital information that is distributable but immutable. Without seeing the tech in action, it becomes hard to visualize it.
In 1991, Stuart Haber and W. Scott Stornetta researched on a system that could give documents timestamps that no one could tamper with, once they were assigned. It would be two decades later before the first real-world application hit the market.
The Bitcoin protocol is built on the Blockchain.
Here is how it works:
- There are people all over the world who have Bitcoin. According to a 2019 study by the Cambridge Center for Alternative Finance, the number was as high as 5.9 million people.
- Let’s assume that one of these people wants to spend the money buying food. That is where blockchain comes into the picture.
Printed money falls under regulation by a central authority (Central Banks and Governments). Bitcoin is not controlled by anyone. All transactions are verified by the network of computers instead of one person or body.
- So, the person who wants to buy food goes ahead and pays another person for the food using Bitcoin. The computers on the network rush to verify the transaction.
- To do this, the users run a program on the computers that try to solve a complex math problem as a cohesive unit, each contributing computing power and energy.
- The complex math problem is the one we call a ‘hash’. Once the hash is solved, we deem the transaction verified.
NOTE: The reason one person trying to hack this would fail, is computer power.
- The transaction is then publicly recorded and stored in a block and it is impossible to change the entry.
NOTE: In Bitcoin and other cryptocurrencies, it rewards the computers that took part in verifying the transaction for their work with cryptocurrency portions. We will get into this later.
As you will learn in the following topics, there is a lot to learn but now that you have understood the basics, it should be easy.