From Encryption Kitties to Fomo 3D, do you really understand "decentralized applications"?
袁辉腾
2018-09-25 11:24
本文约5072字,阅读全文需要约20分钟
This article will give you a comprehensive understanding of the entire ecological structure of DApps.

At present, cryptocurrencies such as Bitcoin based on blockchain technology continue to heat up and attract many investors to enter the market. While gaining popularity with features such as peer-to-peer technology and distributed ledgers, it also provides building blocks for creating new applications.Take blockchain games as an example, from CryptoKitties, which caused congestion on the Ethereum network last year, to Fomo 3D, which is currently tempted by huge bonuses, these two products that are highly sought after by players are decentralized applications based on blockchain, which is what we often say "DApps". In addition to games, as a new concept in the industry, DApps have received widespread attention, and more and more applications have begun to appear in different industries.

secondary title

What are decentralized applications (DApps)?

according to

according toWikipediaDefinition, “A decentralized application is an application run by many users on a distributed network without trust protocols. It aims to reduceSingle Point of Failure (SPOF)At the same time, tokens are usually used to reward users who provide computing power. "

To better understand this definition, we first understandtraditional web applicationfunctions, comparing its similarities and differences with DApps.

and HTMLCSSandJavascriptto render the page. Additionally, it requires the use ofApplication Programming Interface (API)Retrieve relevant information from the database. When a user visits a web page, the page obtains personal data by calling the relevant API and displays it on the page. That is, the front end - API - database.

There are many problems with traditional web applications. First of all, such application servers are hosted by a centralized service provider, which may cause a single point of failure (SPOF) when they are maliciously attacked; Can. Therefore, the data information in the application is more vulnerable to attack.

orSwarmorIPFSWait for the decentralized storage method. But unlike traditional applications, the front end is not an API that connects to a database, but connects to the blockchain through a smart contract. That is, the front end-smart contract-block chain.

At present, most of the applications in the application market are centralized.Take Alipay as an example, After the user purchases the product on Tmall Mall, he needs to pay to Alipay, and the seller will deliver the goods after receiving the purchase information. After the user confirms the receipt of the goods, Alipay will send the specific payment to the seller. Among them, Alipay is a centralized application that gathers all the data information of all sellers and buyers. In other words, although Alipay has millions of front-end users, the back-end is still absolutely controlled by the central organization.

secondary title

What are the characteristics of DApps?

Combining the relatively successful DApps in the current application market, it can be found that compared with traditional centralized applications, DApps based on blockchain technology have the following characteristics, and become their core advantages to occupy a place in mobile applications.

open source

consensus mechanism

consensus mechanism

Before the introduction of cryptocurrencies such as Bitcoin, any effective transaction relied on a certain degree of centralized institutions, and a transaction needed to be processed through a clearing house that supervised it. DApps run on a peer-to-peer or blockchain network, which means that any node can be connected to each other. In the DApps application, various transactions are processed based on the consensus mechanism. When a majority of nodes approve the transaction, it is confirmed and processed. In addition, validators in the network will also receive a certain number of encrypted tokens as rewards.

no central point of failure

Since DApps are decentralized and not dependent on a single server, there is no central point of failure. DApps allow the data stored in them to be distributed to various nodes, which are independent of each other. When one of the nodes fails, the other nodes will not be affected and normal operation can be guaranteed.IPFS (Interplanetary File System)andandIndependent DHT (Distributed Hash Table)secondary title

What types of DApps can be divided into?

Take Ethereum DApps as an example. Ethereum plans to provide an underlying platform for building DApps, allowing any developer to write smart contracts and DApps. In these applications, it is possible to create arbitrary rules for ownership, transaction formats, and state transition functions. In general, DApps can be divided into the following three categories.

Financial Blockchain Applications

As the name suggests, this category is based on decentralized applications,Provide users with the means to manage their financial assets. Bitcoin, for example, provides users with a decentralized currency system.

Since there is no centralized network of control, no one institution can control all the funds of users in the application. Rights and regulatory responsibilities are the responsibility of all users based on a consensus mechanism, and users are the owners of funds in these applications. In addition to Bitcoin, various altcoins on the market also fall into this category.

Semi-financial blockchain applications

This category is a mixture of user funds and various data information with the help of blockchain technology. Take the example of an insurance app that allows users to apply for compensation or a refund when a flight is delayed; ICO (Initial Coin Offering) is also a semi-financial blockchain application, which is a financing mechanism similar to an IPO . The difference is that it replaces fiat currency with cryptocurrency. The project initiator issues and sells the initial encrypted tokens generated by the project through blockchain technology, raises common encrypted tokens or legal tenders such as Bitcoin and Ethereum, and raises project development funds.

ICO DApps apply technologies such as the ERC20 token standard and are easy to build. Much of the app's functionality is to allow investors to send funds to smart contracts in the form of digital currency. This smart contract stores funds and shares the equivalent value in the form of new tokens at a later point in time.

Fully decentralized application

It is reported thatIt is reported thatsecondary title

What is the nature of DApps?

To judge whether an application is a DApp, the following four basic elements must be met:

  • Applications should be open source and run in an autonomous manner. Any centralized single authority cannot control most tokens of the application. For proposed future upgrades and market feedback, DApps must abide by the rules applied by them in the consensus mechanism. All changes in the application must be decided by consensus of system users.

  • The application's data and records of operations must be stored on a decentralized public blockchain. Additionally, all information stored on the blockchain must be encrypted.

  • The application must use cryptocurrency (Bitcoin or its own token). At the same time, certain token rewards are given to miners.

  • secondary title

Establishment of DApps consensus mechanism

DApps use two common mechanisms to establish consensus, Proof of Work (PoW) and Proof of Stake (PoS).

Proof of Work can be simply understood as a proof that you have done a certain amount of work. PoW determines your probability of getting bookkeeping by evaluating the workload. The greater the workload, the greater the chance of getting this bookkeeping.

Bitcoin mining uses the proof-of-work mechanism. By adjusting the difficulty of calculation, the Bitcoin network ensures that every time the competitive bookkeeping takes about 10 minutes for the miners of the entire network to calculate a random result that meets the conditions, that is, to obtain the bookkeeping right this time, and send out the data that needs to be recorded in this round. After verification and confirmation by other nodes of the network, they are stored together.

The proof-of-stake mechanism, also known as the proof-of-equity mechanism, is an upgraded consensus mechanism of PoW. The proof-of-stake mechanism determines the probability of obtaining bookkeeping rights by evaluating the number and duration of tokens held by users. For example, if a user holds 25% of the app's tokens, its weight is 25%, which is similar to the stock dividend system, and those who hold relatively more shares can get more dividends. For example,Omni protocolA proof-of-stake mechanism is used.

In an application, these two consensus mechanisms can be used independently or in parallel.Peercoin secondary title51% attack

Token Distribution Mechanism in DApps

To distribute their tokens in the digital currency market, DApps follow three common mechanisms, namely mining, fundraising, and development. As mentioned above, the mining mechanism follows the PoW principle or the PoS principle, which allows the maximum number of tokens to be distributed to those who contribute most of the work to the application operation. For example, bitcoins are distributed as rewards when miners use their computing power to confirm transactions and solve math problems on the bitcoin blockchain.

The funding mechanism is nothing more than a channel to raise funds for the initial development of the application, which is done with the help of an ICO (Initial Coin Offering). Demonstrate the idea of ​​the app to investors by releasing a white paper, launching a website, and proof of concept. If investors think the project is feasible, they can raise funds to implement the application.

In the funding mechanism, tokens are distributed to those who contributed to the initial development of the application. byMastercoinsFor example, it was initially distributed to investors participating in the ICO. After the raised bitcoins are sent to the designated address, investors can exchange for MasterCash, and the project will use the raised bitcoins to fund the development of the application.

secondary title

How do DApps work?

In order for DApps to function properly, the four basic elements introduced previously need to be implemented.

Applications based on the decentralized blockchain continuously consume tokens generated using the protocol. The open-source nature of DApps makes them completely decentralized, allowing anyone to view and contribute to the code. Since the code determines the scalable process of product development, its open source nature can guarantee its quality and quantity.

secondary title

Examples of decentralized applications

Golem

As a DApps project, its concept is to use PCs and data centers to create supercomputers that can be rented out, and anyone in the world can apply for renting.

The project does not rely on any central server farm, but instead distributes the computing load to "providers" who are willing to rent their computers to do the work. These providers share computer resources in exchange for GNT tokens. This distributed rendering process is computationally faster and less expensive than similarly centralized projects.

Augur

Augur combines prediction markets with the benefits of a decentralized web. It can be viewed as a decentralized market prediction platform that allows users to make predictions about the returns of potential transactions. In addition, Augur utilizes the "wisdom of the crowd" to make predictions about real-world events and uses ERC20 Token.

Many of the outcomes predicted by the app have proven to be more accurate than expert forecasts in the real world. When users make correct predictions about transactions, the platform will reward them. In addition, market creators and platform token holders who report events will also be paid.

Prism

Prism isShapeShiftThe Ethereum hosting project, which provides a trustless and decentralized asset portfolio market. It leverages EDCC (Executable Distributed Code Contracts) to generate custom management tools for market portfolios. Users can stake Ethereum in different cryptocurrencies and specify the percentage they want to hold.

Prism eliminates the need for third parties and the complicated process of keeping and storing wallets and multiple private keys. Since the project is based on Ethereum smart contracts, there is no need to manage passwords and keys for different exchanges. Also, it displays investor's portfolio through an interactive UI and automatically tracks everything in real-time.

Aragon

As an open source project, Aragon allows users to create and manage a decentralized organization based on the Ethereum platform, managed by the Aragon Foundation.

The platform was created to build and manageDAO (Decentralized Autonomous Organization), which also includes ANT, the platform token, which provides voting rights for determining the future development of the product. Aragon's DAO concept can be used by any organization or company, even non-profit foundations, to provide a higher level of governance for these entities.

in conclusion

in conclusion

Although the functions of DApps are becoming more and more sought after by people, it is undeniable that the ecological environment of decentralized applications is still imperfect. Looking back at the present, global industry giants have set foot in blockchain technology, trying to occupy a place in the blockchain ecosystem. However, compared with the coverage of the Internet, the current blockchain is only "dotted with stars". How to bring the blockchain into the vision of mainstream users, DApp has high hopes.

袁辉腾
作者文库