fix: use Wrap/Unwrap underlying amounts for Balancer V3 buffer swaps#9511
fix: use Wrap/Unwrap underlying amounts for Balancer V3 buffer swaps#9511gustavobftorres wants to merge 3 commits intoduneanalytics:mainfrom
Conversation
Join Vault_evt_Wrap/Unwrap with evt_index tie-break to avoid duplicate rows; COALESCE to Swap amounts when no buffer match. Fixes duneanalytics#9472.
|
bugbot run |
Bugbot couldn't runBugbot is not enabled for your user on this team. Ask your team administrator to increase your team's hard limit for Bugbot seats or add you to the allowlist in the Cursor dashboard. |
|
hey @gustavobftorres - this might be false red flag, but can you address this finding plz: High: Balancer V3 buffer-event matching assumes a fixed event order that does not hold on-chainThe new logic in
That means it assumes Balancer V3 always emits Live Ethereum data shows this assumption is false. Using the same join keys as the PR (
Concrete counterexamples:
Because the PR falls back to So the fix is incomplete: it resolves the happy-path ordering covered by the updated seeds, but it still leaves incorrect Balancer V3 trade amounts for real reverse-ordered buffer swaps. |
Thank you for contributing to Spellbook 🪄
Please open the PR in draft and mark as ready when you want to request a review.
Description:
Join Vault_evt_Wrap/Unwrap with evt_index tie-break to avoid duplicate rows; COALESCE to Swap amounts when no buffer match.
Fix for #9472
quick links for more information: