DApp is an application that runs on top of a blockchain that combines a smart control and a frontend user interface. Don´t worry if you don't completely understand this concept, because in today's snippet, we are going to explain blockchain and its evolutions, as well as introduce DApps and their wider industry implications.
What is a Blockchain?
First, we need to understand what a blockchain is. Let's break it in two words: block and chain.
- "Blocks" are immutable data that are stored sequentially.
- "Chains" refers to each block being cryptographically linked to its parent.
So putting these together, a blockchain is a growing list of blocks that are linked cryptographically, and these blocks are shared across many computers in a network.
You may be wondering how a new block is added to the chain, so let’s clarify this.
Every node (machine) on the network must be agreed upon by every new block, and this agreement comes through a consensus mechanism. There are different consensus mechanisms that follow different principles. The two most commonly used are Proof of Work (POW) and Proof of Stake (POS). Once the new block is approved by the consensus mechanism, it is appended in every node in the network so that all have the same copy of the blockchain.
Now that we have learned what a blockchain is and how it works, let's take a look at how it has been evolving from its first iteration through the implementation of DApps.
Blockchain 1.0: Currency
The first use case of blockchain was cryptocurrency, which allows financial transactions based on blockchain technology. The most famous example is Bitcoin, which was invented in 2008 by Satoshi Nakamoto.
Blockchain 2.0: Smart Contract
A smart contract contains code that lives on blockchain, and it is executed when pre-determined terms and conditions are met. For instance, you can create a smart contract for e-commerce that releases the payment of a transaction when the user confirms the receipt of the product.
Ethereum Blockchain is the most prominent in this field, allowing the implementation of Smart Contracts using the programming language Solidity. Unlike Bitcoin, which stores a number, Ethereum stores executable code.
Below is an example of a "Hello World" contract written in Solidity.
Blockchain 3.0: DApps
The next generation of blockchain came with the decentralized application (DApp), which combines a smart contract and a frontend user interface. It is possible to host both the frontend and backend on top of decentralized networks like Ethereum.
There are several advantages of decentralized applications over centralized applications. These include: zero downtime, improved privacy, resistance to censorship (since no single entity controls the network), complete data integrity, and trustless computation.
On the other hand, there are a few drawbacks to developing DApps. For example, maintaining DApps is harder since it's difficult to update/modify code and data published to the blockchain. Scalability is also harder because every node runs and stores every transaction to achieve a high level of security, integrity, transparency, and reliability.
DApps are a new and disruptive way to create distributed applications that run in a distributed network. There are many advantages to DApps, but they also present new challenges since they are harder to maintain and scale.
The next phase of blockchain (4.0) is to apply the concepts discussed above to business demands. Consequently, we'll likely see the demand for blockchain knowledge increasing in multiple industries and arenas, such as finance, supply chains, insurance, digital identities, land registries, governments, and more.
Do you have experience creating DApps? Which challenges and opportunities did you discover? Tell us about it below!
Ethereum: Introduction to DApps
Unibright.io, Medium: Blockchain evolution: from 1.0 to 4.0
Grant Bartel, freeCodeCamp: What is a Dapp? A Guide to Ethereum Dapps
Otavio Siste is a Software Engineer at Avenue Code. He brings more than ten years of experience in the field and is passionate about learning and sharing knowledge. In his free time, he enjoys swimming, reading Russian literature, and spending time with family and friends.