ByAUJay
Building a DAO Security Posture: From Multisig to Formal Verification
A practical, up-to-date guide to hardening DAO operations—covering treasury multisigs, governance design, timelocks, upgradeability, monitoring, and formal verification—so decision‑makers can move from “safe enough” to institution‑grade assurance.
DAO security has changed significantly since 2023–2025: governance takeovers, off‑chain/on‑chain execution plugins being deprecated, and new verification and monitoring tools becoming mainstream. Below is a concrete, staged blueprint your team can adopt within a quarter.
Why posture matters now
- In May 2023, Tornado Cash governance was briefly seized by a malicious proposal that embedded hidden voting logic—total control over the DAO’s governance contract was achieved until the attacker handed back control days later. That attack didn’t break the protocol’s core contracts, but it did drain governance tokens and showed how proposal text can mislead while code prevails. (coindesk.com)
- In April 2022, Beanstalk’s emergency governance path plus flash‑loaned voting power enabled a same‑day malicious proposal execution that drained ~$182M. The design allowed an “emergencyCommit” to bypass the normal lifecycle once a supermajority threshold was flash‑assembled. (medium.com)
- In late 2023, the KyberSwap incident showed attackers even leverage post‑exploit leverage to demand DAO control or governance concessions. Your recovery plan must assume negotiations with attackers and social pressure on a DAO. (auditone.org)
These episodes illustrate that a DAO’s “security” is a chain: treasury control, governance mechanics, upgradeability, monitoring and response, and code correctness. One weak link breaks the rest.
Stage 1 — Multisig treasury, but modernized
Most DAOs and on‑chain businesses start with a Safe (formerly Gnosis Safe) multisig. Treat it as your “root of trust,” then harden it with today’s modules and guardrails.
- Pick a signer/threshold pattern that fits operations—not one that just “sounds safe”
- Use at least 2+ signers and threshold >1; keep the threshold lower than total signers to allow recovery if a signer is lost. For small teams, a common pattern is 3 signers (1 MetaMask, 2 hardware wallets) with a 2‑of‑3 threshold; for organizations, 3‑of‑5 or 4‑of‑7 is typical. (help.safe.global)
- Turn on off‑chain (gas‑less) signature collection
- Safe can collect signatures off‑chain and post one transaction on execution. Benefits: speed, privacy, fewer signer wallets needing gas. If you’re very risk‑averse, you can self‑host the transactions indexer. (help.safe.global)
- Add “defense-in-depth” via Guards and Module Guards
- Safe Guards can pre‑check and post‑check each transaction; a broken guard can block execution, so audit it and keep a recovery path. Use a Module Guard to vet module‑originated calls, not just owner‑initiated calls. (docs.safe.global)
- Example: deploy a “NoDelegatecallGuard” (tutorial available) to block dangerous delegatecalls unless explicitly allowed. (docs.safe.global)
- Permission routine ops with scoped roles (without reducing treasury security)
- Use the Zodiac Roles Modifier to define granular, on‑chain permissions (allowed contracts, functions, parameter constraints, rate limits), so ops teams can execute bounded actions with fewer signatures while major ops still require the full threshold. (docs.roles.gnosisguild.org)
- A documented pattern: keep the main Safe at 3/5, but route pre‑approved “low‑risk” calls through a 2/5 Safe + Roles for speed. (docs.roles.gnosisguild.org)
- Add an execution Delay (timelock) for module‑triggered actions
- The Zodiac Delay Modifier enforces a cooldown between proposal and execution for module calls; during the window, owners can cancel. This gives your community time to react to errors or compromises. (zodiac.wiki)
- Simulate and scan every transaction
- Safe integrates simulation and scanning (Safe Shield, risk signals) before execution; use it, and require signers to review human‑readable call data and simulation traces. (safe.global)
Outcome: A treasury and operational multisig setup that’s fast for daily work, but layered with Guards, Delay, and Roles so a single compromised key or interface cannot drain funds or push through arbitrary calls.
Stage 2 — Add on‑chain governance safely (Governor + Timelock)
When your organization needs broader participation and transparency, step up to on‑chain governance. The de facto standard is OpenZeppelin Governor with a TimelockController. Key choices:
- Use a timelock executor
- Pair Governor with TimelockController (or Compound Timelock) so proposals queue with a delay; the timelock becomes the asset owner. Don’t forget: permissions must be attached to the timelock, not the Governor. (docs.openzeppelin.com)
- Configure the vote clock deliberately (EIP‑6372)
- Governor now aligns to your token’s “clock” (blocknumber vs timestamp); Tally supports both. If you operate on L2s where block times differ, confirm clock mode so voting windows behave as intended in your UI. (docs.openzeppelin.com)
- Choose quorum and counting modules that fit your token
- Popular choices: GovernorVotesQuorumFraction for supply‑based quorums; GovernorCountingSimple for Against/For/Abstain; v5 adds fractional counting (split votes) and super‑quorum options where early success can finalize ahead of the deadline. (docs.openzeppelin.com)
- Prevent last‑minute steamrolls
- The GovernorPreventLateQuorum extension ensures a minimum duration remains after quorum is hit; add it to reduce “quorum sniping” near the deadline. (newreleases.io)
- Plan for UI support and migrations
- Tally supports OpenZeppelin Governor and documents v5 compatibility; Compound itself migrated from GovernorBravo to a modern OZ Governor in Jan–Feb 2025 with a public moratorium window (2‑day delay, 3‑day vote, 2‑day timelock). These concrete timelines can anchor your own rollout plan. (docs.tally.xyz)
- Consider Guardian and veto patterns for protocol upgrades
- Several ecosystems use guardian veto windows, security councils, or legal‑veto periods (e.g., zkSync governance extensions) to pause or block rushed upgrades, while still decentralizing control. (openzeppelin.com)
Outcome: On‑chain governance with explicit delay, transparent execution, and guardrails against late‑stage manipulation.
Stage 3 — Off‑chain voting with trust‑minimized execution (know what’s changing)
If you rely on Snapshot for gasless off‑chain voting, you still need secure on‑chain execution:
- UMA oSnap (Optimistic Snapshot Execution) is being deprecated; support ends on December 15, 2025. If your DAO uses oSnap, follow the official migration guide now. (docs.snapshot.box)
- Alternatives include the Zodiac Reality Module, which brings off‑chain outcomes on‑chain via Reality.eth with arbitration options; design your bond, challenge period, and arbitrator carefully. (zodiac.wiki)
Best practice: Treat off‑chain → on‑chain bridges as “optimistic” systems—use meaningful challenge windows (e.g., 48–96 hours), a timelock on the target Safe, and monitoring/alerting so challengers can react.
Stage 4 — Upgradeability and admin safety you can prove
Many DAOs run upgradeable contracts. Get this wrong and a single call can brick governance or bypass your timelock.
- Standardize on ERC‑1967 storage slots and UUPS/transparent proxies correctly
- Know the implementation/admin slots, emit events, and don’t mix proxy patterns accidentally. UUPS implementations must protect upgrade entry points and authorize upgrades; never assume “the proxy protects me.” (eips.ethereum.org)
- Don’t reuse ProxyAdmin from older setups
- OpenZeppelin warns that reusing a pre‑v5 ProxyAdmin can disable upgradeability; follow the up‑to‑date plugin guidance when migrating fleets. (github.com)
- Queue upgrades through a timelock and simulate on forks
- Every upgrade should be: proposed → queued with delay → simulated (full end‑to‑end) → executed. If your Governor is the proposer, ensure only the timelock (not an EOA) is the privileged owner. (docs.openzeppelin.com)
- Learn from L2 security councils
- Arbitrum and Optimism operate multi‑sig security councils with thresholds and delays appropriate for “emergency” vs “non‑emergency” actions, plus liveness checks and staged decentralization goals. Borrow their patterns for critical admin keys. (forum.arbitrum.foundation)
Outcome: Upgrades become auditable, delayed, and authorization‑scoped—reducing the chance an admin path undoes your governance.
Stage 5 — Adopt formal verification where it pays off
Static analysis and fuzzing are table stakes; formal verification is now practical for DAO‑critical paths.
- Make Slither and Echidna part of CI
- Slither (static analyzer) and Echidna (property‑based fuzzing) catch common bugs and enforce invariants continuously. Run them on every PR. (github.com)
- Use Foundry for scenario and invariant tests; add cross‑tool parity
- Foundry’s invariant testing is popular; frameworks like Chimera let you write invariants once and run them across Echidna/Medusa/Halmos to increase coverage. (github.com)
- Bring in formal verification for “governance‑can‑change‑everything” paths
- Certora Prover is now open‑source (2025) and widely used to prove critical properties with mathematical assurance. You can specify “Governor/Timelock can never execute a call unless delay ≥ X,” “No function can reduce quorum below Y without Z approvals,” or “Only timelock can upgrade proxy.” (certora.com)
- Example properties to verify (sketches)
- Timelock delay is enforced on all queued ops:
rule all_executions_are_delayed(method exec) { env e; calldataarg args; // Only allow Timelock to execute require e.msg.sender == Timelock; // Assume a queued operation exists at id // (model your queue data structure; omitted for brevity) // Assert the operation's eta <= now exec(e,args); assert block.timestamp >= queued_op_eta(args.proposalId), "Timelock delay must elapse before execution"; }
- Only Timelock (not Governor or EOAs) can change proxy implementation:
rule only_timelock_can_upgrade() { env e; address newImpl; require e.msg.sender != Timelock; try Proxy.upgradeTo(e, newImpl) { assert false, "Non-timelock cannot upgrade"; } catch {} }
- Proposal parameters hashing forbids “parameter smuggling”:
rule execution_targets_match_queued() { env e; calldataarg args; // On execute, targets/calldatas must equal the hash queued at queue time exec(e,args); assert keccak256(args.targets, args.values, args.calldatas) == storedProposalHash(args.proposalId), "Executed payload must equal queued payload"; }
Use Prover’s coverage and multi‑assert modes to ensure specs cover your real code paths. (docs.certora.com)
Outcome: Your most dangerous pathways—governance execution and upgrades—have machine‑checked guarantees, not just “we’re pretty sure.”
Stage 6 — Monitoring, detection, and incident response
Real‑time alerting plus deterministic emergency procedures make the difference between a scare and a loss.
- Subscribe to protocol‑specific Forta bots and wire alerts to action
- Forta’s community‑maintained bots (Scam Detector, Attack Detector 2.0, stablecoin and DeFi kits) monitor funding‑prep‑exploit‑laundering phases, often catching patterns minutes before exploitation—enough to trigger pauses or revoke roles via your timelock. (docs.forta.network)
- Define auto‑response hooks
- Map Forta alerts to an “emergency runbook”: pause module, add a guard, or raise timelock delays. If you’re still on OpenZeppelin Defender, plan your move to self‑hosted open‑source Relayer/Monitor before July 1, 2026 (Defender sunset timeline). (blog.openzeppelin.com)
- Watch governance events on treasuries and timelocks
- Use Forta’s templates to alert on Safe events, privileged function calls, or interactions from sanctioned mixers (e.g., Tornado Cash‑funded addresses). Route to PagerDuty/Slack for signers and security council members. (docs.forta.network)
Outcome: Your multisig and governance stack is not just “secure”—it’s observable, with pre‑approved emergency levers wired to alerts.
Lessons from recent governance migrations and councils
- Compound’s 2025 migration scheduled an explicit moratorium: proposal delay, voting, and timelock windows were communicated upfront, reducing confusion and race conditions. Emulate this: treat governance upgrades like protocol releases with freeze windows. (comp.xyz)
- Security councils are evolving. Arbitrum advanced to 9/12 thresholds—including instant‑upgrade and delayed‑upgrade paths—while Optimism added liveness modules and raised thresholds; both publish design rationales you can reuse. (forum.arbitrum.foundation)
- zkSync governance added guardian veto periods and settable fixed quorums to balance responsiveness and decentralized control—proof that “one‑size‑fits‑all” governance rarely works. (openzeppelin.com)
Putting it together: a 90‑day roadmap
Week 0–2: Baseline and quick wins
- Inventory signers, thresholds, and modules across all Safes. Enable simulation and set signer SOPs (never sign without simulation; compare human‑readable decodes). (safe.global)
- Add a Guard to block delegatecall and a Module Guard for any module that can execute on your Safe. Add Zodiac Delay with 48–72h cooldown for module‑initiated actions. (docs.safe.global)
- Stand up Forta subscriptions for key contracts; connect to your incident channels. (docs.forta.network)
Week 3–6: Governance hardening
- If using Snapshot + oSnap, begin migration planning (support ends Dec 15, 2025). Consider Reality Module or move to full on‑chain Governor. (docs.snapshot.box)
- Deploy OpenZeppelin Governor + TimelockController with:
- Voting delay/period suited to your community’s cadence,
- QuorumFraction and PreventLateQuorum,
- Tally integration and docs on your token’s clock mode. (docs.openzeppelin.com)
Week 7–10: Upgrade path and verification
- Migrate upgradeability to ERC‑1967 proxies with clearly owned ProxyAdmin (or UUPS with strict _authorizeUpgrade) behind the timelock. Never reuse legacy ProxyAdmin from pre‑v5. Simulate upgrade proposals on forks. (eips.ethereum.org)
- Wire CI: Slither + Echidna + Foundry invariants. Start a Certora Prover POC focusing on 3–5 critical properties (e.g., “no execute without elapsed delay”). (github.com)
Week 11–13: Security council and runbooks
- Define emergency roles (council or guardian), thresholds, and liveness checks; publish public docs on response procedures and time windows. Borrow parameters from Arbitrum/Optimism where appropriate. (forum.arbitrum.foundation)
- Run a live incident drill: simulate Forta alert → auto‑pause → proposal to unpause after review.
Checklists you can lift into your runbooks
-
Treasury multisig
- ≥3 signers; threshold < total signers; at least 2 hardware keys.
- Off‑chain signatures enabled; self‑host indexer if needed. (help.safe.global)
- Guard + Module Guard enabled; recovery path documented. (docs.safe.global)
- Zodiac Roles for scoped ops; Delay for module calls. (docs.roles.gnosisguild.org)
-
Governance
- OZ Governor + TimelockController; PreventLateQuorum; QuorumFraction. (docs.openzeppelin.com)
- EIP‑6372 clock mode confirmed; Tally compatibility tested. (docs.tally.xyz)
- Off‑chain voting execution (if any) has challenge window, bond, arbitrator; oSnap users have migration plan. (docs.snapshot.box)
-
Upgradeability
- ERC‑1967 compliance; clear owner of ProxyAdmin or UUPS authorization. (eips.ethereum.org)
- Upgrades queued via timelock; simulated on a fork; post‑mortem published.
-
Verification and monitoring
- Slither + Echidna in CI; baseline invariant suite created. (github.com)
- Certora Prover run on governance/upgrade paths; failing rules tracked. (certora.com)
- Forta Attack/Scam detectors subscribed; auto‑response actions mapped. (docs.forta.network)
- Defender migration path to open‑source Relayer/Monitor defined (before July 1, 2026). (openzeppelin.com)
Final thought
DAO security is not a tool—it’s a posture. Start with a hardened multisig, add measured governance with explicit timelocks and vetoes, wire upgrades through that path, prove the scary parts with formal methods, and keep humans in the loop with real‑time monitoring and rehearsed runbooks. This isn’t theoretical: protocols have shipped each layer over the last two years. Your next quarter can, too.
Like what you're reading? Let's build together.
Get a free 30‑minute consultation with our engineering team.

