Skip to content

Conversation

@amandadalle
Copy link

Description: Adds full support for Plasma data across multiple Balancer V3 models on Hourly Spellbook and DEX.

Changes:

Updated models under dbt_subprojects/hourly_spellbook/models/_project/balancer:

  • balances
  • bpt
  • erc4626_tokens
  • flashloans
  • liquidity
  • pools
  • protocol_fee

Updated models under dbt_subprojects/dex/models/_projects/balancer:

  • labels
  • pools
  • trades

Added Plasma schemas and updated existing Balancer V3 sources accordingly.

[...]


quick links for more information:

amandadalle and others added 30 commits October 2, 2025 19:45
This commit introduces new Balancer V3 pools and general DEX trading logic for the Plasma blockchain, enabling data abstraction for this chain.

Key changes and dependency fixes across subprojects:
- **New Models:** Introduced models in hourly_spellbook and dex for Plasma data processing.
- **Dependency Resolution:** Added all necessary source definitions (e.g., balancer_v3_plasma, tokens_plasma, aave_v3_plasma, metamorpho_factory_plasma) to fix over a dozen 'Source Not Found' errors.
- **Project Fixes:** Resolved the cyclic dependency in Balancer BPT models and corrected schema references in the erc4626_token_mapping.sql model (Aave to aave_v3_plasma).
This commit introduces new Balancer V3 pools and general DEX trading logic for the Plasma blockchain, enabling data abstraction for this chain.

Key changes and dependency fixes across subprojects:
- **New Models:** Introduced models in hourly_spellbook and dex for Plasma data processing.
- **Dependency Resolution:** Added all necessary source definitions (e.g., balancer_v3_plasma, tokens_plasma, aave_v3_plasma, metamorpho_factory_plasma) to fix over a dozen 'Source Not Found' errors.
- **Project Fixes:** Resolved the cyclic dependency in Balancer BPT models and corrected schema references in the erc4626_token_mapping.sql model (Aave to aave_v3_plasma).
Removed plasma schema configuration from dbt_project.yml
Added database and schema fields for Aave V3 Plasma.
@github-actions github-actions bot marked this pull request as draft November 14, 2025 11:44
@github-actions github-actions bot added WIP work in progress dbt: dex covers the DEX dbt subproject dbt: hourly covers the hourly dbt subproject labels Nov 14, 2025
@amandadalle amandadalle marked this pull request as ready for review November 14, 2025 11:59
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Nov 14, 2025
@cursor
Copy link

cursor bot commented Jan 13, 2026

PR Summary

Introduces full Plasma coverage for Balancer V3 and wires it into existing cross-chain rollups.

  • Add Plasma models: labels_balancer_v3_pools_plasma, pools fees, trades (balancer_v3_plasma_base_trades, ..._trades), liquidity, BPT (transfers_bpt, bpt_prices, bpt_supply, bpt_supply_changes(_daily)), token balance changes (...token_balance_changes(_daily)), ERC4626 (..._erc4626_token_mapping, ..._erc4626_token_prices), LBPs, pools token weights, and protocol_fee
  • Include Plasma in aggregations/views: balancer_liquidity, pools_tokens_weights, pools_metrics_daily, view_pools_latest, balancer_protocol_fee, ERC4626 union models, and DEX trades wrapper for Plasma
  • Add Plasma sources: balancer_v3_plasma events, aave_v3_plasma, metamorpho_factory_plasma, tokens_plasma, and labels table; expose_spells/tags updated
  • Macro tweaks in balancer_protocol_fee_macro.sql: aggregate daily prices via AVG, use MAX(symbol) and simplified GROUP BY, add ERC4626 price joins and revenue share windowing
  • Schema/test updates to include Plasma and uniqueness constraints where applicable

Written by Cursor Bugbot for commit 84e9b93. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment @cursor review or bugbot run to trigger another review on this PR

meta:
blockchain: arbitrum, avalanche_c, base, ethereum, gnosis, optimism, polygon, zkevmn
contributors: victorstefenon, thetroyharris, viniabussafi
blockchain: arbitrum, avalanche_c, base, ethereum, gnosis, optimism, polygon, zkevmn, plasma
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plasma models missing from aggregation union queries

High Severity

The PR creates Plasma-specific models and updates schema files to document Plasma support in the blockchain metadata, but several aggregation SQL files were not updated to include the new Plasma models in their union queries. The affected files include balancer_bpt_supply.sql, balancer_bpt_prices.sql, balancer_transfers_bpt.sql, balancer_bpt_supply_changes.sql, balancer_bpt_supply_changes_daily.sql, balancer_token_balance_changes.sql, and balancer_token_balance_changes_daily.sql. This causes Plasma data to be absent from the main aggregated tables despite the documentation indicating it should be present.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dbt: dex covers the DEX dbt subproject dbt: hourly covers the hourly dbt subproject ready-for-review this PR development is complete, please review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants