Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subgraph returns a lot of inactive ticks #169

Open
NoUJoe opened this issue Jun 10, 2023 · 1 comment
Open

Subgraph returns a lot of inactive ticks #169

NoUJoe opened this issue Jun 10, 2023 · 1 comment

Comments

@NoUJoe
Copy link

NoUJoe commented Jun 10, 2023

When getting ticks of popular pools, subgraph will return lots (like hundreds) of inactive pools. I.e liquidity net/gross = 0

I know I can filter this in the graphql query, and it's no skin off my nose, my machine doesn't have to do the extra processing, but seems inefficient to have this many inactive ticks returned by default, esp. on pools with tickSpacing: 1. I know that the pool contract will delete a tick once it becomes inactive. Wondering why subgraph(s) don't do the same?

Might be a good reason, thought I'd point it out and see.

@Data-Nexus
Copy link
Contributor

We could add something like store.remove("Tick", tick.id) to remove the old ticks. This can also lead to a trimmer database tables (and faster queries) if indexers are pruning really old state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants