fix(pools): exclude cow and dodo from /v1/evm/pools#537
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cowanddodoare 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'sRouteProxyis a smart-routing entry point, not a PMM pool. Both decoders emitfactory == pool == log.address— a single contract that "touches" thousands of unrelated pairs.state_pools_aggregating_by_token, those contracts then map to every token they ever routed, so any?input_token=Xfilter returns the same contract with arbitrarytoken0/token1picked from the bag — observable as e.g./v1/evm/pools?input_token=GRTreturning rows where neither side is GRT./v1/evm/pools. Their swap records stay available via/v1/evm/swapswhere 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