header-langage
简体中文
English
Scan to Download the APP
Partnered With:

Take The Graph and Pocket Network as examples to understand the operation principle of decentralized data computing infrastructure

Read this article in 29 Minutes
The future of Web3 will depend on a base layer of distributed, secure and immutable distributed data across multiple blockchains.
Original source: The Block
Original compilation: Glacier web3 lab


The future of Web3 will depend on a Blockchain's distributed, secure and immutable base layer for distributed data. Then, Web3 faces three key challenges: 


1) How to efficiently transfer data from the blockchain to the application;

2) How to conveniently access data across multiple blockchains;

3) How to achieve A and B in a decentralized manner.


In a decentralized web architecture, a reliable node infrastructure is critical for decentralized computing. A decentralized computing network can be broken down into three general components:

1. Applications. These are any software that submits API requests (e.g., queries, relays) that will be routed to any public or encrypted database node.


2. Node. They are decentralized servers that provide functions such as storing database indexes, sending session information to applications, servicing API requests submitted by applications, and storing network state such as account balances and work reports.


3. Network layer. The ecosystem that keeps a decentralized protocol running, including governance, protocol rules, the participants involved, and the economic games they play.


As shown in the diagram below, relay or index nodes sit between applications and blockchain nodes (or other decentralized server networks), from which they Retrieve data. After processing data from blockchain nodes, they send relevant information to centralized or decentralized application servers.


image


Next, we will explain how decentralized computing infrastructure works with two example cases: The Graph and Pocket Network.

 

The Graph: Decentralized Indexing and Query

 

Web3 applications can filter or search from Blockchain query data. Since blockchains store data and handle state transitions, this process can be slow and computationally intensive, but they don't index the data. Indexes make finding related data faster and less computationally demanding.


Before The Graph, dapp developers would build their own database indexes for their users and customers. However, this practice keeps the indexed data in a centralized database (instead of decentralized nodes), reducing the trustworthiness of the dapp.


For many teams, setting up their own index server is also redundant. In The Graph, subgraphs show what data to store and how to store it. Although a project's subgraphs are usually defined by project developers, anyone is free to define these subgraphs.


Next, the Graph node stores this data in a database index (creating a service subgraph), continuously scanning the relevant blockchain (e.g., Ethereum block chain) changes and updates the data accordingly.


Apps can then query the generated endpoints via GraphQL, making it possible to access cross-chain data indexes via a unified query language. The index nodes were originally owned and operated by The Graph, but earlier this year, ten projects began migrating from the custodial service to The Graph’s decentralized mainnet.


Ultimately, The Graph aims to realize its vision of a fully decentralized data economy. In this economic model, the Graph protocol will define rules by which anyone can run or query a Graph node.


How does The Graph decentralize its anonymous suppliers while providing service guarantees? It all comes down to the network layer. This graph has the same network structure as other decentralized computing solutions, with the following four characteristics:


1. Supply (data provider) and demand (application programs, users) meet in an open marketplace.

2. Suppliers participate in an economic game (staking tokens) aimed at ensuring service guarantees.

3. The performance of suppliers is checked by some mechanism (through cryptographic proofs or "fishermen" who check the quality of their work and are rewarded for correctly reporting misconduct).

4. If suppliers are found to be failing in their duties, they will be penalized to some extent (losing a portion of the tokens they hold or not being selected to participate in revenue-generating services).


Graph utilizes a work token model in which Graph node providers let GRT receive work index data defined by a list of subgraphs. The model introduces economic incentives for quality of service, as indexers may lose jobs or be slashed (losing tokens) for serving incorrect data.


The network layer or "query market" of the Graph includes four main players. Token incentives for these participants are designed to ensure high-quality services and provide token utility.


Developer. These entities define subgraphs. Currently, they are typically developers of a given protocol, creating subgraphs for that protocol's data. In theory, however, anyone can create a subgraph of data from a public blockchain. Currently, developers need to pay for user requests.


Ultimately, The Graph envisions that when layer 2 solutions are widely implemented in Web3 wallets, end users will pay for their own queries.


Indexer. These entities enable GRT to obtain jobs from The Graph network. Their work consists of indexing the blockchain data on the graph nodes of each subgraph manifest. Indexer revenue (and by extension delegator revenue) comes from rewards for indexing work. The protocol's collective query fees are distributed to indexers (and delegators) in proportion to GRT, who also receive indexing rewards from GRT's annual inflation of 3%


policy show people. These entities indicate which subgraphs display better quality, so that the indexer knows which subgraph nodes need to be indexed. Any developer can start a subgraph using decentralized blockchain data, so The Graph network needs these participants to identify useful ones.


Administrators signal to the indexer by marking a GRT after a specific subgraph. For their services, they earn a portion of the query fees generated by the subgraphs they signal. This share is determined by a bonding curve that pays curators based on how early they signal, creating a prediction market where curators can guess the future popularity of subgraphs.


The client. These entities attribute GRT to indexers and share in indexing rewards and query fees earned by indexers, which are set by indexers. The delegating program's stake in the indexer is limited by the indexer's GRT stake. It creates incentives for both parties.


Delegators earn by delegating to the "best" indexers (these indexers index the most important subgraphs as determined by the curator) More. Index compilers earn more by "winning" delegators' funds, which incentivizes index compilers to share their gains fairly with delegators.


Currently, there are 7306 delegates, 2266 curators and 160 indexers in The Graph network. The Graph is an example of how the network layer can successfully operate a decentralized computing network without a centralized entity in charge. It demonstrates a working decentralized solution to bring data from blockchains to applications and easily access data across multiple blockchains through a unified query language.

 

Pocket: Solving Node Incentives

 

Like The Graph, Pocket also has applications, nodes and Network layer. Perhaps the main difference is that Pocket focuses on solving a specific problem that limits the growth potential of Web3: the problem of node incentives.


The Graph, on the other hand, likens itself to a kind of "Google in Web3", aiming to organize the world's blockchain information and make it ubiquitous Accessible and useful. In order for a decentralized network to thrive, it is necessary to develop a reliable infrastructure of nodes. However, it is not practical for developers to both host their own full nodes and provide backend support for their own applications.


As a result, Web3 developers rely heavily on centralized solutions, which introduces risks of centralization such as single points of failure, security risks, and privacy intrusions. There is currently a lack of reliable node infrastructure run by third parties.


One of the reasons for the lack of full nodes run by individuals and companies is the lack of native relay node incentives (other reasons include complexity and inconvenience of setup). To solve this problem, Pocket Network encourages individuals and companies to deploy and run full nodes for any blockchain with application requirements.


Through a combination of token incentives, cryptographic proofs, and a pseudo-random selection algorithm, Pocket can create a reliable decentralized relay network where Developers can access cross-chain data with higher security and lower cost.


Again, the question arises, how does Pocket provide service assurance through a decentralized network of service providers that we do not know? A centralized network layer is established, although the rules and incentive scheme are different from The Graph.


Pocket's main difference is that it uses a session model, which does not rely on nodes storing indexed data like nodes in The Graph network. A Pocket node has three functions: provide session information to applications that contact it, service relay requests sent by applications, store information about the state of the Pocket network, to assign work, and to verify work reports.


Sessions are the mechanism used by the network to regulate interactions between applications and nodes. They are a data structure that uses data stored in nodes about the state of the Pocket network to pseudo-randomly pair apps with a set of up to 5 nodes in each chain to provide services paid for by the app.


Then, the two key roles in the Pocket network are the application and the relay nodes, which are also the Pocket blockchain (based on the tendermint database, used to ensure Consensus between applications and nodes on infrastructure provisioning) validators and block producers.


Nodes are rewarded based on the number of requests they serve during a session. Each relay (e.g., MetaMask call to get balance, get transaction history, send transaction, query smart contract) is served by a node and verified by the protocol, yielding 0.01 POKT. The rewards for each verified relay will be split as follows:


1) Service nodes account for 89%

