How to Evaluate Subgraphs
By: Jerry Okolo
Tags: GraphQL, Itsjerryokolo, The Graph Protocol, The Graph, Subgraph

In this post I am going to use the DODO DEX subgraph to demonstrate how I evaluate subgraphs.

Before I begin, there are a few things to keep in mind.

The subgraph may have been changed or updated by the subgraph developer by the time you read this article. That said, the principles remain the same.

I assume you understand what The Graph protocol is, what a subgraph is, and how it works.

I assume you know what Ethereum is and how to make sense of on-chain data on block explorers like Etherscan.

I created an easy-to-use template for how I rationalize my evaluation of a subgraph. You can duplicate it and modify it to suit your style.

If you create your own version from my template, I’d love to see it. I could improve mine from your implementation.

Curators signal to indexers what subgraphs to index, and they do that by staking the GRT token on a bonding curve. It is important you carefully evaluate a subgraph before staking on it.

Let’s begin.

The first thing I do is try to understand what DODO DEX protocol is and how it functions. A quick google search leads me to the project’s website. I then confirm if the website I’m on is the same as the one in the link from their twitter page. On their website, I see that they are a decentralized exchange where users can swap one token for another, add liquidity to pools and mines the native DODO tokens as a reward for providing liquidity.

When evaluating a subgraph, there are a few key criteria you need to pay attention to. You’ll find these definitions in my template.

Subgraph Function: How would you describe what the subgraph does?

How would you describe what the subgraph does? Production Ready?: Does this subgraph look production ready?

Does this subgraph look production ready? Usefulness to Others: Does this subgraph look like it will be useful to others?

Does this subgraph look like it will be useful to others? Improvements: What changes would you make to the schema including additions or modifications to entities, fields, field types, relationships, or any other improvements?

What changes would you make to the schema including additions or modifications to entities, fields, field types, relationships, or any other improvements? Similar Subgraphs & Comparison: Are there any other subgraphs that do similar things? How does this one compare?

Are there any other subgraphs that do similar things? How does this one compare? Status: Identify the degree of completeness, complexity and accuracy of the implementation

I’ll explore how I evaluate each criterion.

Subgraph Function

To find out what the subgraph does, I go to the playground of the subgraph and query it. As you can see in the image below, when you hit the play button, it returns the indexed data.

From seeing the various tokens, including their addresses, symbols, etc., we can conclude that this subgraph provides data for the DODO DEX protocol. I record this information on the template.

I’ll be creating a post on how to use The Graph playground to query data. If you understand GraphQL then this will feel right at home.