DEV Community

Cover image for What about a blockchain?
iotcloudarchitect
iotcloudarchitect

Posted on

What about a blockchain?

The basic idea of a blockchain is to store information immutably, transparently, and traceable inside a duplicated and distributed ledger. The ledger consists of blocks, and every block is cryptographically connected to the previous block. Each block contains transactions that the participants of the blockchain beforehand validated.

Blockchain Concept

This article gives a high-level overview of the concept of a blockchain used for transactional systems but not a detailed step-by-step instruction about implementing the technology.
Furthermore, it shall help you decide whether your system or idea could use a blockchain approach.


Centralized Transaction Processing

In centralized transaction-based solutions, at least one central instance acts as a gate for decisions or manages essential parts of a process. Everyone interacting with it has to trust these middlemen.

Let's take an example.

You want to give $100 to Peter. To cash transfer the money from your bank account to the bank account of Peter, you have to utilize financial institutions, e.g., banks, to process the transferal. In this case, your bank and Peter's bank are middlemen, which means they are central instances of the process. Also, between both banks, there is another middleman, the clearinghouse, which establishes the trust between both banks.

Traditional Bank Transaction Process

Following, the steps of the process depicted above:

  1. You will instruct your bank (B1) to send $100 to Peter's bank account.
  2. B1 will first check whether you have at least $100 you can send.
  3. Next, B1 will tell the clearinghouse (C) to transfer $100 to Peter's bank account.
  4. C will take the $100 from B1, contact Peter's bank (B2), and move the money.
  5. (B2) will put the $100 into Peter's bank account.
  6. Peter finally got the $100.

The process perfectly shows that the banks are middlemen to you and Peter. And between the banks, the clearinghouse is the middlemen.
A lot of intermediaries, right?


Blockchain-based Transaction Processing

Let's see how the same process would work on the blockchain cryptocurrency Bitcoin:

Blockchain Transaction Process

Following, the steps of the process depicted above:

  1. First of all, all participating nodes must have the latest version of the ledger containing all blocks each containing transactions.
  2. You will now send one bitcoin to Peter utilizing a (transaction) node (A).
  3. A will verify whether you have one bitcoin that you can send and if everything is okay, it will bundle the transaction into a block.
  4. The miners (B, C) validate the transaction using algorithms (mining process).
  5. After all miners agree, the block will be put into the blockchain on the ledger and every node gets an update. Peter received one bitcoin from you.

As you can see in this process, no single entity is responsible; all nodes together validate and decide about the transaction based on cryptographic security and clearly defined methods.


Trust is key

A blockchain can substitute existing systems, but it has to, first of all, create trust. The participants need to trust the implementation of blockchain technology like they did it with the middleman concept.

Here is how blockchain creates trust:

Blockchain Trust

The next chapter describes the benefits mentioned above.


Benefits of a blockchain approach

Following, the most obvious benefits:

Redundancy

The ledger is duplicated and distributed to every participant. Also, each update will be synchronized to every copy of the ledger. Therefore, no one can delete the ledger.

Cryptography

A blockchain network self-organizes itself. It uses consensus algorithms and cryptography to secure transactions between multiple partners without the need for a trusted middleman in between.

Immutability

A blockchain records the blocks and their bundled transactions immutable by design. Once a block is attached to the ledger, it is cryptographically connected to the previous block. The nodes will immediately detect changes of blocks.

Traceability

Everyone with a copy of the ledger can verify which transaction happened at which time. The entire history of actions is recorded, not just a snapshot.

Transparency

Every transaction is processed the same defined way and is documented and validated by the nodes. Inside the ledger, all blocks are recorded and therefore visible to everyone.


Do you need a blockchain?

The following diagram shall help you to figure out whether your idea or system could be driven by a blockchain approach:

Do you need a blockchain


Real-live examples for blockchain solutions

The following diagram shows potential real-life solutions derived from the benefits a blockchain approach offers:

Real-life blockchain examples

For sure, the examples mentioned above are not collectively exhaustive. There are a lot more. But a reasonable solution should always take care of at least 2 or 3 of the benefits a blockchain approach offers. Otherwise, you do not need fully-fledged blockchain technology.


Summary

The worst thing you could do is create a blockchain system without a specific problem you are trying to solve, just because it is en vogue to have a solution in your product store. It is not just how you store data; it is about creating an ecosystem that self-organizes itself in a highly secure way. As always: think problem first, then solutions.

Photos on Unsplash

Top comments (0)