2) 10% to Pocket DAO

3) Give block producers 1%


In the end, Pocket Network will solve the same core problem as the Graph, namely How to efficiently introduce blockchain data into applications, easily access cross-chain data, and decentralize these processes. However, the scope is different, Pocket is more focused on being a unified cross-blockchain API through node incentives, while the Graph is more focused on being a unified search engine for blockchain data.


In the centralized blockchain infrastructure technology, all we need to access blockchain data is to connect to a blockchain node. These nodes can be distributed across decentralized personal and corporate networks such as The Graph and Pocket Network, or owned and operated by central entities such as Infura and Alchemy. To illustrate the difference, see the chart below.


image


The main difference between centralized and decentralized portals for blockchain data is that the company is responsible for maintaining the operations of the nodes - all of their operations can be grouped into a "company layer". In addition to providing access to full archive node data, participants in the corporate layer may decide to set up database indexes to facilitate queries involving filtering or searching.


As with any centralized computing network, there are certain benefits and costs to this setup. In terms of benefits, centralized solutions can make data networks easier to implement, develop and maintain. For example, within a few years, Alchemy and Infura were able to develop and release various tools to facilitate prototyping and development.


However, this introduces various forms of security risks and single points of failure. For example, Infura’s ethereum infrastructure suffered a major outage last year that delayed price feeds for ETH and ERC-20 tokens for popular services including MetaMask. It also caused major crypto exchanges including Binance and Bithumb to temporarily disable withdrawals for ETH and ERC-20 tokens.


Infura said the roots can be traced to several components in its ethereum infrastructure that were locked into an older version of the Geth client. The hindsight has sparked debate about Ethereum's decentralization and over-reliance on centralized blockchain infrastructure providers.


Having said that, we note that Infura and Alchemy do not own or control the underlying blockchain data, but serve as centralized portals to decentralized data .


If desired, we can use another centralized and decentralized infrastructure provider to access the same data. Alternatively, we can set up our own full nodes, serving ourselves. One can make some comparisons with ISPs - if Comcast goes down, we can switch to another ISP to get access to the internet.

 

Discussion

 

Depending on the pros and cons involved, centralized and decentralized infrastructure solutions may Play different roles in the next iteration of Web3. For example, if a certain part of the project requires advanced prototyping and development tools. In this case, a centralized solution like Alchemy or Infura might be a good fit for these parts.


If other parts of the project strive for trustlessness and security, then a decentralized solution such as the Graph or Pocket Network may be a good fit for those parts. The foreground is a new web, much of it based on distributed, secure, and immutable blockchain databases, communicating through centralized and decentralized infrastructure.


Next, let's examine some decentralized blockchain fundamentals by analyzing the numbers and drivers behind Pocket Network's recent surge in network activity and revenue How the facility gained traction. By maintaining almost 100% uptime, we can see how these decentralized data providers can support the growing Web3 economy.

 

Case Study:

 

Network Activities


To examine Pocket usage and growth through 2021, we first focus on the average daily relay volume. A relay is just an application request to any public database node. The graph below plots the average daily relay volume from January to November 2021 at 4-day intervals.


image


Pocket Network usage has seen tremendous growth this year, especially with the explosion of network activity starting in October. What are the main drivers? First, in February of this year, Pocket Network announced that they would start providing Ethereum infrastructure for Fuse, a platform for building decentralized payment systems.


As an Ethereum sidechain, Fuse needs a stable and well-running Fuse-Ethereum bridge. By integrating with Pocket, Fuse can further decentralize the platform and increase user privacy while reducing the cost and efficiency of running your own Ethereum nodes.


Subsequently, in August, Pocket announced support for the xDai chain, another Ethereum sidechain that supports the xDai stablecoin, which is powered by The Dai bridge comes from. One of the main use cases for xDai is to enable fast and low-cost transactions in the MMO space conquest game Dark Forest. Similarly, by integrating with Pocket, xDai can increase decentralization while “outsourcing” their Ethereum infrastructure needs.


Most recently, there has been a spike in network activity starting in October after Pocket announced it would be handling Harmony RPC traffic. Harmony is a layer 1 blockchain that, through the use of random state sharding, can serve as an interoperable layer 2 scaling solution for Ethereum, allowing secure block confirmation at high speed with low fees.


The Harmony network was spiking between 50 million and 100 million API calls at the time, and they were trying to reroute traffic through a scalable and decentralized API. Developers can now create Harmony RPC endpoints from Pocket's front-end API portal to use in their dapps. These pocket-powered endpoints provide dapps with an additional layer of resiliency, reliability, and privacy.


In the Pocket network, an application stub is an entry point that registers as an application in the network. Applications lock POKT into a bond within the network to receive throughput allocations performed through network node relays. The rules for this binding are determined by the monetary policy and protocol rules set by Pocket DAO.


As the graph below shows, the amount of POKT that applications spend on reservation relay requests has grown more steadily since the beginning of the year.


image

The daily relay request reserve is equal to the number of POKT staked by the application multiplied by 40. Then, we can see that the application has "paid" (invested enough POKT) to reserve almost 1 billion relays per day, while using about 160 million times, or 16% of the reservation. That's not surprising, though, since applications should have a backup buffer in case of a surge in network activity.


Eventually, assuming these token holdings drain the relay request reserve, these roughly 1 billion relays will be paid to relayers as "revenue" Provider, Pocket DAO and POKT Block Producer. Let us now analyze these benefits and rewards in more detail.


Income and Returns


To convert Relays to Revenue, simply convert Relays Quantity multiplied by 0.01 (amount of POKT generated per relay) and POKT price. The graph below shows monthly POKT revenue in 2021, based on daily average access points and monthly POKT price. Price data are available from April to November.


image


Network activity decreased from May to July, at the same time as overall activity on the Ethereum network and crypto markets decreased. However, it's clear that Pocket's revenue grew significantly in the quarter after it built a terminal connected to the Harmony network.


We can also look at how much POKT gets per relay node by dividing the total number of relay nodes by the total number of relay nodes and multiplying by 0.89 (from 89% of issued POKT Distributed Service Node, Pocket Knife, 10% and 1% Block Producers). The graph below shows the average daily rewards per validator for 4-day intervals from January 1, 2021 to November 8, 2021.


image


At the beginning of the year, POKT nodes received more daily rewards because there were fewer nodes in the network. The chart below shows the number of active validator nodes in the network from January 1st to November 8th, in 4-day intervals.


image


So far, active validator nodes have increased over 15x since the beginning of the year, from just over 600 nodes to over 9000 today node. This month, the average daily rewards per validator node soared to an average of 161 POKT (~$118 $0.73/POKT) per node per day, out of over 300% of the annual POKT rewards for each node in the network (assuming each node stakes 15150 POKT) minimum number.


These rewards are not necessarily sustainable in the long run. Attractive rewards could lead to more node providers, further splitting total validator rewards and POKT rewards paid through supply dilution (0.01 POKT created per transfer). Also, there is the question of whether compensation paid through supply dilution should be considered income.


On the one hand, they do represent a real need for the Pocket service. On the other hand, every time work is performed on the Pocket network, the stakes for applications and nodes are diluted. At the November peak, that would equate to an annual increase in market capitalization of about $412 million.


That said, Pocket DAO may vote to cut new POKT issuance in the near future. Furthermore, despite these staggering numbers, Pocket Network is still only able to handle a fraction of the traffic of its centralized competitors, with Infura alone serving over 2.4 billion Ethereum relays in a single day in 2020.


Given the huge addressing market and the successful integration of protocols such as Harmony with Pocket, we may see more and more protocols being re-routed through the Pocket network and decentralize its traffic to prevent or deal with problems arising from dependencies on centralized blockchain infrastructure. Whether this decentralized infrastructure can support a Web3 economy with billions of dapp users will depend on the resilience and ideal anti-fragility of node and network technologies.


Original link


Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

举报 Correction/Report
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit