The blockchain has been introduced in 2009 together with Bitcoin.12 Throughout the past years it has received a tremendous amount of attention and praise. And its use has been suggest for all kind of applications.
But what is the blockchain actually? Is it any good? Should you use it for your application?
Data Storage
At its core the blockchain is a data storage.
Many application store data. E.g. LinkedIn stores all posts and comments created by users in some form of data storage, so they can be displayed to other users. Or e.g. your bank stores your balance and your transactions in some sort of data storage, to keep track of your finances.
At its core the blockchain is nothing more than this: a way to store data. It does so in a unique way that provides some special properties though.
Comparison With Databases
There are many approaches to store data – the blockchain is just one of many. The most common one for professional applications though is the use of databases.3 Databases are a mature technology that has been around for decades. They are reliable, scale well, and are relatively cheap to run.
So when you consider using the blockchain for your application, the question really comes down to: “Do you use a database or do you use a blockchain?”.
In order to decide so, two considerations are important:
- Does the blockchain offer any significant advantages over databases for your application?
- Do these advantages outweigh the disadvantages of the blockchain technology?
Let’s take a look at some of the blockchain’s key advantages and disadvantages, and find out if your application benefit from it.
Security
The blockchain offers some security advantages over databases. It does not offer any advantages outside of the security area4 what so ever. So it all comes down to security questions.
However, the blockchain is not inherently “more secure” than databases. It provides some interesting solutions to some security questions, while introducing other security challenges. So it is really just a trade-off of different security properties.
Lack Of Trust
In a “traditional” application all your data is stored in a database. That database is run by a single company, typically the company running the application5, e.g. your bank or Microsoft. You trust that company, that they would never change any data.
But what if you do not trust any single company? How can you make sure, no one changes your data in the absence of a single trusted entity? The blockchain provides a solution to this problem. Instead of trusting a single entity, the blockchain is run by multiple parties, so called nodes. These nodes work together in a network. Every node has a copy of the data6. And as long as the majority of the CPU power in the network is controlled by honest nodes, the data stored cannot be changed.7
So, with the blockchain you are able to store data securely8 in an environment, where you do not trust any single party.
Privacy
With a database you typically share your data with exactly one trusted party: the party running the application and the database. If that trusted party does the job correctly the privacy of your data is guaranteed. No unauthorized party will get access to your valuable data.
With the blockchain on the other hand you share your data with several parties.9 10 Parties which you do not trust by definition.11 This might raise some interesting questions. Do your customers appreciate you sharing sensitive data with untrusted nodes? Depending on the circumstances you might even be legally restricted from doing so.12
Risk Of Modifications
With the blockchain the data is shared with all nodes. So an attacker might modify the data on his copy and try to convince other nodes to use his modified data. With this an attacker could achieve all kind of things – depending on your exact application. E.g. he could modify comments, you have written in the past, or modify financial transactions. Needless to say that this would be an absolute disaster for your users as well as for your application.
The blockchain solves this with clever use of cryptography.
The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.
“Bitcoin: A Peer-to-Peer Electronic Cash System”, Section 1. Introduction
In other words, the more CPU power honest nodes provide, the harder it is for an attacker13 to attack the network and modify your data.
So you want as many honest nodes as possible. And you want them to use as much CPU power as possible. How does Bitcoin incentivize honest nodes? Nodes providing CPU power can mine new coins and they can earn transaction fees for providing their CPU power. I.e. they can earn bitcoins in return for their service.14
But what does your application offer honest nodes to join the network? The truth most likely is that no honest party is even aware of your application. And if they are aware of your application they don’t care enough about it to provide CPU power to you. So very little CPU power is provided to your network. Hence your blockchain is inherently insecure and an easy target for attackers.
Double Spending Problem
If I got 15 USD in my bank account, I can only spend it once. I cannot use it to buy a book on Amazon and use it again to get a monthly Spotify subscription. My bank makes very sure of that. This is easy to do for my bank, as in this example all my transactions go through my bank.
To achieve this in a distributed environment, with many nodes, in the absence of a single trusted party, is a much harder problem. I could try to send one order to some nodes in the network and send the other order to other nodes in the network at the same time. Ensuring that only one of the two transactions is processed in a distributed environment is a complex problem. One of the great things about the blockchain is that it solves exactly this problem.15
Performance
One of the main disadvantages of the blockchain is that it is slow. Very, very slow. Orders of magnitude slower than other technologies such as e.g. databases.16
Costs
Any software engineer worth his salt brings some knowledge of databases. So, it’s easy to find qualified engineers to develop and maintain an application built upon a database. In addition, mature tooling and ample resources are readily available.
The blockchain on the other hand is a different animal. It’s a new and complex technology, which few engineers are familiar with. Finding qualified staff might therefore present some challenges.
Overall it’s reasonable to assume higher costs to develop and run an application with the blockchain technology over a more traditional approach.
Is It The Right Technology For You?
Here are a few key considerations to decide if the blockchain is the right technology for you.
- If your application does not store any information, then there is no reason to use a blockchain.
- If security is not important to your application, then there is no reason to use the blockchain.
- If you trust one party to run your application, then there are no benefits of using the blockchain.17
- If privacy is a consideration to you, then you want to be very careful with the use of blockchain technology.
- If performance is important to you, then the blockchain most probably is not the right technology for you.
- If solving the double spending problem18 is not part of your application, a different, simpler technology might be better suited for you.
- While the blockchain solves some security questions, its use introduces a new set of security challenges. If you do use the blockchain, make sure you fully understand these questions and address them appropriately.
- Building your application on the blockchain technology will take more time and result in higher costs. So, if budget is a main driver for your decision, you probably want to stay away from the blockchain technology.
Summary
The blockchain is a fascinating technology. It has enabled Bitcoin and started a development that powers almost all of today’s crypto currencies. However, it is a very narrow solution to a very narrow problem.
To me it is a bit like airplane wings. A great technology that enabled the development of planes and changed the world forever. However there is no benefit of attaching wings to cars, boats, houses, or cows.
Most probably you do not want to use the blockchain for your application. It’s slow, expensive, introduces complexity and risks, and the benefits are most likely utterly irrelevant to your application.
- Like many other innovations, the blockchain is partially based on older technologies.
- For more details please refer to the original paper “Bitcoin: A Peer-to-Peer Electronic Cash System”, e.g. https://bitcoin.org/bitcoin.pdf
- Popular offerings include e.g. the Oracle products, Microsoft SQL Server, or PostgreSQL.
- In the broader sense
- Or a cloud service
- The blockchain
- Any attempt at doing so would be detected by the honest nodes, and the attempt would be averted.
- Within some limitations.
- At least all the nodes on the network
- Yes, I am aware of the argument for building a blockchain without other members. However, to phrase it politely, I am not buying the argument.
- So it’s not unreasonable to assume that your data might be leaked to the public eventually.
- Yes, techniques such as aliasing and public/private keys can help to mitigate some of that and provide some level of privacy. However that makes your application more complex and slower. Also discussions get very technical very quickly. So, this might or might not convince your customers and legislators.
- Or a group of attackers
- Whether this incentive is sufficient is an interesting discussion on its own, that we leave outside the scope of this article.
- At least to some degree under some assumptions.
- Yes, I am aware of technologies such as e.g. the lightning network. A detailed discussion of these approaches is outside of the scope of this article. Also, while these technologies address some of the performance problems, they come at the cost of additional complexity.
- If critical parts of your application are run by a single party, there is very little benefit to use the blockchain for other parts of your application.
- Or a variation of it