A Deep Dive Into The Graph
Tech Deep Dives

A Deep Dive Into The Graph

Created 2yr ago, last updated 1yr ago

Contributor: What does it mean to use an open API? In this deep dive, The Graph explains how (and why) APIs can be global.

A Deep Dive Into The Graph

Table of Contents

How Does The Graph Fit Into DeFi and Web3?

API is a term that you definitely hear a lot if you work in technology, but it’s not necessarily one that everybody understands. API stands for “application programming interface” — in simplest terms, an API is a workflow process that is automated, instead of manual. This hides the hard complexity of the code behind a simple API. Subgraphs are a term coined by The Graph and they are open APIs.

For example, Uniswap uses a subgraph and that data is open to any developer to use in their application. Thus, we see wallets like Rainbow wallet that have built a subgraph that pulls from Uniswaps subgraph. The most efficient way to query (search) data from the blockchain is via a subgraph. An example of a closed APIs is Linkedin’s API, where you cannot port the data from Linkedin to Crunchbase or your own application, because the API is closed. With The Graph, APIs are guaranteed to be and remain open via subgraphs.

Prior to The Graph, developers had to spin up centralized servers and databases in house in order to index and query blockchain data. This was time consuming for engineers, costly and created risk since centralized infrastructure can be a single point of failure. With The Graph, applications only need to reference an API endpoint for a subgraph to begin querying data, such as using the Uniswap subgraph to query trade volumes.

By making it easier for developers to interact with blockchains, The Graph is making it easier to build new applications and track valuable data. Using The Graph, developers can focus on having great user experience UX/UI, as opposed to building custom back-end infrastructure for each application.

Today, over 6,000 developers are actively using The Graph and have built over 3,400 subgraphs (open APIs) for hundreds of applications. Additionally, over 210 Indexers from 54 countries have deployed nodes in the testnet and over 2,000 Curators have signed up in the testnet.

Join us in showcasing the cryptocurrency revolution, one newsletter at a time. Subscribe now to get daily news and market updates right to your inbox, along with our millions of other subscribers (that’s right, millions love us!) — what are you waiting for?

How Does The Graph Work With Ethereum?

The Graph has built an open data layer on top of Ethereum to make it easy for developers to pull information and serve that information to their users, quickly and efficiently. Subgraphs abstract interacting with Ethereum's JSON-RPC API for reading blockchain data, and with subgraph features like mutations, writing to the blockchain will be simplified as well.

Because the developers do not use an indexing database in-house, they can easily pull data from the blockchain in an efficient way, so applications load quickly for users. Subgraphs are also open source, meaning applications can query the same APIs used by other projects to create a single source of truth for users.

Waterfall From Web2 Into Web3

At The Graph, we believe that blockchain is the future of the internet and we are working to make that future a reality. Because The Graph uses GraphQL, a language created by and commonly used in Web2, many developers can onboard into the Web3 space and easily build on blockchains. As subgraph usage continues to rise and blockchain developer tooling improves, we will continue to see a waterfall effect from centralized Web2 technology companies to decentralized Web3 applications.

The crypto economy is a radical new imagining of the future of work. Open protocols like The Graph are creating the foundation for transparency and opportunity, enabling anyone in the world to contribute their talents to a global economy. The Graph is working towards this vision to help developers build the new coordination mechanisms of the internet age.

What Are Indexers, Delegators, Curators and Consumers?

There are many different roles in The Graph Network, including Indexing, Curating, Delegating and Consuming.

Indexers are node operators in The Graph Network that stake Graph Tokens (GRT) in order to provide indexing and query processing services. Indexers earn query fees and indexer rewards for their services. To be an Indexer on The Graph network, you need to be able to run the node software. Indexing is a technical role in the network.
Curators are subgraph developers, data consumers or community members who signal to Indexers which APIs should be indexed by The Graph Network. They use their knowledge of the blockchain ecosystem, applications and consumers to identify the most reliable data sources.

Curators deposit GRT into a bonding curve to signal on a specific subgraph and earn a portion of query fees for the subgraphs they signal on — this incentivizes the highest quality data sources.

Because signaling occurs on a bonding curve, the earlier you signal on a subgraph, the greater share of the query fees you earn on that subgraph for a given amount of GRT deposited. This also means that when you go to withdraw, you could end up with more or less GRT than you started with. To be a curator, you do not need to be technical, you just need to understand the open data.

An example of curation would be if a new DeFi subgraph pops onto the market for a protocol that you think is promising. You could signal on that subgraph to indicate to Indexers that it should be indexed and to make it discoverable by DApp developers. You would then earn a cut of the query fees on that subgraph for being early to signal.

Delegators are individuals who would like to contribute to securing the network but do not want to run a Graph Node themselves. Delegators contribute by delegating GRT to existing Indexers, and they earn a portion of query fees and indexing rewards in return. Delegators select Indexers based on their performance on measures like query fee rates, past slashing and uptime, as well as delegator parameters like the cut of fees and rewards from the Indexer. Delegators will delegate and undelegate GRT on Indexers via the Graph Explorer DApp. You do not need to be technical at all in The Graph Network, as it just takes a single click to delegate.
Consumers are the end-users of The Graph that query subgraphs and pay query fees to the Indexers, Curators and Delegators. Consumers are likely to be developers or projects themselves that cover query fees for their applications as they would AWS or cloud service costs. However, some applications will pass on query fees to users or bundle the cost in product fees. Consumers will pay for query fees via “gateways” or wallets that will be built on top of open source contracts in The Graph Network.

I’m Not Technical, How Can I Get Involved?

Like the internet, The Graph Network needs all kinds of folks, from non-technical creatives, to very technical developers. If you are non-technical, you can get involved as a Curator or Delegator to earn GRT on The Graph Network and help Indexers identify which subgraphs they should index. You are also able to Delegate to any Indexer you choose to help secure the network and earn GRT for your contribution.

There are over 200 Indexers participating in Mission Control Testnet, and more than 2,000 individuals and projects are in the Curator Program contributing to the network to earn rewards for their efforts. At mainnet launch, anyone can become an Indexer or Delegator on The Graph Network.

If you are a developer building an application or Web3 application, you can use subgraphs for indexing and querying data from blockchains. The Graph allows applications to efficiently and performantly present data in a UI and allows other developers to use your subgraph too! You can deploy a subgraph or query existing subgraphs that are in the Graph Explorer. We would love to welcome you to be Indexers, Curators and/or Delegators on The Graph’s mainnet.

The Future of Web3

The Graph’s decentralized network will be launching soon. Genesis creation of the GRT token will occur in conjunction with the network launch. After launch, any project will be able to contribute to the network and build in The Graph ecosystem, with protocol upgrades subject to technical governance by The Graph Council. After launch, The Graph community will be working to expand support for multi-blockchain and continue adding new features to help developers collaborate on building a global API for the decentralized web.

The Graph has become the backbone of DeFi and the broader Web3 ecosystem, and as blockchain becomes the future of the internet, The Graph protocol will be there supporting the builders and users of the growing crypto economy.
This article contains links to third-party websites or other content for information purposes only (“Third-Party Sites”). The Third-Party Sites are not under the control of CoinMarketCap, and CoinMarketCap is not responsible for the content of any Third-Party Site, including without limitation any link contained in a Third-Party Site, or any changes or updates to a Third-Party Site. CoinMarketCap is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement, approval or recommendation by CoinMarketCap of the site or any association with its operators. This article is intended to be used and must be used for informational purposes only. It is important to do your own research and analysis before making any material decisions related to any of the products or services described. This article is not intended as, and shall not be construed as, financial advice. The views and opinions expressed in this article are the author’s [company’s] own and do not necessarily reflect those of CoinMarketCap.
14 people liked this article