The Graph’s decentralized indexing and query protocol enable secure, compensated blockchain data inquiries.
Indexer’s price each query on The Graph Network individually, and Consumers, who are often application developers, pay for it. The Graph’s hosted service query volume surpassed 14 billion in February and over 19 billion in March. It represents a 100-fold increase in Ethereum dapp adoption since January 2020.
Getting billions of monthly searches to the decentralized network without slowing down dapp users has been tricky. If each transaction adds just 250 milliseconds to the page serving time, 19 billion transactions would add over 150 years. Waiting for pages to load is not a good way to spend two human lives per month. Slow transaction speeds can also discourage consumers from interacting with applications. Which has been a major stumbling block in the development of Web3 and the crypto economy.
However, a microtransaction system that enables The Graph must be more than just high throughput and low latency. We understood the solution is decentralized, fault-tolerant, and trustless. As well as make effective use of available liquidity and dispel the idea that centralization leads to superior performance.
We are proud to unveil a scalable microtransaction system using the Connext Vector protocol that will sustain The Graph’s growth for years to come. We call it a scalar.
Development of Scalar
Scalar is a scalable microtransaction solution based on the Connext Vector protocol. Scalar handles all paid app search queries between Indexers and users. It prioritizes efficiency from data flow design through CPU and memory improvements. Scalar will open source for the benefit of the Web3 and Ethereum communities.
For performance, Scalar develops in Rust, and we use Connext Vector, an ultra-minimal state channels’ framework, for routing. Throughout the development of Scalar, Connext collaborated closely with The Graph Foundation and Edge & Node. As a result, Vector builds specifically for The Graph’s use-case.
Every Scalar transaction starts with a single query and sends to the Indexer from the Consumer (e.g., the dapp initiating the query). A receipt is a collection of serial transactions for a Consumer’s requests over a period of time. A Vector transfer aggregates numerous receipts to facilitate query parallelism and acts as a unit of collateral.
The transfers then roll into a Vector channel. The channel allows participants to easily swap transfers between processes and avoid running out of collateral before running out of funds. Through a router, another Vector channel on the receiving side of the transaction aggregates transactions from multiple other participants.
A single on-chain (Ethereum) withdrawal for each allocation distributes query transactions among the rebate pool.
Scalar Use
Scalar is used for situations when there are several transactions running at the same time. The Connext and The Graph teams have worked tirelessly to bring this solution to reality so that it can benefit other Web3 projects and enable scalable transactions.
The Graph’s hosted service has consistently seen increased utilization, indicating widespread interest in the decentralized Internet. The Graph’s hosted service processed over 19 billion inquiries in March alone, averaging over 600 million per day. In addition, the number of developers using subgraphs has increased by roughly 20% month over month. The explosive growth of Web3 use cases like DeFi and NFTs has fueled unprecedented demand for a truly decentralized and scalable query processing solution.
According to Yaniv Tal, the payment required 402 error code is a vestige of this system that started but never finished. By integrating microtransactions directly into the web’s fabric, Scalar accomplishes the work of the early Internet builders.