Skip to content

fix(pools): exclude cow and dodo from /v1/evm/pools#537

Merged
0237h merged 1 commit into
mainfrom
fix/pools-exclude-router-protocols
May 13, 2026
Merged

fix(pools): exclude cow and dodo from /v1/evm/pools#537
0237h merged 1 commit into
mainfrom
fix/pools-exclude-router-protocols

Conversation

@0237h
Copy link
Copy Markdown
Collaborator

@0237h 0237h commented May 12, 2026

Summary

  • cow and dodo are decoded from router/aggregator contracts, not liquidity pools. CoW's settlement contract holds no liquidity — it batches user orders and routes through external solvers. DODO's RouteProxy is a smart-routing entry point, not a PMM pool. Both decoders emit factory == pool == log.address — a single contract that "touches" thousands of unrelated pairs.
  • In state_pools_aggregating_by_token, those contracts then map to every token they ever routed, so any ?input_token=X filter returns the same contract with arbitrary token0/token1 picked from the bag — observable as e.g. /v1/evm/pools?input_token=GRT returning rows where neither side is GRT.
  • Excludes both protocols from /v1/evm/pools. Their swap records stay available via /v1/evm/swaps where they belong.

Closes #526, #527.

Proper decoding (CoW solver routes, DODO PMM pools as a separate concept) is tracked at pinax-network/substreams-evm#255.


🤖 Generated with Claude Code

Both protocols are decoded from router/aggregator contracts, not
liquidity pools. CoW's settlement contract (0x9008d19f…) batches and
routes orders through external solvers and holds no liquidity. DODO's
RouteProxy contracts are smart-routing entry points, not PMM pools.
The decoders emit factory == pool == log.address — a single contract
that "touches" thousands of unrelated pairs.

In the existing aggregation MV (state_pools_aggregating_by_token),
these contracts then map to every token they ever routed, so any
?input_token=X filter returns the contract with arbitrary token0/
token1 picked from the bag — observable as e.g. /v1/evm/pools?
input_token=GRT returning rows where neither side is GRT.

CoW + DODO swap records remain available via /v1/evm/swaps where they
belong. Tracked for proper decoding in substreams-evm.

Closes #526, #527

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@YaroShkvorets YaroShkvorets temporarily deployed to fix/pools-exclude-router-protocols - token-api PR #537 May 12, 2026 21:07 — with Render Destroyed
@0237h 0237h merged commit 9f75549 into main May 13, 2026
2 of 3 checks passed
@0237h 0237h deleted the fix/pools-exclude-router-protocols branch May 13, 2026 18:30
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.

TOKEN_API_POOLS_FILTER_LEAKS: ?input_token=X returns unrelated pools

2 participants