What's so special about blockchain?
Nowadays, a lot of my friends are playing Yu-Gi-Oh again. I don’t play myself but when I watch them play, I get hit with a sense of nostalgia. One card always makes me smile – the Blue Eyes White Dragon.
In the TV show, there were only 3 of these cards in existence (making it one of the rarest). In the real world, it was one of the most common cards in existence. When I traded a friend of mine for this card, there was no need for proof of authenticity at all.
But let’s suppose that there was only one of these in existence. How would you know that I didn’t print 100 of these cards and simply trade you a counterfeit card?
We could use a ledger to track our transaction. But we would need a 3rd party (let’s say Konami) to keep track and ensure that no one can trade duplicated cards. But, we are introducing a middle man! We will have to go through Konami for all transactions. But how can we even really be sure that Konami isn’t tampering with this ledger for its own benefit?
Here’s an earth-shattering idea: How about everyone keeps a copy of the ledger? There are millions of Yu-Gi-Oh enthusiasts in the world and when I receive this rare Blue Eyes White Dragon, everyone gets notified that I have this card.
If all the ledgers say that I only have one copy of the card, everyone can verify that I only have 1 card and my fraudulent trades would be detected by the community. Genius! This process is called decentralization.
But now, how does everyone verify that a transaction or trade is legitimate? Now, things get a tiny bit more complicated. Suppose there are 100 computers (let’s call them nodes going forward) are involved in verifying the legitimacy of transactions. They all have the same copy of the shared ledger and can talk to each other to independently validate every trade in the world.
If I make a trade with you, our trade is place on an unconfirmed batch. After a set period, say 10 minutes, these nodes race to solve cryptographic puzzles so their owners (miners) are rewarded with a batch of new cards (tokens).
Once a block is verified, the node stamps it with an electronic signature (a hash) and announces to the rest of the nodes that the puzzle has been solved. The miner then distributes this new block to the rest of the nodes for them to verify that there are no contradictions and fraudulent activity. This is how nodes arrive at consensus.
But what happens if I try to retroactively tamper with the ledger to show that I have multiple copies of the same card? Remember the hash mentioned earlier? The value of the hash depends on the contents of the block … and all blocks before it. Tampering with the newest block involves changing the hash of all the blocks preceding it. And remember … even if I’ve tampered with my ledger, I must fool everyone else’s ledgers as well!