feat(hindsight): decode on-chain aggregator swaps#253
Draft
tamaralipows wants to merge 2 commits into
Draft
Conversation
No API Breaking Changes DetectedThe PR title signals breaking changes, but |
6b31171 to
709394f
Compare
Decode settled aggregator swaps for a block and report what each trade put in and took out, with client and aggregator attribution. - Fetch receipts per block with eth_getBlockReceipts and trace matched transactions concurrently (bounded), keeping each block within its block time - Recover native ETH legs from the callTracer trace, since token->ETH and ETH->token swaps deliver ETH without emitting a log - Attribute client vs aggregator: direct swaps settle at the entry point; client-routed swaps (e.g. Relay) resolve the aggregator from the trace, falling back to the contract address when unknown Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a `hindsight verify` subcommand that decodes a block locally and diffs each transaction against Allium's aggregator_trades table as ground truth (allium.rs async Explorer client, verify.rs comparison by token, amount in bps, and aggregator). Split the CLI into `decode` and `verify` subcommands. Extend the decoder to catch filler-initiated intent fills (UniswapX, 1inch limit orders) by matching a known aggregator log signature and resolving the order maker by net flow. Add 1inch v5, the UniswapX reactor, and the Tycho router addresses. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
709394f to
9ed5bef
Compare
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.
JIRA Task