Disclaimer: Tokemy participated in The Graphs curator program. This is not investment advice.
We briefly discussed the Graph in the twitter thread below. With this post we wanted to dive deeper into this interesting project.
What is the Graph?
Indexing and Querying
Non-static websites and apps need to constantly query data in order to show something to their users. Querying is used to retrieve and display the data stored in a database on an application's interface. On top of querying, indexing the data maximizes the query's efficiency. This leads to a better user experience (UX) and the faster loading of apps.
When building on the blockchain, a key 'database' to query is the blockchain. Currently, querying the blockchain is difficult and often results in poor UX. The Graph wants to solve this problem.
Building serverless apps
To build applications on the blockchain, developers have to build proprietary, fragile and centralised indexing servers. This means that apps are not fully decentralised. Full decentralisation is important in certain cases as it ensures liveness.
The Graph allows apps to be fully serverless. Instead of using a centralized server, indexers, which are nodes on the Graph, provide indexing and querying services.
In the Web3 stack, the Graph can be seen as a middleware component between the blockchain and the application frontend.
Open APIs for transparent data
Since the blockchain is fully transparent, all the on-chain data is available to anyone. However, there is no user friendly way to access it. For example: both Uniswap.info (run by Uniswap) and Coingecko can access data from Uniswap on-chain. Since there is no shared querying & indexing layer, teams need to reinvent the wheel and build in isolation. The Graph allows the creation of open APIs called subgraphs.
Anyone can query from the subgraphs available, which can be found on the Graph Explorer. Furthermore anyone can create new subgraphs. The best subgraphs are then surfaced and indexed by indexers. The Graph therefore connects indexers with consumers that want to query data. Consumers pay indexers a small fee for their service.
The Graph's token, GRT (ERC-20) is the networks work token. It ensures data integrity, quality and security of the network by incentivizing different participants. On top of indexers and consumers, the other participants in the network are curators and delegators.
How GRT is used
Indexers are payed in GRT for indexing and querying subgraphs. They can set their indexing rates and need to stake GRT on subgraphs they wish to index. If they are malicious or index incorrectly they are penalised by losing staked GRT. Indexers compete with each other on rates, up time etc.
Curators signal to indexers which subgraphs are worth indexing by staking GRT on a subgraph. Curators receive part of the fees generated by a subgraph. Therefore they are incentivized to look for high quality subgraphs which are or will be in high demand (A lot of consumers wanting to query them). As they are staking on a bonding curve, they receive a greater share of the fees if they signal early.
Delegators can delegate to indexers, earning parts of the fees received by the indexer. They are incentivized to delegate their GRT to indexers which perform well (high uptime, good query fee rates).
Finally, consumers pay GRT when querying the data. These consumers can be application developers that want to display data from a subgraph.
The Graph has already found product market fit: it greatly improves the developer experience. Developers can query the blockchain directly themselves but the Graph allows them to "outsource" the work to a trustless public network, which is then also accessible to anyone. Over time, the Graph may become the de-facto querying layer. It may become even more beneficial to use the Graph over querying the blockchain directly.
Furthermore, the Graph intends to be chain agnostic. It will support various networks (side-chains, layer 1s and more). Currently it supports querying both Ethereum and IPFS.
Today, the Graph is already used by many DeFi applications. Over time, more software will move to the blockchain and the Graph may become a key network which will curate, retrieve and organize the data of web3. Ultimately, the Graph wants to break data silos, making all data available over its marketplace.
If you want to find out more about the Graph please check out the following resources: