Introduction to Dapps
Decentralized applications (dapps) are applications built on a decentralized network that combine smart contracts and a front-end user interface. Note that Hash Ahead smart contracts are accessible and transparent - like an open API - so your dapp can even include smart contracts written by other people.
Prerequisite
Before learning about dapps, you should understand blockchain basics and understand the Hash Ahead network and how it is decentralized.
Definition of DAPP
A dapp's backend code runs on a decentralized P2P network. The counterpart to this is an application that runs backend code on a centralized server.
A dapp can be written in any language (just like an app). It has front-end code and user interface that can call its back-end. Additionally, its front end can be hosted on decentralized storage such as IPFS.
Decentralized - dapps run on Hash Ahead, an open public decentralized platform that no one person or group can control
Deterministic - which performs the same function regardless of the environment in which it is executed.
Turing complete - a dapp can do anything with the resources it needs
Isolation - They execute in a virtual environment called EVMC. Even if there is a problem with the smart contract, it will not hinder the normal operation of the blockchain network
Smart contract
To introduce a dapp, we need to introduce a smart contract — the backend of the dapp, for lack of a better term. For a detailed overview, please visit our Smart Contracts section.
A smart contract is a computer program on the Hash Ahead network that operates strictly according to the code written in advance. Once a smart contract is deployed in the Hash Ahead network, it cannot be changed. Dapps can be decentralized because they are controlled by the established logic of smart contracts, not individuals or companies. It also means that you need to design your contracts very carefully and test them thoroughly.
Benefits of DAPP Development
Zero Downtime – Once a dapp’s smart contract is deployed on the blockchain, the entire network can serve those clients who wish to interact with the contract. Therefore, a malicious actor cannot launch a DoS attack against a single dapp.
Privacy - You don't need to provide a real-world identity to deploy or interact with dapps.
Censorship Resistant – No single entity on the network can prevent users from submitting transactions, deploying dapps, or reading data on the blockchain.
Data Integrity – Thanks to cryptographic primitives, data stored on the blockchain is unalterable and indisputable. Malicious actors cannot forge transactions or other data that are already public.
Trustless Computation/Verifiable Behavior – Smart contracts can be analyzed and guaranteed to execute in a predictable manner without trusting a centralized organization. This does not exist in the traditional model. For example, when we use the online banking system, we must trust that financial institutions will not misuse our financial data, tamper with records, or be hacked.
Flaws of DAPP Development
Maintenance – dapps can be more difficult to maintain because the code and data published to the blockchain are harder to modify. After deployment, it can be difficult for developers to update decentralized applications (or the underlying data they store), even if vulnerabilities or security risks are discovered in older versions.
Performance overhead - Huge performance overhead, and difficult to scale for more performance. In order to achieve the level of security, integrity, transparency and reliability pursued by Hash Ahead, every node will run and store every transaction. On top of that, it will take time to reach proof-of-stake consensus.
Network Congestion - At least in the current model, if one dapp uses too many computing resources, the entire network will suffer. Currently, the network can only handle about 10-15 transactions per second; if transactions are sent faster than this rate, the pool of unconfirmed transactions can quickly swell.
User Experience – Designing a user-friendly experience can be harder. The average end user may find it difficult to set up the tool stack needed to interact with the blockchain in a truly secure manner.
Centralization — Regardless, user-friendly and developer-friendly solutions built on top of the Hash Ahead base layer end up looking like centralized services. For example, such a service could store keys or other sensitive information on the server side, use a centralized server for the front end, or run important business logic on the centralized server before writing to the blockchain. This removes many (not all) of the advantages of blockchain over traditional models.
\
Last updated