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

Change Uniswap v3 subgraph queries to use pagination #1619

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

rav-ipor
Copy link
Contributor

Uniswap v3 adapter is fetching only first 1000 pools from subgraph for every chain. Because of that it misses many pools with >10k TVL.
In this PR, adapter fetches all Uniswap v3 pools from subgraph with pagination and filter out pools with less then 10k TVL.
Uniswap v2 pools are filtered out, because some of them are duplicated in both subgraphs used in Uniswap v2 and Uniswap v3 adapters.

@rav-ipor
Copy link
Contributor Author

rav-ipor commented Nov 26, 2024

Tests are failing because of missing GRAPH_API_KEY env var:

ethereum ClientError: auth error: payment required for subsequent requests for this API key

I tested it on forked repo on copied Test_Change_On_Demand workflow from Test_Change workflow with added GRAPH_API_KEY env var and it passes tests, here is the link to the run:
https://github.com/IPOR-Labs/yield-server/actions/runs/12025729366/job/33523370299

Of course workflow .github/workflows/test-on-demand.yml should not be merged.

@slasher125
Copy link
Collaborator

@rav-ipor ty. issue with this version is runtime, which for me locally was almost 15min which is way to long. if u can explore a faster version of this that be appreciated

@rav-ipor
Copy link
Contributor Author

rav-ipor commented Dec 3, 2024

@slasher125 ok, I will try to speed it up

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

Successfully merging this pull request may close these issues.

2 participants