How does a blockchain actually work?

Updated: Oct 22, 2021

The explosion of Non Fungible Tokens (NFTs) this year has led to a greater public awareness of blockchain technology - but the blockchain is capable of more than just buying and selling pictures of Apes for millions of dollars. So, how does a blockchain work, and what is it capable of?


Bored Ape NFTs
Bored Ape NFTs - Source images courtesy Bored Ape Yacht Club

WHAT IS A BLOCKCHAIN?

To put it simply, a blockchain is a distributed ledger network database, in which information can be verified with confidence - but just because something is simple doesn't make it easy to understand!


Let's think about Bitcoin, which alone accounts for over half of the entire money in cryptocurrency. When Sally sends Bob one Bitcoin, Sally will not only record this transaction on her copy of the Bitcoin ledger, but she will also send a copy of this transaction to all the 'Miners' of the Bitcoin network. These miners all have their own copy of the Bitcoin ledger, which includes a copy of EVERY Bitcoin transaction ever made. The miners verify that Sally actually has 1 Bitcoin to send to Bob and the transaction is confirmed on the blockchain. Approximately every ten minutes a new block is created on the Bitcoin blockchain and the previous block is entered as a new page of the Bitcoin ledger. The reason that it is called a 'blockchain', is because the information in these blocks are 'chained' together in a chronological order through code. New information that is added to the blockchain is immutable, meaning it is unable to ever be changed and is available for all to see.


A picture of a bitcoin in front of a trading platform

CONSENSUS MECHANISM - PROOF OF WORK

Consensus mechanisms are the main concept you'll need to understand in order to understand how a blockchain works and why it is so secure. Bitcoin uses a consensus mechanism called 'proof-of-work', and the people who facilitate this consensus process are known as 'miners'. Mining is the process in which someone will set up their computer to solve a very difficult cryptographic puzzle. They do this because the computer that solves the puzzle first gets the right to add the new information (Bitcoin transactions in the last ten minutes) to the next page of the Bitcoin ledger. The miner who enters the new block on the Bitcoin blockchain will then 'mine' Bitcoins as a reward, as long as the information they put in this block is accurate. How are the miners kept honest? Remember, every node operator has a copy of every Bitcoin transaction ever recorded, and they will automatically know if this information is true or false. If the miner who completed the cryptographic puzzle first tries to send Sally's one Bitcoin to themselves instead of Bob, the other node operators will automatically detect an inconsistency in the data. This block is not added to the blockchain and the miner forfeits their reward for mining the block. The amount of rewards a miner gets for mining Bitcoin is halved approximately every four years in a process called 'The Halvening', with the current reward being 6.25 Bitcoins mined every new block. Once all 21 million Bitcoins have been mined (estimated to be in 2140), no new Bitcoins will ever be created.


CONSENSUS MECHANISM - PROOF OF STAKE

The proof-of-work consensus mechanism is regarded as the most secure way of ensuring consensus - but it is also the most resource intensive. You may have heard of the concerns that arose earlier this year about the energy it takes to run the Bitcoin blockchain, which ultimately reversed Elon Musk's decision to accept Bitcoin as payment for Tesla. The blockchain's answer to this concern is proof-of-stake, a consensus mechanism where a node operator must 'stake' an amount of that currency in order to operate a node. If a node operator attempts to enter incorrect information into the next block of the blockchain, the information will be fact-checked by the other node operators and the incorrect node operator will not only forfeit their potential rewards, they will also lose a portion or all of their initial stake. The main difference between these two methods is that with proof-of-stake there is no cryptographic puzzle to solve, meaning much less computing power. Therefore there is much less energy required to operate blockchains that use proof-of-stake to achieve consensus.


CAN I REALLY TRUST THE BLOCKCHAIN?

Blockchain technology can be difficult to understand and requires a bit of a deep dive to get your head around. The information on a blockchain is secured through cryptography, which involves the encryption and decryption of data. Decentralisation is also an effective security mechanism as it removes the risk of a single person or entity being able to manipulate the system for their benefit. In order to 'hack' a blockchain, you would need to gain control of over 50% of the nodes within the system. This is much more difficult than it sounds because the identity of a node operator is not known to any other node operator. There are some real risks with blockchain technology however, especially because the technology is still so new.


The original Ethereum blockchain was hacked in 2016 because of vulnerabilities in the blockchain's code, with approximately $60 million USD worth of Ether (Ethereum's native cryptocurrency) being stolen. This sparked a debate in the Ethereum community, with one camp believing that the code should never be changed and the other camp believing the code should be updated provide a higher level of security and they could also reverse the hack. The dispute led to a 'hard-fork' event, meaning that the blockchain was split into two different chains with the same history. Ethereum is the name of the blockchain that is more widely used today and has the updated code, and Ethereum Classic is the name of the blockchain that kept the code the same.


Another incident recently occurred on the popular Solana blockchain, with their network going down following a large uptake of users. The increasing traffic was too much for the Solana blockchain to handle and the developers had to negotiate with the Solana node operators to turn the blockchain "off-and-on" again. This resolved the issue however led to concerns and questions about the centralisation of power in the Solana network and how they will resolve similar issues in the future.


We can't talk about the risks of using blockchain technology without talking about cryptocurrency. The cryptocurrency markets are highly speculative and volatile, with the value of any one cryptocurrency changing on a second-to-second basis. Decentralised wallets like Metamask that hold cryptocurrencies are confusing to set up and require you to keep track of a 12 word random password that you can't easily store anywhere. Also, the cryptocurrency world is rife with scams (you may have seen the ones on YouTube asking you to send 1 Ethereum back in order to get 2 - don't do it!) and the lack of regulation means that newer people to cryptocurrency often get tricked with no way to recover their funds.


Never give away your private keys to your decentralised wallet and never give away your crypto! If your favourite crypto YouTuber is private messaging you with an offer that sounds too good to be true, that's because it probably is. Blockchain technology brings many risks with it, however the opportunities that it will provide are well worth the risks. Blockchain technology will have as big of an effect on our lives as the internet did for the people of the early 2000's.


WHY DOES THE BLOCKCHAIN MATTER?

The process of being able to verify information in a decentralised way may not seem groundbreaking, but the fact that it is now possible to record and send information and assets in a trust-less manner is the reason why blockchain technology is revolutionary. In the scenario explored earlier, Bob doesn't need to take Sally at her word that she sent the Bitcoin as the transaction is verified and recorded on the Bitcoin blockchain by node operators. Today we place our trust in financial institutions like banks to hold our money and we use their service to transfer money to other accounts. This has worked for us so far as there has been few viable alternatives. The blockchain offers a different path forward, one which is more secure and allows the users of the blockchain to capture more of the value on offer. Now that we are not forced to use banks, we don't have to pay their fees. This may not seem like a big deal, but for those who have to regularly send money internationally you would be well aware of the exorbitant transaction fees each transaction.


WHAT ELSE CAN THE BLOCKCHAIN DO?

There are countless use cases of the blockchain that are beyond the scope of this article. Blockchain technology is in it's infancy but it's just about to hit the mainstream in a big way. The genie is out of the bottle for blockchain technology with NFTs already starting to become embedded in mainstream culture, and this trend will only continue. Make sure you subscribe to the email list to ensure you don't miss my upcoming articles about smart contracts, decentralised finance and my favourite - play to earn video games. Make sure you #doyourownresearch and keep up to date with the exciting advancements happening in this industry.


GameDay Squad is a NFT fantasy sport platform that is being released for the 2022 AFL and NRL season. Subscribe below to keep up to date with all things GameDay Squad and NFTs in sport.