Though blockchain technology is powerful, it isn’t a solution for every problem. In fact, centralized databases are often a better choice. Here are some guidelines for when to use blockchain and when to steer clear.
When Blockchain Makes Sense
Use cases that are well suited to using blockchain technology:
- You’d benefit from cutting out a middleman. Intermediaries create trust and stability, but relying on them is expensive and time-consuming. One of blockchain’s core values is enabling a database to be directly shared between parties who don’t trust each other — no central authority required. This is possible because blockchain transactions contain their own proof of validity and authorization. Transactions can therefore be verified and processed independently by multiple nodes, with consensus mechanisms in place to ensure nodes stay in sync (source).
- You’re plagued with data integrity issues. Blockchain is great for applications where people have an incentive, financial or otherwise, to tamper with data or falsify records. For blockchains with many nodes (like the Bitcoin blockchain), tampering is essentially impossible because of the immense cost of computing power required to do a brute force takeover.
- It would take $300 billion to rewrite just a few blocks of the Bitcoin blockchain.
- In the last five years, Bitcoin's difficulty has increased by a factor of 350,000 times (source).
- Today, the vast majority of bitcoin mining takes place on expensive specialized hardware, in locations where the weather is cold and electricity is cheap (source).
Bitcoin is an ideal use case because there were huge benefits from cutting out the middleman, and data integrity is essential.
- People didn’t trust U.S. banks, and they didn’t want to pay banks to store and process their money.
- People who own Bitcoin have a financial incentive to cheat or falsify records, so having a tamper-proof system is crucial (source).
How Does a Blockchain Prevent Tampering?
- A blockchain is a data structure made of data blocks that are linked together.
- Each block is made up of multiple "transactions" or simply, "facts."
- When a block is created, the blockchain will calculate its checksum, which includes data about the included transactions, the block number, and the previous block's checksum.
- Every block’s state of validation depends on all the blocks before it. The longer the blockchain gets, the harder it is to change.
- If one block is tampered with, the checksum will be different, invalidating all the previous blocks.
- There is a small chance that one node could overwrite a couple of blocks at the tip of the chain. But nodes that play by the rules would quickly outpace the bad node since they can calculate valid nodes faster than the bad node.
Important note: Blockchains are only effective if they have many participants. If you only have a dozen or so nodes, a takeover by malicious parties would be incredibly easy.
3 Signs Blockchain is the Wrong Choice
- When you need to support CRUD commands. In a traditional database, you can perform four functions on data: create, read, update, and delete (CRUD). The blockchain is designed to be append-only — all previous data is permanently stored and can’t be altered.
If you’re building a product that requires the ability to update and delete data, blockchain is a bad fit.
- Applications where speed and performance are critical. Most blockchains today aren’t just slow because the technology is new — the amount of computing power required to process transactions is a core piece of blockchain technology.
When processing transactions, a blockchain has to do all the same things as a regular database, but it carries three additional burdens:
- Signature verification. Every blockchain transaction must be digitally signed using public-private cryptography. This is necessary because transactions propagate between nodes in a peer-to-peer fashion, so their source cannot otherwise be proven.
- Consensus mechanisms. In a distributed database such as a blockchain, effort must be expended to ensure that nodes reach consensus. Depending on the consensus mechanism used, this can involve significant back-and-forth communication. While centralized databases also contend with conflicting and aborted transactions, these are far less likely because transactions are queued and processed in a single location.
- Redundancy. Whereas centralized databases process transactions once (or twice), in a blockchain they must be processed independently by every node in the network. So a lot more work is being done for the same end result.
- Applications where confidentiality is crucial.
Every node in a blockchain independently verifies and processes every transaction. A node can do this because it has full visibility into the database’s current state, the addition requested by a transaction, and a digital signature which proves the transaction’s origin.
So What’s the Catch?
For many applications, full transparency is an absolute deal-killer. To be fair, there are strategies to mitigate this problem. Nonetheless, the more information you want to hide on a blockchain, the heavier a computational burden you pay to generate and verify transactions.
A simple rule of thumb: Ask yourself, “Could I do this with a regular database?” If the answer is, “yes,” then you don’t need blockchain.