Blockchain: 6 simple concepts to explain it (even) to your grandmother
Chances are you’ve heard the word ‘blockchain’ over the past year. But do you really know what it is? You often hear this concept associated with cryptocurrencies, or more specifically to Bitcoin, investments or online trading.
The blockchain is none of these things: it is a technology for creating an immutable transaction record that can be verified by anyone.
This may sound like a convoluted and counter-intuitive concept to you, but don’t worry – we literally got our grandmother read this article!
We’ll try to explain it to you in 6 simple concepts:
1. Transactions
Blockchain is a technology that aims to create a huge digitised ledger to record all the ‘operations‘ carried out by its users.
These operations are called transactions and are, for example:
- a money transfer from one person to another
- an exchange of goods or services.
This register, however, unlike in the Real World™, is not stored on some dusty shelf in one’s notary’s office or in a bank’s database, but is shared with all the users of the network, and each user can verify its authenticity independently.
We can imagine it as a giant Excel file shared with the whole world, roughly organised as follows:
Date | Who | Details |
10/04/2021 – 20:03 | Mario | He gabe Giorgio 10€ |
10/04/2021 – 20:07 | Giorgio | He bought a house from Giovanni for 200,000€ |
The key feature of this register is immutability. In fact, once a transaction has been written, it is no longer possible to modify it unless the entire register is invalidated.
To achieve this, the blockchain is structured in a very particular way, namely as a chain.
2. Blockchain
Imagine that in our blockchain there are transactions from all over the world all the time. Those short-term transactions are collected into groups called blocks. When a new block is generated, it is “hooked” to the previous one forming a long chain of blocks. Hence the term ‘Blockchain’. The chain thus created forms our transaction log and by scrolling from the first to the last block it is possible to see the entire history of transactions up to that moment.
So, the blocks are linked to each other sequentially. But how exactly? When a new block is created, an identification code is generated using a special function called hash. We can imagine this code as a kind of block fingerprint, or if you like, its DNA.
What’s the purpose of this code? That’s easy! When a new block is created, the ‘fingerprint’ of the previous one is stored inside it. In this way, each chain block knows for sure which block comes before.
If someone attempted to fake or tamper a block by replacing it with another one, anyone would tell because their ‘fingerprint’ would no longer match the one saved in the next block! (and so on, following a cascade effect). To put it otherwise, if someone tried to falsify the transactions that had taken place, perhaps for his own benefit, no other user on the network would accept his version, as the tampering would ‘break’ the chain.
3. Miner
If you’ve come across the concept of blockchain before, you’ve probably heard of mining and it may have seemed unusual. Let’s try to figure out who these shady characters are and why they are so important!
We mentioned that transactions are grouped into blocks and added to the chain, but this process is not automatic. Every time a transaction is executed, it is shared with all the participants in the network, but since it’s not yet verified, it waits to be added to a block. Who is in charge of performing this operation and verifying that there are no anomalies?
The miners, that is, network users who make their computers available to perform calculations to authenticate pending transactions. More specifically, the task of a miner is to choose a group of transactions to validate and try to group them into a block. I say ‘try’ because they will actually be competing with other miners who will be trying to do the same. The first one to complete the calculation will ‘win’ the block and add it to the chain. Actually, creating a block is not a simple job of grouping, but requires the miner to perform a complex mathematical calculation to ensure that the block is valid.
The result of this calculation is called Proof of Work and anyone can use this result to verify which block is valid.
Due to the way the calculation is structured, it has a undetermined resolution time. It could take a few moments or several minutes, because it is essentially based on trial and error (i.e. chance). This means that two miners cannot generate two valid blocks at the same time (or, at least, it is absolutely rare).
4. Gas
We have said that miners ensure that the blockchain is sequential and valid by providing its hard work (its computing power) and consequently the electricity needed to execute it. At this point you might ask yourself: why would a network user want to become a miner? What’s in it for him?
Easy! When a user wants to perform a transaction (e.g. he wants to send money to a friend), he has to put up a small amount of money that will be given to the miner who manages to win the block containing that transaction (i.e. solve the calculation first).
This reward is called gas and is essentially the ‘fuel’ that the blockchain network runs on (hence the name).
The more gas is up for grabs as a reward, the more the miners are encouraged to validate it. On the contrary, if you don’t put much gas up for grabs, you will end up at the bottom of the queue of miners’ preferences, who will choose to handle more profitable transactions with higher priority. For this reason the amount of gas for a transaction is associated with the speed at which you want to execute a transaction.
For example, you don’t need to put a lot of gas on the table if you want to send money to a friend. Conversely, if you are participating in an auction, the speed at which you execute the transaction may determine how fast you can win the lot, so you may want to spend more gas.
This block validation mechanism is secure and has been operating for a decade now, but it has some problems. As miners consume power to perform calculations and compete with each other to win gas, this leads to two main disadvantages:
- as the computation is complex and of random duration, there is a limit to how many transactions per second can be processed by a blockchain network;
- all the electricity spent by miners who do not win the block is ‘wasted’, which has a significant environmental impact.
Moreover, paradoxically, the more the miners are, the more this problem gets worse! Over time, this has increased the cost of gas required by miners to make up for their investment, leading to a vicious circle.
To overcome this problem, an alternative approach to Proof of Work, called Proof of Stake, has been proposed by Ethereum : it could solve the problem, but is still being tested. Explained in a nutshell, miners (now called ‘stakers’) stop competing with each other and only one of them is chosen by lot to create a blockchain. To ensure that he performs the operation honestly, he is forced to place a ‘bet’ in the pot, like in poker (Stake). If the other stakers find any irregularities in his work, they can “seize” the stake he has placed, which deters irregularities.
5. Cryptocurrencies
You may be wondering- ‘Okay, interesting, but what does this have to do with cryptocurrencies?’ That’s easy! The very first use case for which blockchain technology was used is Bitcoin, the very first cryptocurrency.
Conceived in 2009 by Satoshi Nakamoto (whose real identity is still unknown), Bitcoin lays the foundation for blockchain technology and was created as a decentralised approach to finance, where users can freely and safely exchange money without depending on banks or payment institutions. Bitcoin is the name of the virtual currency that users can exchange.
The ‘immutable ledger’ of the ‘Bitcoin’ blockchain keeps track of all transactions made by users and guarantees the authenticity of transactions. The obvious question is: who validates this currency? The answer is ‘nobody’, or rather, ‘us’, just as it is true for euros, dollars or any other currency. When someone is willing to exchange goods and services for Bitcoin, they effectively decide the value of the cryptocurrency. For example, starting from a few cents of a dollar at its creation, the Dollar-Bitcoin exchange rate has reached nearly $60,000 for a single Bitcoin.
One of the key concepts in cryptocurrencies (and in blockchain in general) is the concept of wallet, i.e. each user’s virtual ‘wallet’ to which their available balance in Bitcoin is associated.
A wallet consists of a couple of codes:
- a public one, which acts as an ‘IBAN’code, i.e. as a code to be used to receive money;
- a private one, which is like a ‘secret password’ to access your bank account, used to send money.
The wallet public code (called public key) is used in the blockchain as a kind of user identity card, since every transaction he will carry out will contain this key to identify him.
As we said at the beginning, however, blockchain and cryptocurrency are not the same thing. The blockchain is a technology, a standard, a set of shared rules for certifying transactions, but the nature and content of these transactions can be applied in very different contexts. Keeping the basic concepts unchanged (blocks, transactions, Proof of Work and gas), there are hundreds of blockchains besides Bitcoin with very different uses. For example, there are blockchains where transactions are ‘likes‘ left by users to posts on social networks. Or, they represent the stake in a digital auction. Or even, the maintenance work carried out on your car.
Another well-known and particularly worth mentioning blockchain in this regard is Ethereum. In contrast to Bitcoin, the creators of Ethereum let you free to save ‘anything’ on their blockchain, with the only limit being how much gas you are willing to spend to do so. This is possible thanks to a mechanism in Ethereum called smart contract, our last concept.
6. Smart contract
A smart contract is basically a software encoded and written as a “transaction” on the Ethereum network and whose functionalities are freely usable by anyone. Like any other transaction, smart contracts are verifiable by anyone on the network.
These smart contracts, like any other application, can implement a wide range of functionalities, including the possibility to save data as ‘transactions’ on the blockchain network. This allows programmers (and others!) creative freedom in the use of blockchain technology. In addition, smart contracts created by different people can interact with each other to further expand their offers.
Software developed through smart contracts is called DApps (which stands for Distributed Apps). There are numerous examples of DApps on Ethereum, ranging from online auction systems, video games, e-commerce, e-voting systems, supply chain control mechanisms and even the real ‘phenomenon of the moment’: NFTs (Non-Fungible Tokens), which we discuss in this article.
DApps have several advantages over traditional applications:
- the actions and data processed by the software are stored immutably in the blockchain and anyone can verify their outcome;
- anyone can verify the software behaviour and does not risk unexpected or malicious behaviour;
- it cannot go ‘offline’, unless the entire Ethereum network is offline (and that’s millions of users);
- it is resistant to censorship: a government or third party entity cannot force the removal of a content on a network distributed over millions of devices, but can do so towards a single company (e.g. Twitter / Facebook / Google / etc… );
- it is resistant to modification by authors: once published, a DApp is immutable, like any other element of the blockchain;
- it is extremely easy to manage payments within a DApp, as it is based on Ethereum which is actually a cryptocurrency.
But they also have some limitations, such as the execution speed for transactions but also the amount of data that can be stored on the blockchain. In fact, trying to save a complex content (such as a video or a photograph) on the blockchain would risk incurring prohibitive gas costs and equally unmanageable processing times. This is why DApps often use a hybrid approach, saving key data ‘on-chain’ (i.e. on the blockchain itself) and the rest of the data ‘off-chain’ (i.e. outside the blockchain, through traditional mechanisms such as databases, web storage and more).
Got it?
Blockchain still has some challenges to solve, from gas costs to net efficiency. Despite this, it has many positive aspects: transaction transparency, lack of intermediaries, reliability and security, are just some of the advantages that are contributing to spread and gradually introduce blockchain technology into our lives.
Now that everything is clearer, what do you think about it?