Blockchain: What is it?
Simply put, a blockchain is a distributed database.
A blockchain contains information in a series of “blocks” which are “chained” to each other in chronological order.
Made popular over the 2010’s by Bitcoin, the idea of a blockchain has been around for a while before that. It was originally coined in 1991 by Stuart Haber and W Scott Stornetta as a way of storing data using timestamps to prevent data being tampered with.
In 2009, Satoshi Nakamoto expanded on this idea by using a cryptographic proof-of-work function (which we’ll get into below).
Why is the Blockchain Important?
Blockchain technology has shaken up the status-quo by bringing decentralisation, security, trust and transparency to data.
With more people and businesses connected to the internet than ever before, our way of life and interaction has changed drastically. We’re a connected society – so the thought of centralised control, potential for corruption and loss of data is just too high of a risk for the semantic web.
Blockchain’s disruptive capacity lies in that it creates a true democracy. Storage is distributed among potentially millions of nodes connected all over the world. Each node needs to approve any new transaction to the ledger (addition of new records/ changes of old) before the data can go on the chain.
The opportunity to create trust among two parties and eliminate risk of fraud when sharing documents (buyer-seller relationships), transact money without the need of a bank (eliminating 3rd party transaction costs and delays) and protect IP for artists (via NFTs) are some of the advances we can make as a society using blockchains.
More drastically, there are conversations around how blockchain technology could help alleviate poverty by disrupting the financial/ banking sector. But that’s out of the scope for this article. We’ll maybe cover that later.
What does a Blockchain look like?
Each block contains data, hash of the block and hash of the previous block.
The data stored on the block depends on the blockchain. A block for cryptocurrency transactions contains information about the sender, the receiver and the value of the transaction. Whereas a blockchain for document management could store information about contracts, product specifications, white papers etc…
A block also has a hash. A hash is a unique identifier which identifies the block and all of its contents.
A hashing algorithm takes an input (a text, numbers or document) and gives a fixed-length output. The commonly referred hashing algorithm is SHA-256 which is used by Bitcoin and provides a fixed output of 64 characters.
A hash is unique, in that if the data changes however slight – the entire hash changes.
Change just one letter to lowercase and the entire hash changes. This hashing function helps forge a trust in the data.
The block hash takes the block number, data, timestamp and nonce to calculate a hash which meets a given hash-target. More on this at a later date.
Hash of the previous block
This essentially creates a chain of blocks by referring back to the previous block. Take a look at the below example. If the previous block is changed in any way, all future blocks become invalid because the preceding hash will not match.
The system is designed to reject any changes to this effect, so in theory is impossible unless someone could change every single block across every single node (which is highly unlikely).
The timestamp is information about the time at when the block was added.
Nonce (Number Only Used Once) is a number added to the data in the blockchain to create the hash which meets the target. This sounds complicated, and it kind of is – so we’ll get into this in another article.
Main Benefits of Blockchain
Arguably two of the most important benefits of blockchain technology is:
- Immutability of Data
Data is distributed among hundreds, maybe thousands or even millions of nodes each of which hold a copy of the record as it was created. There is no single entity which controls the data – it is distributed and by definition – decentralised. No one person, entity or governmental body can control the blockchain or the data contained.
The benefit of decentralisation with a blockchain means if one computer (or node) goes offline or gets corrupted, your data is still safe and accessible as it is hosted among potentially millions of nodes across the world.
Web1.0 and Web2.0 have been based on the central entity model. Your data is stored on servers operated by a central entity and you need to interact with the central entity to access or use your data.
Examples of this include Cloud Storage. Whether Dropbox or Google – you interact with either company’s apps or website to access your files stored in their cloud.
Centralised systems have been around for centuries, but they come with security vulnerabilities. Your data is stored across a finite amount of data centers owned or managed by the entity. If hackers attempted to attack the entity your data could get corrupted or at least temporarily unreachable.
Or, the entity holding your data may run out of funding and shut down. Iif all your data is on their server, where can you go?
Blockchain promises to absolve these risks. With the blockchain, your data is not owned and stored by a single entity. Instead it is stored across many millions (potentially) of nodes across the world. This makes it harder for data to be corrupted or data to be offline.
If one node went down, you could still access the data across any of the many other nodes around the world. In the modern Web3 world – this is critical as so much of our financial data, health data and commerce relies upon connectivity.
Once something enters the blockchain, it cannot be changed. To this end, a blockchain differs from a normal database as records can’t be updated or deleted in normal fashion.
For example – if two parties are working through a contract, all records and amendments to the contract are visible to both parties meaning one cannot make a small negligible change to the contract without the other party immediately noticing.
This works through cryptographic hashing algorithms, which help keep the data secure and decodable by the sender and receiver only.
A hashing algorithm takes an input (a text, numbers or document) and gives a fixed-length output. The commonly used hashing algorithm is SHA-256 which is used by Bitcoin and provides a fixed output of 64 characters.
Using the example above (hello, world!) – change the letters to all lowercase and the hash completely changes.
This hashing function helps forge a trust in the data. Whether two parties are sharing a contract and agreeing drafts they can easily see whether something has been changed.
Each block contains the hash of the previous block. Which means if the hash of the current block changed, it would need to be reflected on the previous block and so on in order to effect a material change across the network.
As this would need to be validated by every node (or majority) in the network, this would be impossible to do.
Use case of Blockchain Technology
There has been plenty of discussion of how blockchain could disrupt entire incumbent industries such as supply-chain and contracts, however these discussions are not without their limitations.
Two certain industries blockchain has and can have real-life use case in are:
- Digital Assets & Media (NFTs)
DeFi (decentralised finance)
After all, Crypto made Blockchain famous.
The use of blockchain for decentralised finance is integral to maintain trust and maintain the next stage of cyber revolution. Decentralising finance from state control on a peer-to-peer network is possible through blockchains but more needs to be addressed in the scalability problem of the blockchain, plus the problem of creating a predictable store of value in the new alt-currency.
Digital Assets & Media (NFTs)
This is one area which excites me the most. NFTs (Non-Fungible Tokens) have risen to prominence with the sales of high-profile Beeble artwork for ~$69m and other digital artists selling their work for thousands of dollars.
NFTs essentially enable the verifiable passing of intellectual property from the current owner to the new owner. They solve a large problem for digital creators – ownership.
There is a catch-22 in this and a problem yet to be solved as of writing – how do you know who the original – I mean the very original creator was of this content? Proving the genesis of a digital asset isn’t easy and needs more verification methods to be implemented.
Problems with Blockchain
To really become mainstream and more than a hackers toy, blockchain has some way to go.
The current consensus algorithm adopted by Bitcoin and Ethereum blockchains is the Proof of Work function. When creating the hash, each miner (miners are those who create the hash for each block) competes in a computationally difficult but not impossible challenge to arrive at the correct hash first. The winner is awarded either Bitcoin or Ethereum for their work in getting a new block added to the chain that meets the majority consensus in the network.
Mining is computationally intensive and utilises high performance graphics cards and ASIC machines to arrive at a hash. As more miners join the network to compete for coins, more nodes go online and use electricity resources to run these computations.
For reference, research from the Cambridge Bitcoin Electricity Consumption Index shows Bitcoin is using circa 115TW of electricity per year – https://cbeci.org/cbeci/comparisons. That’s more than the entire country of Netherlands.
And that’s alarming.
There are discussions taking place to move Blockchains to a less energy intensive consensus mechanism such as Proof of Stake, and by pooling mining based on renewable energy sources – however as the price of bitcoin and ether continue to rise, the more we’ll see new miners joining in to grab a slice of the wins. Ultimately the Gordon Gecko mentality of “greed id good” reigns when it comes for easy money (but mining is not easy – nor in fact are the wins really desirable given the level of competition and computing power required to arrive at a hash faster than the rest of the network).
Decentralisation, a myth?
As we’ve described above, creating a new block in the chain requires consensus to be reached by the nodes before a block can be added. This takes computing power utilising high performance Graphics Cards and dedicated ASIC machines to be the quickest one to the finish line and win the coins offered by the network.
Each rig is expensive, and we’ve begun to see a shortfall of available graphics cards which make mining worthwhile. In fact, if you’re not using the best graphics card it is unlikely you’ll ever “win” anything at all. Plus, with crypto-currency reward rates declining per n coins generated, returns are diminishing. With rising chip costs and demand outbeating supply, for a solo-miner to generate tangible ROI is slim and continues to become slimmer.
What this has caused is the creation of mining farms. The continuing bullish trend of cryptocurrency has become an alluring proposition for the business-savvy who have set up dedicated mining farms with hundreds / thousands of nodes online, mining (i.e approving transactions to add blocks to the chain) in return for crypto-currency.
Ultimately the risk here is with mining eventually being controlled by a fistfull of mining farms with millions of dollars of equipment – the eventual consensus will be handled by a select few organisations which has the unintended consequence of handing “power” back to the powerful.