This repo holds several Hats Protocol-enabled Zodiac contracts.
Currently, this repo contains the following:
A contract that grants multisig signing rights to addresses wearing a given Hat, enabling on-chain organizations (such as DAOs) to revocably delegate constrained signing authority and responsibility to individuals.
HatsSignerGate.sol is a Zodiac module that...
- Grants multisig signing rights to addresses based on whether they are wearing the appropriate Hat(s).
- Removes signers who are no long valid (i.e. no longer wearing the signer Hat)
- Manages the multisig threshold within the owner-specified range as new signers are added or removed.
Since Hat-wearing is dynamic — Hats can be programmatically revoked from wearers — this contract also services as a Zodiac guard to ensure that:
A) Only valid signers can execute transations, i.e. only signatures made by accounts currently wearing a valid signer Hat count towards the threshold.
B) Signers cannot execute transactions that remove the constraint in (A). Specifically, this contract guards against signers...
- Removing the contract as a module on the multisig,
- Removing the contract as a guard on the multisig,
- Changing the multisig threshold
- Adding new modules to the multisig
Hats Signer Gate uses the HatsOwned mix-in to manage ownership via a specified ownerHat
.
The wearer of the ownerHat
can make the following changes to Hats Signer Gate:
- "Transfer" ownership to a new Hat by changing the
ownerHat
- Set the acceptable multisig threshold range by changing
minThreshold
andtargetThreshold
- Add other Zodiac modules to the multisig
- In Multi-Hats Signer Gate, add other Hats as valid signer Hats
MultiHatsSignerGate.sol is a modification of Hats Signer Gate that supports setting multiple Hats as valid signer Hats.
HatsSignerGateFactory is a factory contract that enables users to deploy proxy instances of HatsSignerGate and MultiHatsSignerGate, either for an existing Safe or wired up to a new Safe deployed at the same time. It uses the Zodiac module proxy factory so that the deployments are tracked in the Zodiac subgraph.
This project has received the following security audits. See the audits directory for the detailed reports.
Auditor | Date | Commit Hash | Notes |
---|---|---|---|
Trust Security | Feb 23, 2023 | b9b7fcf | Report also includes findings for Hats Protocol audit |
See deployment parameters here.
- Gnosis Chain (chain id #100)
- singleton —
0xbD7090427331Cae6fC8b7f0C78d5f0fd3F2B3AFa
- factory —
0x805a6567eED224fBB62512085F9a106C8cD211f3
- singleton —
⚠️ known bug inremoveSigner
- Gnosis Chain (chain id #100)
- singleton —
0x9b50AB91b3ffBcdd5d5Ed49eD70bf299434C955C
- factory —
0xC4b6005f48417D67b2a81c3E31672f4042D36361
- singleton —
- Polygon (chain id #137)
- singleton —
0xbecec728ff088b358d0b560529814a6132987e6a
- factory —
0x245e5b56c18b18ac2d72f94c5f7be1d52497a8ad
- singleton —