Skip to content

fix(balancer): resolve ERC4626 wrappers to underlying in v3 trades#9694

Draft
kkqzhou wants to merge 1 commit into
duneanalytics:mainfrom
kkqzhou:fix/monad-balancer-upgrade
Draft

fix(balancer): resolve ERC4626 wrappers to underlying in v3 trades#9694
kkqzhou wants to merge 1 commit into
duneanalytics:mainfrom
kkqzhou:fix/monad-balancer-upgrade

Conversation

@kkqzhou

@kkqzhou kkqzhou commented May 22, 2026

Copy link
Copy Markdown
Contributor

The v3 macro already substituted underlying amounts from matched Wrap/Unwrap events but kept the wrapped (wn*) token addresses, leaving rows internally inconsistent (underlying amount, wrapped address) and unpriceable downstream in dex.trades.

Substitute the address too when wrap/unwrap matched and the ERC4626 mapping has the underlying. Also seed wnWMON -> WMON on Monad, which never appears in Vault_evt_LiquidityAddedToBuffer and so was missing from the auto-derived mapping. Recovers ~$2.4M/day of previously NULL-priced volume in monad balancer dex.trades.

Thank you for contributing to Spellbook 🪄

Please open the PR in draft and mark as ready when you want to request a review.

Description:

[...]


quick links for more information:

The v3 macro already substituted underlying amounts from matched
Wrap/Unwrap events but kept the wrapped (wn*) token addresses,
leaving rows internally inconsistent (underlying amount, wrapped
address) and unpriceable downstream in dex.trades.

Substitute the address too when wrap/unwrap matched and the ERC4626
mapping has the underlying. Also seed wnWMON -> WMON on Monad, which
never appears in Vault_evt_LiquidityAddedToBuffer and so was missing
from the auto-derived mapping. Recovers ~\$2.4M/day of previously
NULL-priced volume in monad balancer dex.trades.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions github-actions Bot marked this pull request as draft May 22, 2026 20:56
@github-actions github-actions Bot added WIP work in progress dbt: dex covers the DEX dbt subproject dbt: daily covers the Daily dbt subproject labels May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dbt: daily covers the Daily dbt subproject dbt: dex covers the DEX dbt subproject WIP work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant