It's a Blockchain — 101

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.

this-is-blockchain-101.jpg

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.

Table of Contents:
  1. What is a Blockchain?
    • Definition of a Blockchain
    • How does a Blockchain work?
    • What is a block?
  2. Which real life problems does blockchain solve?
    • Bitcoin
    • Ethereum and Smart Contracts
  3. Blockchain vs Traditional Databases
  4. References

Compared to traditional database structures, we’re eager to see how the programmable nature of smart contract enabled blockchain systems can transform the way businesses and people interact in the digital world.

What is a Blockchain?

blockchain-vs-cloud-vs-database.png

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.
features-of-blockchain.png

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.

blockchain-explained-simply.png

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).

what-goes-in-a-block.png

Which real-life problems does blockchain tech solve?

bitcoin-and-ethereum-comparison.png

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.

database-and-blockchain-difference.png

Why not use a shared database instead of blockchain?
Database vs Blockchain - Who is the admin?

The first answer to that question is for the shared database there must be an admin—a person or entity. They at some point might be controlled, bought, or bribed whereas the blockchain is autonomous structure. All the nodes (users, miners) are collectively the admin. You need to control the majority of the nodes (usually more than 51% of the network) to control the blockchain. This is not impossible but much harder than controlling the admin (person or entity) of traditional databases.

Now let’s go over other important differences between a blockchain and a database.

Database’s CRUD vs Blockchain’s Read & Write Operations

In a traditional database, a client/user can perform four functions on data: Create, Read, Update, and Delete (aka CRUD).

A blockchain is structured by design to be append-only. A user can only add more transactions, which are then aggregated and form new blocks. All previous transactions are stored forever and cannot be altered or deleted.

E.g. if Alice transferred $10 to Bob yesterday, that transaction cannot be modified or deleted from the blockchain.

Database vs Blockchain: Integrity and Transparency

Another key property of blockchain technology, which distinguishes it from traditional database technology, is public verifiability, which is enabled by integrity and transparency.

  • Integrity: Every user can be sure that the data they are retrieving is uncorrupted and unaltered from the moment it was recorded.
  • Transparency: Every user can verify how the blockchain has been appended over time.

In short, the main difference is "Decentralized Control and Trustable, Untampered Data". Anybody with sufficient access to or leverage over a centralized database can destroy or corrupt the data within it. Users are therefore reliant on the security infrastructure of the database administrator.

Blockchain technology uses decentralized data storage to sidestep this issue, thereby building security into its very structure.

Though blockchain technology is well-suited to record certain kinds of information, traditional databases are better suited for other kinds of information. It is crucial for every organization to understand what it wants from a database, and gauge this against the strengths and vulnerabilities of each kind of database, before selecting one.


That’s a quick intro to the concepts of blockchain tech. Later on, I’ll explore in more detail potential applications of smart contracts and other innovative uses for blockchain tech.

References

Blockchains versus Traditional Databases by Shaan Ray
Understanding the Blockchain and Decentralized Applications Build on Ethereum by Sunny Hoi
An Explanation of Blockchain For Non-Technical Peoples by Mona Nomura
On decentralization of blockchain oracles by Provable Things

You might also like
A Quest for Open Source

A Quest for Open Source

Most common challenges faced by startups (and some not so common)

Most common challenges faced by startups (and some not so common)