An Intro to the Crazy World of Blockchain
Imagine paying for your morning coffee with a digital currency
Two weeks ago, if someone had asked me to help them make a blockchain, I would think they were asking me to chain together a bunch of Lego blocks to build the Lego Star Wars Death Star, with 5000 pieces. I would never have thought they were asking me to help build a complex piece of software that is aiming to change the way we hold data forever. Hopefully this article will help you understand how it will.
What is Blockchain?
Blockchain is at its core, a decentralized, distributed database of any transaction involving value, for example, currency. Okay, I know that’s sort of hard to understand, so I’ll break it down for you. When I say decentralized, I mean that there is no singular entity that owns the network, and distributed means that the data of the transactions is stored across all the computers in the network. With blockchain, there is also no transaction fee. The most important thing about a blockchain is that there is a direct connection between each computer on the network rather than through a third-party entity.
Ok, but how does that help?
Since the data of the transactions is stored on every computer on the network, it makes it difficult to have the network taken down since taking down one computer won’t cause problems for other computers on the network. The reason we call it a blockchain, is because the computer holds bundles, or blocks of data submitted by others, in a big chain, with each block linking to the last.
One big factor in blockchain is the fact that when data is recorded in a blockchain, it’s like etching it into stone. This means someone like a hacker will have an extremely hard time changing the data. I’ll explain that and how blockchain works later.
Why is Blockchain Better?
If you are wondering why blockchain is better than traditional databases, there are many reasons.
1. Integrity as every user can be sure that the data they receive is unaltered
2. Transparency as every user can view the history of the blockchain and all the information
3. If you want previous data to be immutable (unchangeable), use blockchain. Of course, you can make a new block that changes the state of data, but not change previous recordings of that data
4. Decentralized control which is better than centralized control as anyone with sufficient access to a centralized control database can change it.
How Does Blockchain Work?
Blockchain can be thought of, and basically is, a distributed ledger. I said before that blockchain got its name since it has blocks of data in, well, a chain. Each block on the chain has some data, the hash (which is unique like a fingerprint and helps identify the block), and the hash of the previous block, and the fact we have the hash of the previous block is what chains the blocks together.
If a block is tampered with, the hash changes too, so we can tell if a block has been tampered with, since the following block will find out that the previous block hash differs from its record.
Blockchain also utilizes a proof-of-work system, which simply put means it takes more time for new blocks to be made. Bitcoin takes about 10 minutes to add a new block to the system, and if a hacker tampers with one, they must recalculate the proof-of-work for all following blocks. This helps with security.
There is one last layer of security though. When someone joins the network, they get a new copy of the ledger, which in this case is the blockchain. When a new block is created, each person on the network gets a copy of the block and bitcoin miners verify the block to ensure it hasn’t been messed with, and if everything checks out, each node adds that block to the network. This way, we can agree that a block is valid if more than 50% of the members of the network verify the block.
How do miners verify a block? Well, to simplify it, they basically solve an extremely tough mathematical equation. It’s meant to be hard enough that a computer would take some time to solve it, about 10 minutes. However, once the data is produced, it is simple to verify it. Each block must have a proof of work to be considered valid.
But What’s the Point?
Blockchain is actually very useful. You may already know that we have developed online currencies like Bitcoin using blockchain. But you might ask, we can already pay for coffee with our credit card? Isn’t that digital currency already? Well, it is, but digital files can be copied. This is why we need middlemen, like banks and governments, who verify that a digital token has been spent.
So, when you pay for your coffee, you give the currency to a middleman, and they send it to the coffee shop. But blockchains, decentralized networks, can host digital currency as it keeps track of all the transactions, and everyone has a copy of the ledger.
The only way a hacker could rewrite the ledger is by taking control of more than 50% of the computing power mining on the network, as only then would their block be valid. This eliminates the middleman, and that’s better since the middleman could go offline due to technical difficulties or hacks, could be forced to prevent certain transactions by the government, and mismanage user funds.
Although cryptocurrencies are the biggest use of blockchain so far, there are many others, like smart contracts, smart appliances, in healthcare, certificates (birth, wedding, etc.), passports, and more consumer-based uses like music, gaming, and much more.
The world of blockchain can be a complicated place, but I hope I helped you understand a bit more about how blockchain works. Soon, blockchain will be integrated into many more parts of our lives, and it will make our lives more secure. In the future, you may be signing a contract, sending money to that Nigerian prince that keeps emailing you, or doing some asset management or claims processing, and underneath all of it, you’ll have blockchain to thank.
If you enjoyed reading this article or have any suggestions or questions, let me know by clapping or commenting. You can find me on LinkedIn for my latest work and updates.