What is Blockchain?

How do cryptocurrencies work? What is it all built on? We are going to break down blockchain and explore the technology that forms the foundations of cryptocurrencies.

Blockchain

The question of “what is blockchain?” can seem daunting at first but we are confident you will get a firm idea of it.

Blockchain is the foundation that cryptocurrencies operate on and it enables all three pillars (Decentralization, Transparency, and Security) of cryptocurrency to exist.

As a digital structure, it can be difficult to get your head around what blockchain is.

It’s very easy to go down a rabbit hole of complexity with this subject matter.

In order to simplify what a blockchain is, we are going to enlist the help of some Lego.

Each cryptocurrency is built upon its own blockchain. There is no single unifying blockchain for all cryptocurrencies.

Bitcoin has its own blockchain, as does Ethereum, Dash and so on.

What exactly is a blockchain? Well, it’s very similar to a tower of Lego bricks.

Blockchain and Lego comparison

Let’s say I give you some Lego. I ask you to connect them together to create a tower, like the image.

Pretty simple. If the blockchain were physical, it would look very similar.

Blockchain, however, is a digital structure and there are rules in place for it.

The first rule is that it’s chronological.

When you place a Lego brick on top of another you are creating a tower that is, technically, in chronological order.

Chronological blockchain and Lego

The same goes for blockchain!

Now, the second rule of blockchain is that once you have placed a block it is permanent.

Once a block is part of the chain it stays there forever – it can’t be removed or replaced.

It’s the same as if you super glued your Lego together!

Lego glued together

The third rule of blockchain is that each block contains information.

Every block has a small list of transactions in it. X received $4, Y spent $5. That’s it.

Transactions inside a block

The fourth rule of blockchain is that it is accessible to everyone.

Blockchain exists on computers – you can download a cryptocurrency’s blockchain whenever you wish.

What this means is that a cryptocurrency’s blockchain is on a hell of a lot of computers.

This creates a “network” which essentially means that those who have downloaded the blockchain are a part of its process and growth.

What is blockchain’s purpose?

To log all of a cryptocurrency’s transactions!

In essence, a blockchain is a few transactions in each block (lego brick), with the blocks all connected in an unbreakable chain, that is in chronological order, which is maintained by a network of computers/people!

That is the bird’s eye view of blockchain. Not too complicated, right?

Now we have the broad understanding, let’s get into some of the finer details.

Individual Blocks

We are going to take a look at the blocks themselves. They are simple, as you just saw, but they are made up of some ingenious components.

We’ll start off easy – all blocks contain a list of transactions.

A core principle of cryptocurrencies is anonymity. So if your transactions go into a block, how do you keep your anonymity?

Well, your name isn’t in the list of transactions – your public key is.

But as mentioned in the previous article, no one knows who that public key belongs to, just what it has sent or received.

Now, we have touched upon the fact that anyone can access a blockchain. This also means they can access blocks.

Not everyone is honest, unfortunately, which means we need a security measure to protect against any malicious behaviour.

There are two ways of doing this.

The first is by creating a digital paper trail of sorts through the blocks. You can trace it all the way back to the first block, also known as the “Genesis Block”.

How does blockchain create this trail?

Well, each block contains something called a hash function. It’s just a random combination of letters and numbers, like this:

Hash Function

It’s a really long combination – so long, in fact, that the possible arrangement of numbers and letters is too long to bother typing out.

Every block has two separate hash functions.

The first is unique to each block – its own fingerprint.

The second hash function is the previous block’s unique fingerprint.

These are the two links that create the chain in blockchain.

Hash functions link blocks

What this means is that you can hop back in time from block to block because they are connected.

How is this in any way related to security?

Let’s say someone tampers with a block and tries to change a $5 transaction into a $50 transaction.

This will change the block’s fingerprint (hash function).

If you change the fingerprint, you then provide the next block with that incorrect fingerprint.

This will have a cascading effect whereby it will be clear as day that you have tampered with a block.

Remember that anyone can download the blockchain?

In order to be certain your blockchain is correct, you compare it to other people’s.

It is a quick process to do this. Therefore, it’s very easy for people to identify who is trying to cheat the system.

If you are that person, no one will agree with your blockchain. That means your version will be rejected by the network unless you amend it.

Rejected block

It is a simple security measure, but because of the length of these hash functions it means you can never beat the system.

Alright, so the blocks contain transactions and form the basic security measures of blockchain.

How do you actually attach a block to the blockchain though?

Building Blockchain

There is a third component of a block that we have yet to uncover.

It’s something called a Cryptographic Nonce, which is really just another number.

This number, however, is what we need to uncover in order to successfully attach a block.

All that talk of solving the cryptographic equation – that’s what this is.

To solve the equation, all you need to find is the correct value of the cryptographic nonce.

You could technically do this in your head, but it would take you until the end of time and beyond. Hence the use of a computer – it’s just better than you!

You will no doubt have heard of this process…

Mining!

Solving for the cryptographic nonce is what all this mining chat is about.

Millions of computers literally generating numbers at random in the small hope that they find the correct value.

All of this is just an incredibly difficult puzzle-solving exercise.

It’s also a competition. You’re trying to be the first one to successfully attach that block onto the blockchain.

Why would you want to mine though? Why go through all of this hassle?

Well, if you are the first person to crack the code, you are rewarded with cryptocurrency.

If you are mining on Bitcoin’s blockchain, you get some Bitcoin. The same goes for every other cryptocurrency.

Mining on blockchain

That about sums up blockchain and it’s inner workings. A crucial aspect to blockchain, however, is the overall process of mining.

Mining uses all of the details we have just gone over in order to add new blocks to the blockchain. Come take a closer look at the process!