# The Selfie Blockchain

Being assigned the task of developing a lunch-and-learn at work about the blockchain, got me thinking about the best approach to the subject from a non-technical viewpoint. What is the blockchain and how does it work? I thought it’s a bit like those Russian stacking dolls, one block inside the next. But not really. It’s a ledger, but again, that doesn’t tell the whole story. More importantly, it doesn’t involve the audience in any significant way, which might make the material difficult to absorb. I soon realized the best approach would be an interactive one.

That’s when I came up with the most straightforward way in which to describe the blockchain to my audience. Sitting in a large circle, about twenty or so employees gathered and together we built the world’s first Selfie Blockchain. The purpose of this exercise was to show why a decentralized blockchain is hack proof. So, gather your friends around, because we are about to do it again!

Imagine you take a selfie and decide it’s so great that you want to ensure it exists throughout time immemorial. Okay, that might be a little far-fetched. Either way, you choose to keep the image and start a chain of pictures with your friends. You just created, what’s known in the blockchain world as, the genesis block.

You then hand your phone to your best friend who, while holding your phone with your selfie showing within the frame of their camera, takes their selfie. Your friend now has a selfie that contains your selfie. The second block now includes a record, in this case in the form of an image, of the block before it.

In reality, an algorithm generates a one-way hash, a string of numbers, for each block created on the blockchain. The hash cannot be translated back into the original block and is only valuable in that if you create a new hash of the block, it will perfectly match the original hash. Conversely, a new hash made from the edited block will not match the original. Thus, comparing a hash of a block to a previously recorded hash of the same block gives us a clue to the validity of the block.

So, every block in a blockchain contains a hash of the block before it. And that hash also includes the hash stored in the block before it. Huh? Okay, let’s continue with our Selfie Blockchain to make this idea a bit more clear.

Luckily you have many friends. Another friend takes your first friend’s phone, with the selfie that contains your selfie, holds it up to her face and takes a selfie on her phone. Now we have a selfie that includes another selfie that has within it your original selfie. Get the picture? As each friend takes a selfie, the selfie incorporates the selfies that came before it, all the way back down the chain to the genesis block.

Let’s also imagine that your friends are very democratic. All the members of your pool of friends vote on who gets to take the next selfie. A consensus is achieved, and the next selfie becomes part of the chain. Blockchains use a consensus model to ensure honesty and fairness in creating new blocks. We won’t go too deep into this here because consensus could easily be the subject of its own article. Suffice it is to say, our Selfie Blockchain uses a consensus model to close blocks on the chain (take photos).

So, why is it essential that each selfie in our chain contain the selfie-chain photo inside of it? In a word, security. Once again, fire up your imagination, because you are about to meet the hacker in our scenario. You find your phone is missing. Someone has stolen it and has the worst of possible intentions, to replace your original photo — the genesis block — with a picture of themselves.

The first part is relatively straightforward, the hacker takes a picture of herself and edits your genesis photo, replacing you with her image. Now comes the hard part. The hacker has to hack into the next phone down the chain and replace the inner-photo with her new genesis photo. Then the following picture on the chain. And the next. And the next. And —

Well, that doesn’t seem so hard, you think to yourself. But you’re about to learn something essential to our Selfie Blockchain: decentralization. The entire reason for taking selfies is to spread them across the globe. As soon as someone in your friend pool takes a photo, Facebook or Instagram is immediately updated. Not only that, your photos upload to a storage account, Dropbox or iCloud or whatever system you are using on your smartphone. Published to hundreds, and possibly even thousands, of devices worldwide, the hacker must admit defeat.

Remember our consensus model from before? When changing blocks on the Selfie Blockchain, indeed any public blockchain, you need a 51% consensus to agree that the edited chain is the correct chain, the one with valid data. That’s a lot of computers to hack, and you’ve got to do it quick. Unless you have the revenue of a small nation, you’re not going to get anywhere.

There are many other compelling reasons for a decentralized blockchain, but the difficulty in hacking it is at the top of my list.

So, what have we learned? The blockchain (actually there are many) is made up of blocks of information agreed upon by a consensus. Each block holds a representation of the block before it. These blocks are duplicated and distributed over an extensive decentralized network. Your friends take far too many selfies.

Learning about blockchain technology can be intimidating. Computer engineers and programmers like myself have more acronyms than Twitter has tweets. I hope this article has opened your eyes to the power and possibilities of the blockchain, or, at the very least, allowed you a better understanding of a fairly complex subject.

--

--

--

## More from Paul Keefe

Love podcasts or audiobooks? Learn on the go with our new app.