Skip to content

Conversation

@henrystats
Copy link
Contributor

@henrystats henrystats commented Oct 13, 2025

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:


Note

Refactors Uniswap v4 liquidity fees by decoding PoolManager_call_ModifyLiquidity, adds fees_accrued/swap_fees_paid, updates sources and chain models, and adjusts daily aggregation and union config.

  • Uniswap v4 liquidity macro (uniswap_compatible_v4_base_liquidity_events):
    • Replace PoolManager_call_Take fee logic with decoding PoolManager_call_ModifyLiquidity outputs; deterministically pair calls↔events within tx.
    • Compute amounts directly from decoded callerDelta and fees from feesAccrued; emit modify_liquidity with amount0/1 and add fees_accrued events.
    • Add swap_fees_paid derived from PoolManager_evt_Swap (fee portions only).
    • Rework price join flow into final_liquidity_events.
  • Models:
    • Update all chain-specific Uniswap v4 base models to pass PoolManager_call_ModifyLiquidity.
    • Simplify uniswap_base_liquidity_events union model config (remove incremental settings/filter in union).
  • Aggregations:
    • Adjust uniswap_daily_agg_liquidity_events to double-count amounts for fees_accrued when summing (amount0/1_raw and amount0/1).
  • Sources:
    • Replace poolmanager_call_take with PoolManager_call_ModifyLiquidity across source schemas.
  • Misc:
    • Minor comment/refresh updates in auxiliary models (uniswap_liquidity_events, uniswap_tvl_daily).

Written by Cursor Bugbot for commit ac77d1e. Configure here.

@github-actions github-actions bot added WIP work in progress dbt: dex covers the DEX dbt subproject labels Oct 13, 2025
@henrystats henrystats marked this pull request as ready for review October 21, 2025 10:37
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Oct 21, 2025
@jeff-dude jeff-dude self-assigned this Oct 23, 2025
@jeff-dude jeff-dude added in review Assignee is currently reviewing the PR and removed ready-for-review this PR development is complete, please review labels Oct 23, 2025
Copy link
Member

@jeff-dude jeff-dude left a comment

Choose a reason for hiding this comment

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

in the future, it would be useful to have a CI workflow run end-to-end for more confidence on merge to main. ultimately, the seed tests are there for yourself to test the data quality of model outputs. if you'd prefer to remove those tests rather than modify the values within, that is fine too.

baseline expectation should be to always have a CI workflow run succeed, even if it's only last ~1 day of data or so.

@jeff-dude jeff-dude added ready-for-merging and removed in review Assignee is currently reviewing the PR labels Oct 23, 2025
@jeff-dude jeff-dude merged commit 2f145ea into duneanalytics:main Oct 24, 2025
4 of 5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dbt: dex covers the DEX dbt subproject ready-for-merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants