Repository navigation
Description
Summary
PR #237 ships the production v3 contract surface (StakingRegistry, StablePaymentChannel, SlashJudge, BuybackBurner, ContentBlacklist, WatchtowerEscrow per ADR 016) but does not include the DAO governance plumbing: Governor, TimelockController, and ERC20Votes-extended TOKEN. The contracts that PR #237 lands have parameter setters gated by AccessControl roles that will, in production, be held by TimelockController — but the Timelock contract doesn't exist yet, and neither does the Governor that proposes against it.
This issue tracks the follow-up PR that adds the governance layer, gated on ADR 026 / 029 / 030 stabilizing in #338.
Why poc-blocking
Per ADR 023, the wiring layer in crates/node selects between PoC and production for each contract via #[cfg]-free runtime selectors. The PoC path uses an admin-key holder; the production path needs a deployed Governor + TimelockController to bind to. The selectors cannot be exercised against production without these contracts existing — meaning PoC end-to-end tests of "production wiring path" cannot be authored, and any mainnet-shaped integration test is blocked.
Scope
Per ADR 009 (production governance) + ADR 026 §11 (six FeeRouter shares + boostFloor governable) + ADR 029 (adaptive parameters bounded by §11) + ADR 030 (multisig fast-track caps + standard governance proposal path):
- TOKEN extended with OZ
ERC20Votesso historical voting weight is queryable. Note ADR 026 §9 specifies vote source isVotingEscrow.balanceOfAt, notTOKEN.getPastVotes— but the underlying TOKEN still needsERC20Votesfor downstream wallet/dapp compatibility, even though Governor reads from the escrow. VotingEscrowcontract per ADR 026 §4 (non-transferable, max 4y lock, no early exit,balanceOfAt/totalSupplyAtcheckpoints). This is where Governor reads voting weight from.DecdnGovernorextending OZGovernor,GovernorSettings,GovernorVotes,GovernorVotesQuorumFraction,GovernorTimelockControl. Vote source:VotingEscrow. Defaults per ADR 026 §9: 7-day vote, 0.1% proposal threshold, 4% quorum, ≈9-day total latency.TimelockControllerwith 48-hour delay per ADR 009. Owns the parameter-setter roles on the v3 contracts. Custodian of the protocol-treasury 5% bucket per ADR 026 §2.SafetyReservepayout authorization wiring per ADR 026 §5 (Governor + emergency-multisig fast-track within hard caps per ADR 030 §1).
Dependencies
- PR docs(adr): tokenomics v3 rollout — ADRs 026-032 + 11 ADR mods #338 merged (ADR 026/029/030 locked in)
- PR feat(contracts): scaffold PoC EVM contract set per ADR 016 #237 merged (the v3 contracts to be governed)
Acceptance
forge testcovers governance lifecycle: propose → vote → queue → execute, against a mock target on each governable parameter listed in ADR 016 §"Governance-Controlled Parameters".- Emergency-multisig fast-track paths (per ADR 009 + ADR 026 §5 + ADR 030 §1) are wired with hard-cap reverts when caps are exceeded.
- Deploy script (per ADR 016 §2 dependency order) deploys the full stack and atomically transfers the parameter-setter roles from deployer to Timelock.
- The PoC wiring layer in
crates/nodecan select the production governance path in tests (even if the PoC default remains admin-key).
Out of scope
- Governance UI / proposal dashboard (frontend work).
- Off-chain proposal-discussion forum.
- Vote-mirroring policy for
SveToken(ADR 028.1) — that's its own deferred ADR.
Related
- PR feat(contracts): scaffold PoC EVM contract set per ADR 016 #237 — the v3 contract surface to extend
- PR docs(adr): tokenomics v3 rollout — ADRs 026-032 + 11 ADR mods #338 — ADR 009 / 026 / 029 / 030 with the governance design these contracts honour
- ADR 009 (governance model), ADR 016 (contract interactions), ADR 023 (PoC/production seams)
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
thiras commentedon May 28, 2026
Closing — most of this shipped, and the remaining items have pivoted enough that fresh issues are clearer than reviving this thread.
What landed:
DecdnGovernor(contracts/src/DecdnGovernor.sol) extendingGovernor,GovernorCountingSimple,GovernorTimelockControl— 7-day vote, 0.1% proposal threshold, 4% quorum, 48h Timelock.TimelockControllerwired via the OZ stock contract (no subclass needed) through the Governor constructor.SafetyReserve(contracts/src/SafetyReserve.sol) withEMERGENCY_MULTISIG_ROLE,fastTrackAppeal, andMAX_APPEAL_RESTITUTIONhard-cap reverts (RestitutionExceedsCap).FeeRouter,CapacityBond,DecdnGovernor,PublisherRegistry,SafetyReserve.What changed vs. this issue's scope:
VotingEscrowandERC20Votesare intentionally not used. Per ADR 036, voting weight is derived fromFeeRouter.bytesInWindow × age_ramp × per-operator cap, not from per-account checkpoint structures. Governor reads fromFeeRouter/CapacityBonddirectly — seeDecdnGovernor.sol:21-23. This supersedes the §9 ve-token model assumed in the original scope.crates/nodeselector for production governance" item is moot. ADR 023 has been demoted toappendix-poc-production-seams.md, and the Rust node consumesFeeRouter/CapacityBondviews viacrates/incentive— it doesn't bind to Governor. Timelock-holds-GOVERNANCE_ROLEis a deploy-script concern, not a runtime selector.Genuinely open work, split off:
DecdnGovernor.t.solskips the lifecycle dance and only covers vote-weight/snapshot semantics + setter bounds.DeployProtocol.s.solper ADR 016 §2 deployment order with atomic deployer→Timelock role handoff. OnlyTestnetFaucet.s.solexists today.Two smaller verifications worth filing if not already covered:
EMERGENCY_MULTISIG_ROLEper ADR 016 line 687 is wired.ContentBlacklistemergency surface (emergencyAdd/emergencyAddOrigin/suspendRegionalBody) exists with 14-day expiry per ADR 016.