app vs dapps

What are Dapps and What are their Advantages?

Everything that can be decentralized, will be decentralized.

——David A. Johnston

We all know what an App is, but what is a DApp? Put simply, D is an abbreviation for decentralization, therefore a DApp is an App that is decentralized.

When we usually talk or think about an App we think about a mobile app. A mobile or web App cannot work independently, all data exchange, functional operations, and support must be provided through a centralized database. The apps that users download and use is just the user interface of this database.

A DApp manages public and private keys and corresponding addresses locally (mobile or PC). Among them, the private key generates a public key, and the public key generates an address. Many DApps also use mnemonics to generate seeds, generate private keys from the seeds, private keys then generate public keys, and public keys generate addresses. Mnemonics are used more now because they can theoretically generate countless public and private key pairs through the same set of mnemonics.

For accounts on the blockchain that can be used for transactions, this mnemonic method is very useful, and a group of mnemonic words can generate countless addresses. If the user’s mobile phone is damaged or lost, they can download the DApp on another mobile phone and restore all previous addresses through mnemonic words. On the contrary, if a user is required to back up a public-private key pair themselves, if they have countless public-private key pairs, the user will have to back up countless times, which is very inconvenient.

Data in an App is not stored locally, it is created and stored in a centralized database. If the database of the App is designed according to information security standards, the user’s password is not stored in the centralized database, but in the user’s brain. Every time the user enters, they rely on their memory to input the correct password. The centralized database stores the hash value corresponding to the user password, and the original text of the user password cannot be deduced based on the hash value.

But DApp public and private keys are stored locally, not in the database. DApp, however, does have a centralized part, the backend, but this centralized part only serves as a channel that transmits each transaction initiated by the user and the transaction data signed by the private key managed by the user to the chain. At the same time, the balance corresponding to the user’s wallet address can also be read through the database interface. This is the so-called light wallet function (Simplified Payment Verification).

If some users feel uncomfortable because of the centralized back-end, they can also install a complete wallet. This wallet will download the data of the entire block on the chain, and of course, also manage the user’s address as well as public and private key pairs. Then users do not rely on any centralized backend, but can use their own wallet code to interact with the data on the chain.

At present, many decentralized applications have adopted a hybrid architecture. In other words, DApps today usually use a hybrid architecture. The backend of these DApps has a centralized part and a decentralized part. The centralized part can realize the business logic of many applications, and the decentralized part can help users write some requested data to the chain and store certificates, so as to achieve the purpose of tamper-proof and public data.

What are the advantages of DApps?

Another very powerful feature of the hybrid architecture is settlements. Transactions can be settled directly on the chain because this chain has the functions of cryptocurrency and smart contracts. This settlement can be triggered by a centralized database. After the trigger, the smart contract on the chain will be automatically executed, thus ensuring that the transaction data is not centralized and cannot be tampered with. The settlement result can be quickly checked on the chain.

As mentioned earlier, the centralized backend is not very controllable, which means that it is controlled by a third party – not by the user. Therefore, the hybrid architecture is more reliable and more efficient in settlement than pure centralized solutions. This increased reliability is reflected in the transaction data on the chain, which you can query and verify. High efficiency can be done automatically on the chain. This is an advantage of the hybrid architecture. Data can also be trusted 100% by users.

But why do DApps need a centralized backend? The centralized database allows the user’s wallet to avoid downloading data blocks from the blockchain. Because the data on the chain is growing every day, this problem is solved by the centralized database, and the upper layer business logic can be executed at the same time. In addition, the data that does not need to be on the chain is stored in the centralized database. Making decentralized architecture more efficient and convenient for all users.