🔐 DarkSafe Beta
A Safe{Wallet}-style multi-signature vault dashboard for Quai Network's Cyprus-1
execution shard: on-chain proposals, a native timelock, quorum checks, and no
DELEGATECALL. Source: multisigows/ · Route:
/multisigows/
What it is
- On-chain multi-sig contracts (v2) —
DarkSafeVault: owners propose, approve and execute on chain, with a required expiry, a native timelock and no DELEGATECALL. Vaults are ERC-1967 proxies created byDarkSafeVaultFactory. - A Quai Cyprus-1 core SDK (
@darksafe/core) — address validation, Quai JSON-RPC, the transaction pipeline and the v2 vault library (hashing, vault-address mining, calldata decoding, risk rules, authenticity checks, cross-source reads). - A live on-chain dashboard — no seeded, hardcoded or fabricated data anywhere; every balance, owner list, threshold and queue is read from the chain or a real wallet extension.
- Extension-only signing — every transaction goes through a connected Quai wallet (Pelagus, Blip). Approvals are on-chain transactions; nothing is signed off chain and no signer is bundled.
- Independent tools —
darksafe-verifychecks a vault or transaction outside the app;darksafe-watchalerts on governance changes, proposals, quorum and reorgs.
Creating a vault
The "Create Vault" wizard (connect → owners → security → review) goes through the DarkSafe v2 factory. It:
- mines a CREATE2 salt so the address lands in Cyprus-1 on the Quai ledger;
- checks that address against the factory's own
predictWalletAddress; - simulates the creation, sends it, and waits for confirmations;
- requires the
WalletCreatedevent to name the predicted address; - verifies the new vault on chain (code, implementation, factory registration, owners, threshold, timelock) before saving it.
"Add existing vault" accepts only vaults the verified factory created. The factory address
comes from packages/contracts/deployments via pinned.ts, or from
VITE_V2_FACTORY_ADDRESS, and is checked on chain against the pinned build before the
app uses it.
Review before every write
Every propose, approve and execute goes through a review screen that decodes the call and lists risks; shows full addresses, exact amounts and raw calldata with a typed confirmation for admin changes; re-derives the transaction hash from its stored contents; and compares vault and transaction state across the app's RPC, an optional second RPC and the wallet's own node. A disagreement blocks every write.
Build and run
cd multisigows
pnpm install
pnpm build # contracts, all packages, then the web app
pnpm test
pnpm dev # dashboard dev server
Point the dashboard at a network at build/dev time in apps/web:
VITE_QUAI_NETWORK=mainnet|testnet # default: testnet (Orchard)
VITE_QUAI_RPC_URL=<override> # default: the profile's canonical rpcUrl
VITE_V2_FACTORY_ADDRESS=0x00... # optional: a factory to use instead of the recorded one
VITE_QUAI_SECONDARY_RPC_URL=<url> # optional: a second RPC to cross-check vault state
Security status
The vault contracts have not had an independent audit. The app shows a beta banner, and
mainnet vault creation is off unless a build sets VITE_ALLOW_MAINNET_VAULTS=true.
The road to mainnet is gated step by step in docs/LAUNCH.md inside
multisigows/.
- v2 only (v1 was removed): on-chain approvals, required expiry, native timelock, epoch-invalidated approvals, no DELEGATECALL, no modules, no upgrade path.
- The app only treats an address as a vault if its code is the pinned proxy, it points at the
pinned implementation, and the verified factory created it. Regenerate pins after any
contract change with
pnpm -F @darksafe/contracts pin; CI fails if stale. - Security documents live in
multisigows/:SECURITY.md(reporting),docs/THREAT_MODEL.md,docs/SECURITY_GUIDE.md,docs/INCIDENT_RUNBOOK.md,docs/AUDIT_SCOPE.md. - Contract checks: Hardhat unit + stateful fuzz, Foundry fuzz + invariants on the shipped
bytecode,
forge:diff(TypeScript core agrees with the contracts), lint, gas snapshot, opcode and coverage checks.