What is a DApp or decentralized application?

A decentralized application, more commonly called a dApp, is a software application whose operation is (partially or totally) distributed and replicated among a set of multiple actors. It is generally based on one or more smart contracts running on one or more blockchains.

Decentralized applications are opposed to centralized applications. The monetary use of Bitcoin, which can be considered as a decentralized application, contrasts in this way with the management of the euro by the banking system and the European Central Bank. Decentralized lending applications such as Maker or Compound are opposed to credit organizations. There are distributed social networks whose value proposition is to resist censorship such as Hive, Voice or Memo.cash, and which therefore differ from platforms such as Facebook or Twitter. The video hosting platform LBRY competes with Youtube.

The problem of centralized applications

centralized applications

To understand how a DApp works, you must first understand how a classic centralized application works. This way, it will be easier to understand the advantages of a decentralized application.

At the beginning of the computer age, applications were systematically installed directly on your computer. They were, for example, games or programs like Microsoft Word. Later, with the advent of the Internet, it became possible to use applications remotely, without them having to be installed on your machine. But with this advantage came a major flaw: each of these applications was centralized on a third-party server.

One of the problems with centralization is that your personal data does not necessarily belong to you. For example, Facebook can know exactly what your interests are, owns your photos, knows where you travel thanks to geolocation, knows your age, etc. You’ll have to trust Facebook to keep your information private. And as the Cambridge Analytica scandal proved, entrusting so much personal data to a third party such as Facebook is generally a bad idea, given the risks of information leaks, whether these leaks are accidental or not.

Another problem with centralized applications is the way they work. Indeed, a centralized application that can be used over the Internet must be hosted on one or more servers. These servers have IP addresses that can be identified to be traced back to their location or attempt to penetrate them through computer vulnerabilities. If a person with bad intentions decides to attack these servers, the application may no longer work.

One last problem that still needs to be raised, and not the least, is that the owner of a centralized application can do whatever he wants. For example, he can refuse to allow someone to use his services simply because the person in question has done something he doesn’t like. This is already regularly the case with YouTube, which can decide that a video with political ideas different from its own is not allowed on its network.

It is for these reasons that decentralized applications were imagined.

What is a decentralized application? (dApp)

A decentralized application, or DApp, is an application whose operation is, at least in part, distributed and replicated over a network of diverse actors. A DApp can be set up in many ways, but it is often based on a chain of blocks, a register that is reputed to be tamper-proof. According to Andreas Antonopoulos, a decentralized application generally includes :

  • One or more autonomous contracts (smart contracts) that run on a blockchain (or even several).
  • A transparent user interface.
  • A distributed data storage model.
  • A peer-to-peer message communication protocol.
  • A decentralized name resolution system.

Not all of these elements need to be present, nor do they need to be decentralized to the maximum extent for a decentralized application.

decentralized applications dapp

 

Smart contracts and DApps

The cornerstone of a DApp is the smart contract(s) on which it is based. These standalone contracts are computer programs whose execution does not depend on a trusted third party, and which are automatically activated when certain conditions are met on the blockchain on which they are hosted. Most often, they are coded to be hosted on a specialized platform such as Ethereum, Tezos, Cardano or EOS. Nevertheless, a contract can also be registered in its own channel as it is the case for Hive or for Lisk’s sidechains.

The main advantage of “smart” contracts is to remove the intermediary who validates the shares. Moreover, since all the operations carried out within a contract are registered in the blockchain, it will be possible to easily find the history of the conditions under which they were carried out.

Secondly, another significant advantage of a smart contract is its cost: carrying out transactions using this technology is relatively cheap, fast and secure. This means that in certain professional areas, it allows for enormous savings compared to a traditional company that does not use these programs.

Once deployed on the chain, the terms of a stand-alone contract cannot be changed. However, some contracts are often not very decentralized: the author of a contract can, for example, code a function to freeze the application’s funds, censor a user or simply destroy the contract. So be careful: smart contract is not synonymous with total disintermediation.

The DApps user interface

A DApp is often equated with the smart contract on which it is based, but a DApp is often much more than that contract. Indeed, for a user to interact with a smart contract, an interface is often required.

The interface is usually set up within a website (usually centralized) that bridges the gap between the smart contract and the software the user is using. Thus, on Ethereum, the website will provide an Application Binary Interface (ABI) so that a portfolio such as Metamask or MyEtherWallet can understand what can be done with the program. A JavaScript library generally used to implement this type of interface is web3.js.

Data management

Although it is quite possible to store DApp data on the block string used, it is sometimes necessary to use a cheaper method to host the files related to the application. Among these methods are :

  • IPFS (InterPlanetary File System).
  • Swarm, created by the Ethereum Foundation.
  • WebTorrent.

The idea behind these methods is to host files on a peer-to-peer network, as BitTorrent does for file sharing in particular. Each file has a unique identifier (obtained by a hash) that allows to find it. Thus, if a host decides to delete the file for one reason or another, the user will theoretically be able to access it via another host.

In addition to these three elements, it is also possible to decentralize the communication of messages, as for example with the Whisper protocol for Ethereum, and the resolution of domain names, of which Ethereum Name Service (ENS) is the purest incarnation.

The different categories of DApps

Existing decentralized applications can be classified into 3 different categories :

  1. DApps that have their own blockchain. For example, Bitcoin and Ethereum can be considered as DApps: Bitcoin is a monetary system independent from the banking system, and Ethereum is a decentralized global computer. Ethereum could be compared to operating systems like Windows, macOS, or Linux Ubuntu.

  2. DApps that use the blockchain of DApps from the first category to run. For example, Leeroy, a Twitter equivalent that uses the Ethereum blockchain, or Hive, a blogging/information system similar to Medium.

  3. dApps that use a second layer protocol in combination to work. For example, SAFE Network uses Omni and issues its own tokens called safe coins for its operation.

What are the advantages of DApps?

A decentralized application has certain advantages that characterize it:

  • Resilience.
    Unless an exception is made, a DApp never stops working. This means that there is never a downtime and never a maintenance period that can affect the user.

  • Transparency.
    Anyone can inspect the code, which is obviously open-source: this guarantees certain security if the application has been running for a long time. Besides, all interactions with the standalone contract(s) are publicly recorded, which facilitates legal recourse in a dispute between two users.

  • Resistance to censorship.
    Unless an exception is made, a DApp is by definition resistant to censorship, in the sense that it is difficult, even for its creators, to prevent an action from occurring. This is particularly beneficial for social networks, which have, in recent years, experienced massive episodes of banning and censorship of content creators who do not respect political correctness or have extreme ideas.

  • Cost reduction.
    Typically, each time a DApp is used, a fee is levied to pay for validators’ activity. These fees are usually minimal. Consequently, in some industries where intermediaries’ cost is high, this can save money by eliminating intermediaries.

  • Users’ personal data does not belong to a company that can choose to do what it wants with it unilaterally. Typically, it is held only by the users of the DApps.

What are the weaknesses of DApps?

Conversely, DApps can also have some disadvantages that are not found in traditional centralized applications:

  • Decentralized applications can be quite slow, especially when the network running them is saturated or is not designed for speed.
  • For DApps that require many actions to be performed and whose classical intermediaries have a low cost, this can become more expensive than using a classical centralized application.
  • The blockchain prevents the interruption of a DApp’s operation. The only way to make a DApp stop working would be to completely shut down the network or introduce an upgrade that prevents the DApp from working.
  • User interfaces are usually not as pleasant as in a traditional application.
  • Specific knowledge is required to be able to program them. For example, if you want to create a decentralized application on the Ethereum network, you will have to master the Solidity programming language.

Conclusion on DApps

The development of decentralized applications is slowly starting to take hold and is attracting more and more programmers. As the popularity of the blockchain grows, the appeal of centralized applications will become less and less important.

DApps enable value creation. The fact that they eliminate an intermediary makes them attractive from a financial point of view. In addition to reducing certain costs for users, they also increase security.

Apart from Cryptocurrency, the adoption of the blockchain in finance and other sectors increases the interest in creating DApps. Eventually, they will undoubtedly be customizable and will adapt to all the activities for which they will be of interest.

For now, however, we must recognize that traditional web applications are more accessible and easier to use for people, while offering broader functionality. It is therefore important to closely follow the evolution of this sector to know what the future holds for it.