One of the most discussed and oft-derided disruptive technologies of the last decade, blockchain has the potential to impact a wide range of digital industries. So far, too much of the discussion has centered on the cryptocurrency market and value fluctuations.
We won’t focus on that in this piece (or maybe ever). For creative software product engineers, blockchain technology is an important tool to have at our disposal. In this post, we will outline the basics of blockchain tech in it’s current implementations.
Compared to traditional database structures, we’re eager to see how the programmable nature of smart contracts enable blockchain systems to transform the way businesses and people interact in the digital world.
What is a Blockchain?
A blockchain is a decentralized, secure and distributed database of records or public ledger of all transactions (digital events) that have been executed and shared among participating parties. Each activity in the public ledger is verified by consensus of the participants in the system—once entered, information can never be deleted. The blockchain contains a verifiable record of every single transaction ever made. A blockchain database is managed autonomously using a peer-to-peer network.
"Decentralized" is really the important keyword here. It has the potential to change the world—actually it already has with Bitcoin, a decentralized bank owned by all the people who use it. Blockchain tech stands to disrupt a lot of things, specifically any structure in our life which has a centralized owner/controller. Think banks, insurance companies, governments, politics, voting, google, facebook, uber etc...
A blockchain shifts the power from centralized entities to people. It prevents the centralized entities from using your money, personal data etc.. and monetizing them without your permission.
How does a blockchain work?
Let's see how a blockchain transaction works. An example blockchain transaction can be a Bitcoin transaction "A sends money to B" or an Ethereum transaction "X votes for Y" using smart contracts which will be explained later in this post.
What is a block?
A block in a blockchain can be thought as a cryptographically secured summary of transactions of a certain period (10 minutes for Bitcoin, 20 seconds for Ethereum).
Which real-life problems does blockchain tech solve?
Bitcoin
The first widely used, successful implementation of blockchain tech is the Bitcoin blockchain. What is Bitcoin? Well, easy, it is digital money which I can buy and sell to get rich, right? No, not really.
It is much more than. Bitcoin is an internet bank without a single owner or controlling entity—the owner is all of the users.
Its key use case at the moment is as a secure cross-border payment solution, like remittance payments for example. Between countries that do not have the same or partnered banking corporations, these money transfers can be quite expensive and slow to clear.
With Bitcoin, this money transfer costs less than a $1 instead of $20, takes 60 minutes instead of 1 week and can not be delayed or halted by any central entity or government.
Of course, Bitcoin is not perfect, it is still early days for both blockchains and Bitcoin. One of the biggest criticisms about Bitcoin is that the users are anonymous which makes it a perfect place for money laundering and tax evasion.
Ethereum and Smart Contracts
The second successful implementation of blockchain tech is Ethereum, otherwise known as ‘the world’s computer.’ The key feature of Ethereum is smart contracts with a Turing complete, contract-based new programming language called Solidity. This sets it quite apart from Bitcoin because it enables writing real-life scenarios coded into smart contracts.
A very simple smart contract example can be “Bob can transfer $1 to Alice only when Alice’s balance is less than 10$”. By comparison, Bitcoin is designed to do only simple operations without logic e.g. “A sends money to B”.
A smart contract is an immutable program which operates within in a blockchain. The immutable program concept often confuses people. The code/logic of the program is immutable but the internal data of smart contract can be altered by the immutable code of the contract itself. e.g. if we have a Voting smart contract - the Voting code/logic of that contract cannot be changed but the votes (internal data of the program) can be changed by the smart contract code itself.
Traditional Databases vs Blockchains
Often, in order to better understand a new concept, the human mind prefers to compare it with an existing concept that is already understood. So let’s compare blockchain with our existing traditional database concept.