Start DIN-DAO
Maintainers usually reply within 1 day
@robertocarlous is already working on this.
Since Jul 15, 2026.
Assessment
This issue has not been assessed yet.
Description
Branch: feat/din-dao
Assignee: @robertocarlous
Roadmap ref: P3-5.1 (DAO governance hooks) · ROADMAP Discussion §1 · Developer/issues/decentralized-governance.md
Long-running issue. DIN does not need a live DAO today: devnet 1.0 is released; devnet 2.0, devnet 3.0, testnet 1.0, and testnet 2.0 are still ahead. DAO governance is expected to activate devnet 3.0 onwards, with binding on-chain governance hardening through the testnets. This issue tracks the whole effort — design first, contracts behind
feat/din-dao, staged activation later. Detailed task files underDeveloper/tasks/will follow per stage.
Goal
Design and implement the DIN-DAO: the contract layer that progressively replaces the centralized DIN-Representative admin key (owner() / daoAdmin) with multisig, timelocked, and eventually token-vote-driven governance over the platform contracts (DinCoordinator, DinValidatorStake, DINModelRegistry, and the PR #13 ProxyAdmin).
Contracts live in foundry/src/ (suggested: foundry/src/dao/). Design and documentation are first-class deliverables, not afterthoughts.
What already exists in the repo (survey result)
There is substantial conceptual design but no contract-level architecture and no governance code:
Developer/issues/decentralized-governance.md— the main prior design work. Defines governance domains (parameter / policy / operational / treasury / upgrade), a proposal lifecycle (draft → discussion → creation → vote → queue → timelock → execute), per-category thresholds, and a layered architecture (voting power / proposal / voting / timelock / emergency). Key decisions already taken there: no raw quadratic voting; voting power from staked or locked DIN at a snapshot, not free balances; timelocked execution; narrow, expiring emergency powers.Documentation/dindao.md— operational doc for the current, centralized "DIN DAO" (the DIN-Representative runningdincli dindao ...). This is the admin surface the DAO must eventually own.Developer/ROADMAP.mdDiscussion §1 + P3-5.1 — DAO hooks land in P3 asonlyOwnerparameter setters with a documented path to multisig/DAO; DAO is deliberately not scheduled ahead of slashing/staking/testnet readiness.Developer/issues/tokenomics.md§7 — token policy (issuance rate, treasury withdrawal, fees) flagged as centralized; recommends timelocked rate changes and moving owner powers to DAO execution.Developer/issues/staking-mechanism.md— future governance-only confiscation path for permanently blacklisted stake (must execute via accepted DAO proposal, not interim admin).Developer/issues/indexer.md— governance contracts should be designed events-first; proposal lists, voter histories, and dashboards belong in the indexer, not in on-chain enumeration.hardhat/contracts/DINModelRegistry.solsetDAOAdmin— already documented as the "multisig / timelock migration path". PR #13 converts this toOwnabletwo-step ownership, which is exactly the handle the DAO takes over.- OpenZeppelin governance primitives (
Governor,TimelockController,Votes) are already vendored atfoundry/lib/openzeppelin-contracts/contracts/governance/— no new dependency needed.
Conclusion: no DIN-DAO architecture is built. The production-grade design below is proposed as the baseline for this issue; challenge it in the design doc where you disagree.
Reference implementation: DAOFLcode
https://github.com/umermajeedkhu/DAOFLcode/tree/main/contracts is a prior DAO-for-federated-learning prototype worth mining for patterns, not for code:
MultiSigC.sol— multisig with selector-typed proposals (bytes4 selector => ContractCallTypewith per-type configuration, open-proposal caps per approver, and an explicitNotExist → Open → Executable → Closed/Executedproposal state machine). The typed-proposal idea maps directly onto DIN's per-category thresholds.DAOC.sol/DAOFLC.sol— membership-NFT (ERC-721) based DAO with GI-aware proposals (proposal ↔ global-iteration mapping).- Caveats: Solidity 0.8.7 / OZ 4.x era (
Counters, string reverts), hand-rolledOwnable, no timelock, no snapshot voting, no delegation. Treat it as a pattern reference; the DIN implementation should be built on the vendored OZ 5.x governance stack, custom errors, and the repo's conventions (solc 0.8.28,via_ir, NatSpec per P3-6.3b).
Proposed architecture (production-grade baseline)
Progressive decentralization in four stages. Each stage is independently shippable and matches a network milestone.
Stage A — Multisig (build now, shadow-operate in devnet 2.0)
DinMultisig.sol — an N-of-M multisig with typed proposals (DAOFLcode MultiSigC pattern, modernized):
- proposal = target + calldata + category; confirm / revoke / execute; explicit state machine
- per-category confirmation thresholds (e.g. 2-of-3 for fee changes, 3-of-3 for treasury/upgrades)
- events for every transition (indexer-first, per
Developer/issues/indexer.md) - Document the tradeoff vs. adopting Gnosis Safe on OP Sepolia in the design doc. Writing our own keeps the devnet self-contained and auditable in-tree; Safe is the battle-tested choice for mainnet treasury later. Both paths must be covered in the doc even if we build our own first.
Stage B — Timelock owns the platform (devnet 3.0 activation target)
DinTimelock.sol — thin instantiation of OZ TimelockController:
- becomes
owner()ofDinCoordinator,DinValidatorStake,DINModelRegistry, and the PR #13ProxyAdmin(upgrade governance) DinMultisigholdsPROPOSER_ROLE+CANCELLER_ROLE;EXECUTOR_ROLEopen or multisig-gated (document choice)- minimum delay per risk class: short for bounded parameter changes, long for upgrades/treasury (two timelock instances or per-operation salt conventions — document the chosen mechanism)
- This stage is the smallest meaningful decentralization step (Phase 1 of
decentralized-governance.md): every admin action becomes visible on-chain before it executes, with a cancellation window.
Stage C — Token-vote governance (testnet 1.0 → 2.0)
DinGovernanceStaking.sol(working namestDIN) — voting power source. Locks DIN, mints non-transferable, checkpointed voting power implementing OZIVotes(delegation + snapshot at proposal creation). This enforces the two standing decisions: no free-balance voting, no raw quadratic voting. Whether validator stake inDinValidatorStakealso counts (hybrid) is an open design question — answer it in the design doc with the economic rationale.DinGovernor.sol— OZGovernor+GovernorSettings+GovernorCountingSimple+GovernorVotes+GovernorVotesQuorumFraction+GovernorTimelockControl, executing throughDinTimelock. Proposal threshold, voting delay, voting period, quorum fraction all governance-settable.- Per-category thresholds (simple majority for parameters; supermajority + longer delay for treasury/upgrades): OZ Governor is single-track, so document and pick one of — (a) two governor instances routed to two timelocks, (b) a category registry checked in
propose(), or (c) start single-track and split later. The multisig retainsCANCELLER_ROLEas a safety brake during this transition.
Stage D — Emergency layer (with Stage C)
DinGuardian.sol — narrow, expiring emergency authority:
- scope limited to protective actions only: disable a model, deauthorize a slasher, pause a dangerous flow
- every emergency action expires unless ratified by normal governance within a fixed window; restorative actions (re-enable, unblacklist) always go through normal governance
- guardian role held by the multisig, revocable by governance
Explicit non-goals (for this issue)
- No quadratic voting (see
decentralized-governance.md— signaling-only, if ever, and off-chain) - No task-level governance — task contracts stay model-owner-driven
- No on-chain proposal browsing/enumeration helpers — dashboards come from the indexer (P4-IDX work)
- No mainnet treasury custody decisions yet — Safe-vs-own-multisig is documented, not committed
Integration points to design around
- PR #13 upgradeable contracts:
ProxyAdminownership is the upgrade-governance handle; storage layout rules (__gap, append-only) apply to any upgradeable DAO contract. - P3-5.1/5.2/5.3 (token utility, emission, fees): their
onlyOwnersetters are the DAO's future surface — no signature changes needed if they follow the plain-setter convention; flag any that don't. dincli dindao: current direct admin calls eventually become propose → queue → execute flows. CLI work is out of scope here, but the design doc must specify the command mapping so the SDK/daemon issues (#20, #21) can plan for it.- Slashing/dispute work (P3-4.x): dispute resolution and blacklist appeal flows will name the DAO as final arbiter — coordinate interfaces with Umer's slashing spec.
Deliverables
- Design doc
Documentation/technical/din-dao/README.md: architecture, stage rollout mapped to network milestones (devnet 2.0 / 3.0, testnet 1.0 / 2.0), category-threshold table, voting-power model decision (locked vs. hybrid with stake), Safe-vs-own-multisig tradeoff, answers to the open questions inDeveloper/issues/decentralized-governance.md - Contracts in
foundry/src/dao/:DinMultisig.sol,DinTimelock.sol,DinGovernanceStaking.sol,DinGovernor.sol,DinGuardian.sol+ interfaces (solc 0.8.28, custom errors, NatSpec, events-first) - Foundry tests in
foundry/test/dao/: full proposal lifecycle e2e (propose → vote → queue → execute against a real platform-contract call), timelock delay enforcement, quorum/threshold edges, delegation checkpoints, multisig confirm/revoke/execute, guardian action expiry + ratification; fuzz/invariant tests (voting power conservation, nothing executes before its delay) per P3-6.3b conventions - Ownership-transfer runbook: exact ordered steps to move
owner()/daoAdminof each platform contract to the timelock, with rollback notes (extendsDocumentation/dindao.md§5) - Update
Developer/issues/decentralized-governance.mdwith decisions made (keep it as the rationale record; the new design doc is the spec)
Suggested sequencing
- Design doc first — get the stage boundaries and voting-power decision reviewed before writing Solidity
DinMultisig+DinTimelock+ tests (Stage A/B is the bulk of near-term value)DinGovernanceStaking+DinGovernor+DinGuardian(Stage C/D — can trail by weeks; nothing activates before devnet 3.0)
No hard deadline: nothing in P3 blocks on this, and P3-5.x setter work should not wait for it. The design doc, however, is worth landing early so the P3-5.x contracts expose the right governance surface.
- Dominant language
- Python
- Stars
- 4
- Forks
- 7
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 34
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from InfiniteZeroFoundation/DevNet
-
ROADMAP.md: refresh "What is still open for P3" (several items were fixed in October)Possibly taken @umermjd11 claimed this 4 days ago. Opendocumentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
InfiniteZeroFoundation/DevNet#285 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Update the 25 translated organisation READMEs to match the English versionPossibly taken @mrCabez claimed this 1 day ago. Opengood first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
InfiniteZeroFoundation/DevNet#277 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Update the client-service guide to explain training and uploading separatelyPossibly taken @Santiagocetran claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
InfiniteZeroFoundation/DevNet#266 · 1 assignee ·
Maintainers usually reply within 1 day
-
Few questions related to GI2 aggregatorPossibly taken @Abidoyesimze claimed this today. Open
InfiniteZeroFoundation/DevNet#307 · 1 reaction · 4 assignees ·
Maintainers usually reply within 1 day
-
bug python
Difficulty 4/5 3-5 days Newbie friendliness 52/100
InfiniteZeroFoundation/DevNet#306 ·
Maintainers usually reply within 1 day
All issues in InfiniteZeroFoundation/DevNet
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 65/100
EclipseFdn/open-vsx.org#15057 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
FinanceFlash/unvibecode#349 ·
-
Mission statement: why this is free, in the README, Why This Exists and the wiki HomePossibly taken @ChiefGyk3D claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ChiefGyk3D/Clouds-Against-Humanity#348 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
vllm-project/vime#508 ·
Maintainers usually reply within 4 days