Skip to content

fix(nexusmutual): capital_pool_mcr stale since 2025-10-30 (MCR merged into new Pool contract) - #9962

Open
rmelbardis wants to merge 1 commit into
duneanalytics:mainfrom
rmelbardis:nm-mcr-pool-merge-fix
Open

fix(nexusmutual): capital_pool_mcr stale since 2025-10-30 (MCR merged into new Pool contract)#9962
rmelbardis wants to merge 1 commit into
duneanalytics:mainfrom
rmelbardis:nm-mcr-pool-merge-fix

Conversation

@rmelbardis

Copy link
Copy Markdown

Bug fix: nexusmutual_ethereum.capital_pool_mcr has served a stale MCR value since 2025-10-30.

In Nexus Mutual's 2025-10-30 release, the standalone MCR contract (0xcafea92739e411a4d95bbc2275ca61de6993c9a7) was retired and MCR logic moved into the new Pool proxy. The event signature is unchanged (topic0 0x6e87c25e322c4ad68faf7916d0788baaf714d806fe887a84ee4b84ad9666f686) and is already decoded as nexusmutual_ethereum.Pool_evt_MCRUpdated, but the spell only reads the retired contract's tables, so its forward-fill repeats the 2025-10-30 value indefinitely.

Expected value (block explorer): https://etherscan.io/address/0xcafea91714e55756c125b509274ede9bc91697cb#events — latest MCRUpdated (2026-08-20) has mcr ≈ 10,176.8 ETH.
Incorrect value (Dune): select max(block_date), max_by(mcr_eth_total, block_date) from nexusmutual_ethereum.capital_pool_mcr → stuck at 7,556.6 ETH (~26% understated).
Scale: every row since 2025-10-30 (~300 days); feeds the MCR and MCR% charts on the Nexus Mutual Capital Pool dashboard.

Fix: add Pool_evt_MCRUpdated as a third union branch in mcr_events (identical column names) and register the source.

@github-actions
github-actions Bot marked this pull request as draft August 21, 2026 16:07
@github-actions github-actions Bot added the WIP work in progress label Aug 21, 2026
@cursor

cursor Bot commented Aug 21, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Narrow dbt source/union change for a downstream analytics view; no auth, funds, or protocol logic. Downstream MCR/MCR% figures will change for dates after 2025-10-30.

Overview
Stops nexusmutual_ethereum.capital_pool_mcr from forward-filling a stale MCR after Nexus Mutual moved MCR updates off the retired MCR contract (2025-10-30).

Adds a third mcr_events union on Pool_evt_MCRUpdated (same columns as MCR_evt_MCRUpdated) and registers that source so daily MCR totals pick up post-merge events.

Reviewed by Cursor Bugbot for commit cd3364d. Configure here.

@github-actions github-actions Bot added the dbt: daily covers the Daily dbt subproject label Aug 21, 2026
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@rmelbardis

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Aug 21, 2026
@rmelbardis
rmelbardis marked this pull request as ready for review August 21, 2026 16:21
@github-actions github-actions Bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Aug 21, 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 ready-for-review this PR development is complete, please review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant