As Consumer of my own subgraph I found no informations about how much I will spend in Query Fees

Hi. I’ve deployed a Subgraph on Mainnet but I’m a little concerned on how much it will cost in montly GRT. As Legacy subgraphs has no informations about how much queries my dapp makes and how much indexers are charging for single queries, it is becoming a shot in the dark to migrate.

Could someone give me some light in it?

1 Like

A very good point that definitely needs to be addressed (at least in some way).
I’d be curious to hear how accurate an estimate you’d need to make a worthwhile decision off of? As it would be impossible to get a clear and definite response since indexers can set their own cost per query (not to mention the complexity of different queries), I’d be curious to know how large of an estimated range would still be useful to you (and other developers in the same situation)?

1 Like

Well, in my case is pretty simple. In average, my queries is usually where:(owner:‘address’). Usually return zero to 4 entities. The main problem is that I don’t find any kind of calculator or any information inside Indexers information that gives me some clue of how much they will charge or even if my query is expensive.
Would be good to have on playground some info related to a query that I’ve tested, something like “gas spend” on Ethereum. And the “gas price” charged on Indexer details page. With that I can figure out how much will cost in average at least.

1 Like

So I went to do some digging/asking around on this. Unfortunately it is tough, as mentioned, since a lot of the pricing information is “hidden within the blackbox” as it is market pricing dynamics that will help to keep indexers charging competitive rates (rather than just maximizing their profits). One thing that I didn’t realize before is that there is a cap of 0.0003 GRT per query (from what I’m told - I’d love to find the link to source code to give a very definitive answer). So if you use that as a worst case scenario, you’re looking at being able to perform at least 1000 queries for only 0.3 GRT.

I know it’s not a full answer, but it should at least give you a worst case order of magnitude inclination towards the response.

I do agree though that some tooling around this would be valuable.

1 Like

In The Network if you are paying for a query you decide the price you are willing to pay. Plain and simple. I’d take the amount you are willing to pay per month, divide it by your expected query volume, and set that as your maximum budget per query. (This already is or will be available as configuration in the Gateway)

You do get to decide your price, but there is no guarantee that any Indexer will be willing to serve queries at that price. That side of the equation is up to them. If the Gateway can match you to an Indexer willing to serve a query at or lower then the price you are willing to pay, you will pay the lesser of your budget and their price. You will always pay some amount less than the budgeted price. Possibly significantly.

As a consequence of the above, a lower price makes the pool of Indexers available to you smaller, which may affect the quality of service you receive. Seeing high query fees may attract curation and big name Indexers to your subgraph. A low price may leave you with only budget Indexers to choose from.

It’s a dynamic market, and it’s in your control. There is no maximum or minimum amount specified in the protocol or in our Gateway. (There was a price specified in The Gateway before, as stated by @Josh-StreamingFast, but this was just a price we paid for test queries and wasn’t meant to be norm-setting).


Yaniv was just asked about this at EthCC, and I have timestamped his response for you, as I thought it was a very good one (both in terms of the issue with providing a number, but also in some next steps for further information to be provided to you as data consumers)

1 Like

Thank you so much Josh for the link. Pretty helpful! :smiley:

1 Like