Blockchain – explain it like I’m five

It seems like everyone is writing about blockchain these days. Bitcoin – the cryptocurrency – is sometimes described as being based on blockchain technology. Blockchain is on covers of magazines (do those still exist?) and lauded as the next big thing.

I figure I’d dig a little bit deeper into what blockchain is, and write it up in a series of posts.

Blockchain is sometimes described as a distributed ledger or distributed database.

To begin with, I’ll start with a short ELI5 on blockchain.

Like they say, you don’t understand something until you can explain it to a child. So let me try to explain blockchain as if I am explaining it to a five year old.

As an example, I’ll use a couple of kids trading toys.

Say Adam is a kid who just had his birthday and got a bunch of toy cars from his grandma.

The problem is, Adam doesn’t care for toy cars and what he really wanted was a Lego Minecraft set. Julie down the street got two Minecraft Lego sets for Christmas and she’s smug about it as only a five year old can be.

Adam is keen on trading a few of his toy cars for a Minecraft Lego set. He asks Julie to trade, but she will have none of it. You see – Julie doesn’t care for toy cars one bit. What she would really like is a troll doll – of all things.

And here we have a problem. Adam wants to trade with Julie, but he doesn’t have anything that Julie wants. Adam knows Julie wants a troll doll but he doesn’t  have any.

Distributed ledger

Adam – being a very convincing person – talks to Julie and promises he will find a way to give her a couple of troll dolls if she will give him one of her Minecraft Lego sets. Julie however is no dummy. She agrees to give Adam one of her Minecraft sets only if Adam writes on a piece of paper that he promises to give her two troll dolls in return at a later date.

Adam agrees, takes a piece of paper and writes:

#1 - 26/Sep/2017 - Julie gave Adam a Minecraft Lego set - {Julie}
#2 - 26/Sep/2017 - Adam owes Julie two troll dolls - {Adam}

Both Adam and Julie sign their names at the end of each note. Adam also makes a copy of everything for himself because he doesn’t trust Julie – after all she might change what he wrote later and claim he owes here more than two troll dolls.

Now both Adam and Julie have a copy of Adam’s promise written on a piece of paper. Julie hands over a Minecraft set and Adam happily goes home.

The notes Adam and Julie wrote down are called transactions. The list of those transactions is called a ledger. This ledger is distributed between Adam and Julie, since they both have a copy of the ledger.

Blocks in a chain

After a few days, Julie learns at the playground that Jake’s sister went to college and left all her old toys to Jake. Among those is a bunch of troll dolls from the 90’s! However, Jake is only interested in toy cars and Julie has none of those.

But wait, Julie does have a promise from Adam that he will give her two troll dolls for the Minecraft set she gave him. What if she could convince Jake to give her two troll dolls instead of Adam – and have Adam owe Jake two toy cars instead?

It takes a while for Julie to explain the scheme to Jake, show him the promise note from Adam and get him to agree. After all, five year olds only trust things they can touch, and these promises on pieces of paper seem a bit high risk.

However, after some convincing Jake agrees to participate (Julie explained that Adam has a few cars that change colors based on temperature) and Julie writes down that she gives permission for Adam to owe Jake instead of her.

Julie now has a ledger with the old promise from Adam and a new one to Jake:

#1 - 26/Sep/2017 - Julie gave Adam a Minecraft Lego set
#2 - 26/Sep/2017 - Adam promises Julie two troll dolls
#3 - 28/Sep/2017 - Jake gives Julie two troll dolls
#4 - 28/Sep/2017 - Julie gives Jake the promise at #2

Julie makes a copy of her ledger and gives it to Jake – so they are both certain they won’t cheat later by changing anything.

Since everyone knows a toy car is worth one troll doll, Jake is confident that Adam will be happy to give him two toy cars instead of giving Julie two troll dolls.

Jake strolls over to Adam, shows him the ledger and asks for two toy cars instead of two troll dolls Adam originally owed Julie. Adam is more than happy to settle his debt, and since he had no troll dolls to begin with he is more than happy to give two toy cars (one of them a car that changes color when cold or hot) to Jake.

Jake also wants everything written down. Adam has an outdated ledger so he first copies the missing transactions to his ledger and then writes down the new transactions. Once he is done copying he realizes there is not enough space on his page, so he turns a new page and writes down the new transaction.

Now the ledger has multiple pages or blocks. Each page or block is numbered. These blocks are connected or chained together by having one block reference the number of the previous block.

Now both Adam and Jake have two pages or blocks in their ledgers:

#1 - 26/Sep/2017 - Julie gave Adam a Minecraft Lego set
#2 - 26/Sep/2017 - Adam promises Julie two troll dolls
#3 - 28/Sep/2017 - Jake gave Julie two troll dolls
#4 - 28/Sep/2017 - Julie gave Jake the promise at #2

Block #1
#5 - 29/Sep/2017 - Adam gave Jake two toy cars

Block: #2
Previous Block: #1

Blockchain gets its name from the chained blocks of transactions.

Just as Adam is writing down his transaction with Jake he realizes there’s a problem. What if Jake goes to someone else with his old ledger that doesn’t show Adam settled his debt with Jake? It seems Jake could double-spend or even multi-spend what he is owed by Adam, simply by running around to other kids before they all realize the trick when they go to Adam to collect their toy cars.

I’ll write about this double spending problem in the next post which will explain how blockchain protocols use consensus to ensure trust amongst participants.

Update: Here is part 2!

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply