What is a Decentralized Application (DApp)?
A decentralized application (short for DApp) is a set of smart contracts that are visualized on a Front-end and run on top of a peer to peer network. So the Front-end could be a website and consists of HTML, CSS and JS code. The backend consists of smart contracts written in solidity for example. Our DApp could run on top of the Ethereum blockchain because it is a peer-to-peer network. And because decentralized applications use the Blockchain technology they are not controlled by any central authority. This means we do not need a central server for our DApp.
Criteria of Decentralized Applications
A DApp connects users directly with each other. An example would be a decentralized Facebook account. So if we post a message, it will be written on the blockchain and can’t be deleted. Thus, not even the developer of the DApp can delete it. So there is not a fixed definition of a decentralized application. The reason for this is the newness of the DApp concept. But we can characterize it.
1. Blockchain as a criteria
The following example will help you understand how DApps work. Now imagine a car company. They negotiate with a tire producer for a new contract. So they write down documents such as Global Agreements (GVA), Data Protection Agreements (DPA) or the Service Level Agreement (SLA). As you can see, there are a lot of policies and contracts. So this often causes problems during the negotiations of the contract. Thus, it can take several months and cause high costs. We will now discuss three main issues in more detail. So let’s compare the car company example with a DApp.
Not transparent: There is no overview because of the large number of documents and versions.
No security: Third parties can easily access the documents sent by e-mails.
No trust: You can’t be sure that somebody changes the final document.
Comparison with a DApp
We can solve this problem easily with a DApp. Ethereum provides the basis. It is similar to Dropbox. So multiple parties can work on one document at the same time. The files are unlike Dropbox not on a central server. They have archived all Pc´s of all parties. So this allows us to prevent unauthorized persons from changing the files or making unnoticed changes.
Therefore, Ethereum can solve the main problems described before:
Transparent: All parties can work on the same documents.
Security: The documents are only available in the blockchain and stored in encrypted form.
Trust: A hash is generated for each file. We trust the system because the files can not be changed unnoticed.
Now we can use a DApp to provide more control and security for everybody.
2. Open Source as a criterion
I am sure you’ve read the term “open source software” before. The software has a freely accessible source code. So we can control the behavior of the software. As a result, everyone has the opportunity to look into the software and reprogram it.
So our DApp also has an open source code. This works independently. So there is no central instance. Thus, there is no admin who decides the future development. As a result, our DApp has to adapt to changes or market reactions. Only selected developers have access to the source code. So the code can only be changed by the owner of a token.
3. Tokens as a criterion
A token is a digital unit. This unit represents a copy of a data set on a blockchain. The word token can have several meanings and therefore can fulfill several functions. So it depends on the context in which we use it.
4. Encryption of the tokens and why we need them
Miners want a reward for their effort. Therefore, DApps must use a mechanism to generate crypto tokens.
So with the help of the proof-of-work algorithm, we can create these tokens.
The 3 types of Decentralized Applications
There are three classes of DApps:
Type 1: DApps that operate on their own blockchain
Type 2: DApps that use a type 1 blockchain
And type 3: If we use a protocol (source code) of type 2
So these three types build on each other logically. As an example, let’s use Ether. It meets all four criteria of a DApp. So it is open-source and has its own blockchain. It uses crypto tokens and can generate them.
Thus, Ethereum offers smart contracts. We use them to set certain conditions. So with the help of them, it is possible to create DApps. They are for example Azure, Golem or Fun Fair. All examples are assigned to type 2. Type 3 is an App that uses the Azure infrastructure.
How do Decentralized Applications work?
We can offer our own DApp’s through smart contracts. They are based on Ethereum.
The DApp works as a tool and the smart contract as an instance. Therefore, it allows us to connect to the blockchain.
Let’s explain it with an easy example. Websites usually use programming languages such as HTML, Java or CSS to display a page. So we need data from a database to use an API. When you visit Facebook, the site will call an API. It then shows your information.
DApps work similar to these websites. So the key difference is that no API is connected to a database. Instead, you have a smart contract connected to a blockchain.
“Complete Guide: Decentralized Applications explained” – Summarized:
- DApps run on a peer-to-peer network.
- Criteria are: blockchain, open source, token encryption, token generation.
- Tokens reward miners.
- So there are three different types of DApps.
- Smart Contracts are connected to a blockchain.
- So it forms the basis of decentralized applications.