Skip to content

Re-introduce on-demand V3 pool fetch, gated to the indexer - #4651

Merged
AryanGodara merged 9 commits into
mainfrom
aryan/v3-on-demand-indexer-only
Jul 30, 2026
Merged

Re-introduce on-demand V3 pool fetch, gated to the indexer#4651
AryanGodara merged 9 commits into
mainfrom
aryan/v3-on-demand-indexer-only

Conversation

@AryanGodara

@AryanGodara AryanGodara commented Jul 20, 2026

Copy link
Copy Markdown
Member

Description

Re-introduces #4560 (reverted in #4629), but gates the on-demand fetch behind a source capability so it only runs against the pool-indexer. The subgraph keeps its pre-#4560 behavior (misses deferred to the maintenance run), avoiding the prod fetch_liquidity latency spikes.

Changes

How I tested

Proof that this does not regress fetch_liquidity latency. I tested with custom image. The screenshots are in IST (my timezone, so added UTC timestamps for verifiability)

  1. mainnet staging: restart at 14:25 UTC (graph: 14:20 - 14:50 UTC)
image image
  1. ink prod: restart at 15:56 UTC (graph: 15:53 - 16:13 UTC)
image image
  1. arbitrum prod: restart at 16:10 UTC (graph: 16:07 - 16:27 UTC)
image image

For scale

During the reverted #4560 these hit 10-13 MINUTES on the subgraph.

@AryanGodara AryanGodara self-assigned this Jul 20, 2026
@AryanGodara
AryanGodara force-pushed the aryan/v3-on-demand-indexer-only branch from 9872bad to e3d8393 Compare July 21, 2026 19:01
@AryanGodara
AryanGodara force-pushed the aryan/v3-on-demand-indexer-only branch from e3d8393 to 222e7cb Compare July 21, 2026 19:06
@AryanGodara
AryanGodara marked this pull request as ready for review July 21, 2026 19:22
@AryanGodara
AryanGodara requested a review from a team as a code owner July 21, 2026 19:22
@claude

claude Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Claude finished @AryanGodara's task in 1s —— View job


I'll analyze this and get back to you.

@jmg-duarte

Copy link
Copy Markdown
Contributor

We observed the latency issues when repeatedly restarting services (due to me experimenting) did you test this scenario?

@AryanGodara

Copy link
Copy Markdown
Member Author

We observed the latency issues when repeatedly restarting services (due to me experimenting) did you test this scenario?

I restarted the pods ~5 times in total. and compared the graphs (manually) and the metrics (via the MCP) to check each of these. And compared to the original graphs+metrics from when it was spiking.

and then did a negative test on staging again (flipped off pool indexer and set driver back to using subgraphs) to check if it spiked again.

also did trades on the FE (swap.cow.fi and dev.swap.cow.fi accordingly) to see if it spiked when having to look up new pairs again. None of these caused similar spikes, everything was in range.

This seemed enough to check the correctness.

Comment thread crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs Outdated
@AryanGodara
AryanGodara requested a review from jmg-duarte July 27, 2026 13:22
Comment thread crates/driver/src/boundary/liquidity/uniswap/v3.rs Outdated
@AryanGodara
AryanGodara requested a review from jmg-duarte July 27, 2026 16:05

@jmg-duarte jmg-duarte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AryanGodara AryanGodara added the hotfix Labels PRs that should be applied into production right away label Jul 30, 2026
@AryanGodara
AryanGodara added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit e88fd20 Jul 30, 2026
22 checks passed
@AryanGodara
AryanGodara deleted the aryan/v3-on-demand-indexer-only branch July 30, 2026 07:33
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

hotfix Labels PRs that should be applied into production right away

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants