What are dApps?
dApps or decentralized apps are applications that run on a p2p network of computers or blockchain, unlike regular apps that run on a single server. One cannot easily differentiate a regular centralized application from a dApp. The only giveaway is that dApps require a token for login and are usually slower than traditional apps. Some dApps that run on the Ethereum blockchain network are Uniswap, Compound, and Audius.
How are dApps better?
No downtime: Centralized apps can be temporarily suspended in case of a functional issue or to enforce an update. However, that’s not the case with decentralized apps. dApps run on a distributed network of computers or nodes. All the nodes/computers need to be faulty or shut down simultaneously to impact the working of a decentralized application. And that’s a rare possibility.
No intermediaries: Centralized apps require an intermediary to facilitate the transaction between two entities. Take banking apps, for example. There’s a customer and a merchant. The customer has to pay money to the merchant online. To do so, the customer approaches the intermediary (the bank), who sends the money to the merchant by charging a fee. On the other hand, dApps work on smart contracts—an agreement between two entities written in code that runs once specific conditions are met. Smart contracts replace intermediaries and facilitate peer-to-peer transactions by charging a nominal fee.
Open-source code: The logic of dApps, which is written in the smart contracts, is visible to everyone on the blockchain network. And as the codebase is visible to everyone, it can be continuously reviewed and improved, making the dApp better over time.
Relief to regulation concerns: Centralized applications are bound to follow the regulations of their country, the platform they’re publishing the app on, and other terms. A violation can lead to legal issues.
However, there isn’t any central authority for censorship in decentralized apps, and neither are dApps answerable to a central authority like the bank or the government. In short, users will be responsible for regulatory or legal implications for the content they consume or share. And no powerful entity can maneuver the users/data the way they want, offering relief to developers and users from regulation concerns.
Users will be responsible for regulatory or legal implications for the content they consume or share.
How to create a decentralized application?
While the actual process of creating a decentralized app is complex, here’s a general overview
Building smart contracts: The first step is writing the logic in smart contracts. It’s a way of dictating what the app will do automatically, relying entirely on the chain consensus. It can include anything from basic transactions to computational algorithms.
Front-end: Designing the user interface for a dApp is not much different from a centralized application. Although the user action will trigger functions on the smart contracts residing on a blockchain, it shouldn’t affect how the application looks. However, one thing to remember is that as blockchain is involved, actions will take some time to confirm or process. Therefore, a developer must add animations wherever required for the users to know that their action is processing.
Back-end: While the purpose here is to create a decentralized application, one may need the help of centralized servers based on their needs. For instance, a private server would be necessary if an application requires massive data storage or functions that cannot be performed on-chain, such as time-bound transactions.
Supporting smart contracts with dApps
Decentralized apps or dApps exist on decentralized ledgers that support smart contracts (not bitcoin). Such apps have numerous advantages over traditional ones like no technical downtime, no intermediaries, open-source code, and most importantly, relief from strict regulations.
However, the advantages bring equal risk. For instance, because of the lack of an intermediary, malicious content can exist on the blockchain, and an open-source code can make smart contracts a ripe target for hackers.