Blockchain & cryptocurrency explained simply in pictures [newly revised with text annotations]

in #blockchain7 years ago

In the current digital world, if Sam sends Kim a text file...

Screen Shot 2017-07-23 at 4.37.38 PM.png

Sam and Kim each get a copy of the text file.

Screen Shot 2017-07-23 at 4.38.36 PM.png

Now say Sam sends Kim one of his 'digital coins' (we'll talk more about this soon).

Screen Shot 2017-07-23 at 4.39.34 PM.png

Sam should no longer have his coin!

Screen Shot 2017-07-23 at 4.40.33 PM.png

How do we ensure that Sam doesn't send copies of his coins to everyone?

Enter the blockchain.

But before we dive into the blockchain, we need to get a grip on these 'digital coins' (AKA cryptocurrency).

There's no physical money here. Think of 'money' as just a sheet on the internet with a balance.

So each person gets a sheet with a balance.

Screen Shot 2017-07-23 at 4.43.21 PM.png

Sam has 8 of what? For familiarity let's suppose the unit is a 'coin'. For now, don't worry about whether it's bitcoin, ether, etc.

Furthermore, we can call this internet sheet a digital wallet.

Screen Shot 2017-07-23 at 4.45.36 PM.png

One last thing. How do we know whose wallet is whose? For simplicity, suppose Sam and Kim are each given some digital 'address' to access their wallet.

This address is just a sequence of letters and numbers. Only Sam knows his address. Same goes for Kim.

So...

Sam and Kim each have a digital wallet, with digital coins, located at some digital address.

Screen Shot 2017-07-23 at 4.50.14 PM.png

Suppose Sam gives Kim 4 digital coins.

Screen Shot 2017-07-23 at 4.50.56 PM.png

Sam's and Kim's transaction gets broadcast to a group of nodes (computers) listening for new events.

Screen Shot 2017-07-23 at 4.52.54 PM.png

Each node collects transactions like Sam's and Kim's into a 'block'.

Screen Shot 2017-07-23 at 4.54.09 PM.png

Each block is assigned a hash based on a timestamp and a hash of the previous block.

Screen Shot 2017-07-23 at 4.54.56 PM.png

So, each block's hash recursively depends on the previous hash.

Screen Shot 2017-07-23 at 4.57.29 PM.png

Each node tries to find the 'proof of work' (POW) for this new block. POW involves proving that for each block in the blockchain, no money was double spent, and data in that block must have existed in that time.

Screen Shot 2017-07-23 at 4.59.35 PM.png

For a deeper explanation of Proof of Work, check out my Steemit story here.

As soon as a node finds the POW for the block, it broadcasts this block to the rest of the nodes in the network.

Screen Shot 2017-07-23 at 5.01.36 PM.png

If a majority of the nodes agree, this block is added to an 'append only' ledger, called the blockchain.

Screen Shot 2017-07-23 at 5.02.33 PM.png

Sam now has 4 coins and Kim has 8 coins.

Screen Shot 2017-07-23 at 5.03.54 PM.png

Because of the blockchain, Sam and Kim can directly transact. No middleman is needed.

Screen Shot 2017-07-23 at 5.04.17 PM.png

With more and more transactions after Sam's and Kim's, the blockchain grows longer.

Screen Shot 2017-07-23 at 5.05.15 PM.png

Say Sam is evil, and wants to alter his transaction with Kim, and get his coins back.

Screen Shot 2017-07-23 at 5.05.58 PM.png

But there's a problem. Remember how each block depends on the previous one?

Screen Shot 2017-07-23 at 5.07.01 PM.png

Sam has to alter every single block that comes after his own!

Screen Shot 2017-07-23 at 5.07.48 PM.png

As the blockchain grows larger after Sam's transaction with Kim, it becomes harder for Sam to hack this transaction.

If the majority of the nodes in the network are honest and collectively hold more CPU power than the evil nodes...

Screen Shot 2017-07-23 at 5.10.52 PM.png

Then the honest nodes can grow the blockchain longer and faster than the evil nodes can. And as Satoshi Nakomoto says, "The longest chain serves as proof of the sequence of events witnessed".

Screen Shot 2017-07-23 at 5.11.39 PM.png

If you made it this far, pour yourself a drink! This is no easy task, and I hope you learned a little something.

Take care.

P.S. If you know a little JavaScript and want to get your hands dirty with some blockchain code, feel free to check out my Github project where I combine Angular4 and Truffle.