ELI5 Blockchain: How would you explain the blockchain to a five-year old?
Explain Blockchain like I'm five
Crypto. NFTs. DeFi.
The blockchain is the mother of these popular buzzwords.
So how would you explain the blockchain to a five-year-old?
A magic book.
Imagine owning a magic book with thousands of copies of the same magic book worldwide.
Only owners with a copy of the magic book can add a page to the magic book, and nobody can erase the content of the magic book.
Transparency and decentralization
Every page added to the magic book appears in all other copies of the book around the world instantly.
Each page has a number. The page number refers to the last page number like a chain, except for the first page—genesis.
But before a new page is added to the magic book, the page must be verified by everyone that has a copy of the magic book.
A new page is added at regular intervals.
Security
Before a new page is added to the magic book, owners must agree collectively.
There are two popular ways of reaching an agreement:
Proof of work (PoW) and proof of stake (PoS).
PoW: We trust this page because it is "carved in stone" and accepted by all book owners. The effort involved in creating this page makes it nearly impossible to tamper with it.
PoS: We trust this page because it was created and approved by people who have a personal stake in confirming this page.
While the ELI5 explanation comes in handy, how does it work underneath?
Let’s take a closer look at a block.
Each block contains data:
• The hash of the block.
• The hash of the previous block.
But the data stored inside a block depends on the type of blockchain. There are four types of blockchain:
• Public blockchains - (Bitcoin, Ethereum, Binance)
• Private blockchains
• Hybrid blockchains
• Consortium blockchains
The focus is on public blockchains. For example, the bitcoin blockchain—a public blockchain— stores the details of transactions, the sender, receiver and amount of coins.
And every block has a hash, and you can think of a hash as a fingerprint.
A hash identifies a block and all its contents. It’s always unique, just like a fingerprint.
Once a block is created, its hash is being calculated. Changing something inside the block will cause the hash to change.
This means hashes are very useful when detecting changes to blocks. So if the fingerprint of a block changes, it’s no longer the same block.
The third element inside each block is the hash of the previous block. This effectively creates a chain of blocks which makes a blockchain so secure.
Here’s an example:
Say we have three blocks in a chain. Each block has its hash and the hash of the previous block.
Block 3 points to block 2. Block 2 points to block1.
Now the first block is unique and it can’t point to previous blocks because it’s the first one—the genesis block.
Say you tamper with the second block; it means you changed its hash.
Which makes block three and all following blocks invalid because they no longer have a correct hash of the previous block.
So changing a single block makes all following blocks invalid.
But are correct hashes enough to prevent tampering? Well, not really.
Security
To avoid tampering with data, all the members of a blockchain network must collectively agree on the validity of a block either through:
Proof-of-work (PoW).
Proof-of-stake (PoS)
PoW is a consensus mechanism that requires members of a network (miners) to solve a mathematical puzzle.
PoS is a consensus mechanism that selects members of a network (validators) to confirm a transaction according to the quantity of their cryptocurrency at stake.
Think of PoW as - “I trust this record because it was "carved in stone" and accepted by the community. The effort involved in crafting it makes it nearly impossible to tamper with it”.
While PoS as - “I trust this record because it was created and signed by people who have a personal stake in confirming it”.
In Bitcoin’s case, it takes about 10 minutes to calculate the required proof-of-work and add a new block to the chain.
Although it slows the creation of new blocks, it also prevents anyone from gaming the system.
Because if you tamper with one block, you’ll need to recalculate mathematical puzzles for all the following blocks.
So the security of a blockchain like Bitcoin comes from its creative use of hashing and the proof-of-work mechanism.
Decentralization
But there is one more way that blockchains secure themselves, and that’s by being distributed.
Instead of using a central entity to manage the chain, blockchains use a peer-to-peer network, allowing anyone to join.
When someone joins the network, he gets the full copy of the blockchain network.
A blockchain network consists of nodes that verify that everything is still in order, and a protocol governs how the network functions.
A node is a physical, electronic device connected to a network.
All the nodes in a network agree about what blocks are valid and which aren’t.
Protocols govern the transmission of data from one node to another.
For instance, the Bitcoin protocol showed that digital money could be exchanged safely on the internet.
Transparency
But what happens when someone creates a new block?
That new block is sent to everyone on the network.
Then each node verifies the block to ensure it hasn’t been tampered with.
If everything checks out, each node adds this block to its copy of the blockchain.
However, Blocks that are tampered with will be rejected by other nodes in the network.
To successfully tamper with a blockchain, you’ll need to:
• Tamper with all blocks on the chain
• Redo the proof-of-work for each block
• Take control of more than 50% of the peer-to-peer network.
Only then will your tampered block become accepted by everyone else, which is practically impossible to do!
Blockchains are also constantly evolving.
Soon, blockchain technology will be used for other things like:
• Recording votes.
• Recording taxes.
• Storing medical records.
• Managing details across horizontal supply chains.
Now you know what a blockchain is, how it works on a basic level and what problems it solves.
To bring it all together:
A blockchain is a distributed database that contains shared memories.
The blockchain is like a magic book.
Copies of the magic book are nodes.
Page numbers are like hashes.
New pages are blocks.
I hope you enjoyed this piece! If you found it useful, please share it with others in your network who would find value in it.
If you’re feeling generous, you can also share the thread of this post on Twitter here.
Until next time,
Offiong.