Skip to content

fix: change the ref on macros for erc4626 - #6

Merged
gustavobftorres merged 2 commits into
mainfrom
@gustavo/fix/erc4626
Apr 23, 2026
Merged

gustavobftorres merged 2 commits into
mainfrom
@gustavo/fix/erc4626

Conversation

@gustavobftorres

Copy link
Copy Markdown
Collaborator

problem

dune.balancer.v3_ethereum_protocol_fee returned NULL for protocol_fee_collected_usd on Fluid ERC4626 tokens (fwstETH/fWETH) because the macros were reading source('balancer_v3','erc4626_token_prices'), which lacked those rows.

files changed

  • macros/shared/balancer/balancer_protocol_fee_macro.sql
  • macros/shared/balancer/balancer_liquidity_macro.sql
  • macros/shared/balancer/balancer_bpt_prices_macro.sql
  • macros/shared/balancer/balancer_token_balance_changes_daily_agg_macro.sql
  • tests/protocol_fee/test_v3_ethereum_protocol_fee_fluid_erc4626_usd_not_null.sql

notes

Switched ERC4626 price lookup to ref(base_spells_namespace + '_v3_erc4626_token_prices') in all 4 macros and added a targeted regression test for the Fluid pool window. Query 7363642 now returns 4 non-null total_protocol_fee_usd rows in prod.

@gustavobftorres
gustavobftorres merged commit 8683f88 into main Apr 23, 2026
0 of 2 checks passed
@gustavobftorres
gustavobftorres deleted the @gustavo/fix/erc4626 branch April 23, 2026 17:35
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.

1 participant