What Is a dApp?

A Step-by-Step Guide to Ethereum-based Applications

By: Rahul Nambiampurath Loading...

What Is a dApp?

A decentralized application (dApp) is software program hosted on a blockchain network and run by a smart contract. Unlike regular apps one uses on a mobile phone or a laptop, dApps are powered by multiple servers.

That’s because a blockchain network runs across hundreds or thousands of nodes. This decentralization feature makes dApps highly resistant to censorship or tampering.

Narrowing the Scope of dApps

Decentralization to spread processing chores among multiple computers is not new. Any computer network that relies on a couple of corporate servers runs the risk of getting shut down. This leaves users highly dependent on systems with a central point of failure.

What Is TVL?

What Is TVL?

A Step-by-Step Guide to a Key Metric in DeFi

The Defiant The Defiant

This problem became acute when the internet’s broadband infrastructure expanded and allowed users to download ever larger files. If a company hosted such files and went out of business or removed them because it was too expensive to maintain data traffic drain users lost access to the files.

In the early 2000s, developers introduced torrent files to address this problem. Bram Cohen’s BitTorrent was the first decentralized app that popularized peer-to-peer file sharing. With the use of trackers, torrents fragment files, allowing anyone to host them on the internet, no matter their size.

Source: Wiley Online Library

Bitcoin is the first such dApp as we know the term today. As an open-source, peer-to-peer network, anyone can join it and run a node to receive rewards for the upkeep. Like torrent P2P networks, the nodes share files. Yet because of the way blockchains work, Bitcoin’s P2P network transforms those data bits into sound money.

Bitcoin is just one type of dApp. Bitcoin’s smart contract is laser-focused on delivering sound money. While this can be expanded with an add-on network like Stacks, it is still limited in scope.

Most dApps refer to applications running on Proof of Stake blockchains, which are specifically designed for easy deployment of smart contracts.

DApps have to satisfy the following criteria:

  • dApps’ smart contracts have to be embedded within a public blockchain network, including their execution.
  • dApps have to be open-source, so they can be publicly audited. Moreover, so that blockchain token holders get a vote on upgrading dApps, and that change is publicly visible. This is the baseline for a trustless blockchain network.
  • dApps have to be monetized with the blockchain’s native cryptocurrency. Such tokens both validate the dApp’s smart contract and use tokens for executing smart contracts to perform functions. For example, trading NFTs, depositing a collateral for a loan, or depositing tokens into a liquidity pool for token swaps.

You may have noticed the differentiation between dApps and smart contracts. This important because dApps are the front-end of smart contracts or their web interface.

What Was Terra?

What Was Terra?

The $60B Fall of Terra Worsened the Bear Market and Undermined DeFi

The Defiant The Defiant

Case in point: When the U.S. government’s Office of Foreign Assets Control (OFAC) sanctioned Tornado Cash dApp, its original link could no longer be recalled —

That’s because the actual web interface (UI) was hosted by a company that had to conform to the government edict or their employees risked prosecution. But the Tornado Cash smart contract was running the entire time. Why?

Tornado Cash Demonstrates dApp Infrastructure

The answer: it was embedded in the Ethereum network. Blockchains are composed of ever growing that host smart contracts.

It is not possible to prevent a specific data block from joining the chain unless the entire network is shut down. This means that Tornado Cash smart contract had to be reconnected to a new, decentralized web UI to resume function.

This was attempted with the Interplanetary File System (IPFS), which is a peer-to-peer network for storing data. Although IPFS itself is not tokenized as a base layer, it is complemented with a Filecoin protocol that monetizes it. Nonetheless, IPFS relies on RPCs.

Both Infura and Alchemy complied with OFAC’s demand to ban open-source code.

Remote Procedure Call (RPC) communicates with one software layer, such as smart contracts and UI. RPC does this by calling a code to be executed on another server without having to specify that the subroutine is remote, or the network’s details on that server.

In other words, RPC calls other subroutines on other systems as if it operates in a local system. For distributed systems that underpin Web3, this is a critical cog of the infrastructure. For example, this is Infura’s selling point on their website:

Source: Infura

From this example, we can clearly see that dApps work by:

  • Using front-end code to create a user-friendly web page interface (UI).
  • This front-end code has to be tied to the smart contract itself to be conveniently accessible.
  • If the mediating infrastructure that ties the front-end and back-end (smart contract) is also not decentralized, dApps can be easily shut down.

Another way to look at dApps is as accessible links that connect web visuals to a coded logic stored on a blockchain. Technically, a dApp’s smart contract could be accessed manually, but this is out of reach for the vast majority of people.

Moreover, because dApps require pooled resources to function, they would be rendered useless. For instance, if traders could no longer deposit tokens into Uniswap’s liquidity pools via web interfaces for yield farming, the entire protocol would die off, despite all the liquidity pools’ smart contracts remaining functional.

Series Disclaimer:

This series article is intended for general guidance and information purposes only for beginners participating in cryptocurrencies and DeFi. The contents of this article are not to be construed as legal, business, investment, or tax advice. You should consult with your advisors for all legal, business, investment, and tax implications and advice. The Defiant is not responsible for any lost funds. Please use your best judgment and practice due diligence before interacting with smart contracts.