feat(web): DAO governance intelligence - outcome analytics, executed timeline, governor drift#71
Merged
Merged
Conversation
…timeline, governor drift Expand the governance-intelligence panel with three registry-derived views the official tools don't surface. All read-only; voting still happens on the official DAO. - Outcome analytics: scans every proposal and reports pass rate, quorum-hit rate, and the state breakdown (e.g. Ethereum: 30 proposals, 83% pass, 83% quorum hit, 25 executed / 4 defeated / 1 canceled). - Executed timeline: what governance has actually enacted, decoded into plain English (e.g. "Authorize Migration of the DAO Treasury from Ethereum" - which itself explains the near-empty Ethereum treasury). - Governor drift: side-by-side Ethereum vs LightChain comparison highlighting the parameters that differ (7d vs 14d voting, 3% vs 30% quorum, 30 vs 0 proposals), making the in-progress migration legible at a glance. Internals: extract the chunked multi-RPC ProposalCreated scan into a shared lib (lib/dao-governor-scan) used by both the proposals and analytics routes; the new dao-analytics route batches per-proposal reads to stay within free-RPC limits. Pure outcome aggregation lives in lib/dao-analytics and is unit-tested (+7 tests).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expands the governance-intelligence panel with three registry-derived views the official tools don't surface. All read-only - voting stays on dao.lightchain.ai.
1. Outcome analytics
Scans every proposal and reports pass rate, quorum-hit rate, and the state breakdown. Live Ethereum result: 30 proposals, 83% pass rate (25/30), 83% quorum hit,
{executed: 25, defeated: 4, canceled: 1}.2. Executed timeline ("what governance actually did")
The executed proposals, with their calldata decoded into plain English and privileged actions flagged. Real examples it surfaces: "Approve BitMart Listing Agreement", "Authorize Migration of the DAO Treasury from Ethereum" (which itself explains the near-empty Ethereum treasury), "Authorize Exchange Liquidity Provisioning".
3. Governor drift (Ethereum vs LightChain)
Side-by-side comparison that highlights the parameters that differ - 7d vs 14d voting, 3% vs 30% quorum, 30 vs 0 proposals, treasury balances - making the in-progress migration legible at a glance.
Internals
ProposalCreatedscan intolib/dao-governor-scan, now shared by the proposals + analytics routes (removes ~100 lines of duplication)./api/dao-analyticsroute batches per-proposal reads (groups of 6) to stay within free-RPC limits.lib/dao-analytics, unit-tested (+7 tests).Verification
tscclean,next buildclean, ESLint clean, 485/485 tests pass. Verified live: analytics returns real stats + decoded executed actions for Ethereum, and degrades cleanly to "nothing to analyze" for LightChain (0 proposals).