The Needs for A Decentralized Frontend

Decentralized applications (DApps) are applications that can be run autonomously, usually through the use of smart contracts, on decentralized computing, blockchains or other distributed ledger systems. The back-end code of Dapps runs on a decentralized peer-to-peer network. If we compare this to an application where the back-end code runs on a centralized server:

  • Decentralized: Dapps run on peer-to-peer networks such as on Ethereum, which are open public decentralized platforms that no one person or group can control.
  • Deterministic: Dapps perform the same function regardless of the environment in which they are executed.
  • Turing complete: Dapps can perform any operation given the required resources.
  • Isolated: Dapps are executed in a virtual environment called a virtual machine, so if there is an error in the smart contract, it does not prevent the blockchain network from functioning properly.

In that case, why would anyone say that the currently popular DApps are almost decentralized applications?

Considering the possible aspects of a decentralized application: back-end software, front-end software, data storage, message communication, name resolution, etc., most of the “decentralized applications” on the market today still run on centralized servers for their front-end development.

The centralized front end may be closed for various reasons:

  • Project abandoned
  • Distributed Denial of Service (DDOS attack)
  • Domain name DDOS / Malicious takeover
  • Other objective reasons

However, many users currently rely on the simplest way to interact with the smart contracts provided by the Dapp project. Without a complete understanding of the full Dapp specification, it is possible to experience access failures and even loss of assets.

Centralized front-end is common in DeFi applications

Many blockchain-based applications are now implementing core logic through smart contracts. DeFi, for example, needs to do this on-chain when applying fund interactions and making asset calls on games or NFT marketplaces.

Services executed through smart contracts are guaranteed to be decentralized, particularly resistant to censorship and the ability to provide ongoing business where any transaction can be executed securely. Those business will run on the blockchain in perpetuity.

However, unlike the general decentralization of the core logic, as mentioned before, the front-end presentation of the majority on-chain applications is still widely used in the form of mobile apps or web pages from the Web2 Internet era. Of course, in addition to assisting users in submitting transactions on the chain, there are some purely front-end functions and orientations: display different levels of interaction and functionality, data, icons, etc.

These front-end pages are still implemented through traditional internet architecture, which leads to this ‘centralised front-end’ pain point, and is vulnerable to regulation and attack.

One example is the decentralized exchange dYdX was disrupted for 9 hours on Dec 8, 2021 Monday afternoon to Tuesday morning due to a major outage of Amazon Web Services (AWS), Amazon’s cloud services network, which sparked a debate on decentralization.

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-88a3aqlX-1661494408866)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/56dcb51c49eb4ae9ada1abdd07f3ab35~tplv-k3u1fbpfcp-zoom-1.image)]

https://twitter.com/dYdX/status/1468293558360805381?s=20&t=8pzHcQXlbnDN5os8O44ZlQ

“It’s time to retire ‘decentralized finance’. We are not decentralized and the old school will continue to try to use it as a vehicle for their ‘attacks’. ‘Open finance’ or ‘web3 finance’ is probably the most accurate,” says Andre Cronje, founder of Yearn Finance ( YFI ).

Back in October last year, when Facebook (now Meta) and its associated app series went live, cryptocurrency advocates highlighted how decentralized apps would not be exposed to such issues. Now, users are reiterating that truly decentralized apps should not have such weaknesses.

For this part, dYdX acknowledges that “some parts of the exchange still rely on centralized services (in this case AWS)”, adding that they are “committed to complete decentralization”, which “remains one of our top priorities as we continue to iterate on the protocol.”

Likewise, even the strongest Cloudflare is not immune to service interruptions.

“On June 21, 2022, Cloudflare suffered an outage that affected traffic to 19 of our data centres. Unfortunately, these 19 locations handle a large portion of our global traffic.”

The incident led directly to access problems for millions of users worldwide.

Another problem facing the centralized front-end Dapp is the malicious attack, which took place on Aug 10, 2022. Curve Finance tweeted that they were under attack.
在这里插入图片描述

https://twitter.com/CurveFinance/status/1557104676830601216?s=20&t=W2PnCqQPZEduyFcYU3-wqQ

According to Web3 on-chain detective Zachxbt, thieves stole $570,000 in ETH and sent it to the FixedFloat cryptocurrency exchange for money laundering.

Such cases happen from time to time and, more importantly, can happen again at any time in the future.

Can the front-end be decentralized?

Certainly. However, due to the need to consider differences in ‘compatibility’ with the current Internet architecture, a small number of centralized services will be introduced to achieve a better user experience. However, as the infrastructure continues to be upgraded, a ‘fully decentralized front-end’ and a ‘better user experience’ is possible.

How to decentralize the Front-end

The vast majority of products we use in the Web2 era fit this definition. Decentralization, on the other hand, is the distribution of control to multiple nodes or entities. In other words, decentralization is defined in terms of control of data.

The definition of distributed is broader. There are now two definitions right now:

The first is defined in terms of the geographical distribution of the servers. A distributed network is defined as long as the data storage and transmission servers are located in different places. A decentralised network must have distributed servers, but a distributed network is not the same as decentralised data ownership and computing power.

AWS, for example, has servers located all over the world and people can transfer files between devices via AWS, but the whole system is managed by a centralised company, Amazon, and if Amazon decides to shut down the AWS business, the data stored in it will disappear.

The second definition continues to be defined in terms of control of the data. In this definition, distributed is a super-ideal state that goes further than decentralisation, where information ownership and arithmetic power are equally distributed among all nodes in the network.

The diagram below explains more graphically the definitions of centralised, decentralised and distributed from the perspective of data control.

  • Centralisation is where one central node controls all other nodes.

  • Decentralised is where multiple nodes share control, with each node having control over a portion of the data.

  • Distributed is where all nodes are interlocked and no node has control over any other node.
    在这里插入图片描述

IPFS

The Interplanetary File System (IPFS) is a decentralized content-addressable storage system that distributes stored objects between peer points in a P2P network. “Content addressable” means that each piece of content (file) is hashed and the hash is used to identify the file. You can then retrieve any file from any IPFS node via its hash request.

IPFS is designed to replace HTTP as the preferred protocol for delivering web applications. Instead of storing web applications on a single server, files are stored on IPFS and can be retrieved from any IPFS node.

The IPFS transport protocol, in which the blockchain records all actions on the chain, cannot be deleted or changed, will become increasingly bloated over time and is not suitable for the storage of large amounts of data. IPFS, on the other hand, looks to reduce duplicate storage of large amounts of data and rationalise the use of resources through content addressing and de-duplication mechanisms.

HTTP is a typical client-server model, where we receive a file from a friend on a network drive. HTTP is a mechanism for finding content by location.

As a typical centralised and plaintext transfer protocol, HTTP has obvious disadvantages - the data stored on centralised servers is very vulnerable to surveillance, leakage and tampering.

When the server crashes, the entire web service crashes and the high cost of storage makes it necessary to constantly delete old data to make room for new data. The domain name attack on Curve Finance was also due to the limitations of HTTP.
在这里插入图片描述

The solution proposed by IPFS is to replace domain-based addresses with content-based addresses and, similar to the blockchain, each client becomes its own server node.

Each node that joins the IPFS protocol provides a portion of the storage space. When a node uploads a file to the IPFS network, the file is assigned a unique hash value based on its content and a version history is tracked for each file. Redundant duplicate files are removed if there are already files with the same hash value in the system.

For more information on IPFS, please visit https://ipfs.io.

4EVERLAND

Decentralized hosting

4EVERLAND Hosting provides a complete decentralized front-end hosting solution that allows developers to quickly deploy web application resources as Dapps to decentralized networks including IPFS using a visual interface or command line (@4everland/cli), and all 4EVERLAND nodes and gateways can provide persistent storage for DWeb and all gateways can provide DWeb access acceleration.

Decentralized domain names and domain name resolution

A traditional domain name is the ability to provide access to a service, however, this access function is fully managed and maintained centrally by ICANN. A ‘decentralized domain name’ service, on the other hand, is a domain name that runs entirely within a decentralized network, allowing anyone to register a domain name fairly and without censorship. Currently the most widely used is the ‘Ethereum Domain Name Service’ (ENS) running on the Ethereum network. Where ENS domain name registration, registration information, change information, renewal and other operations are implemented through smart contracts on Ethereum. Firstly, 4EVERLAND provides users with a free domain name, configured with DDNS by default, through which they can access the hosted decentralized pages. At the same time, 4EVERLAND supports custom DNS or ENS settings to enable domain decentralization.

For more information on 4EVERLAND, please visit https://4everland.org.

Join the 4EVERLAND community:

Website | Twitter | Telegram | Discord | Reddit | Medium| Email

猜你喜欢

转载自blog.csdn.net/MDJS_OSOS/article/details/126542512