Hats Protocol v1.0 (Deprecated)
Pre-releaseThis release has been deprecated. See Hats Protocol v1 for the latest release
What's New
This release addresses a minor issue found by a community member (see below for more details). While the issue does not impact regular usage of the protocol, after consulting community members and auditors, we have decided that the best course of action is to deploy a fix while protocol usage is still getting started. The newly deployed contract is versioned 1.0 to reflect the pre-launch nature of the change.
Hats Protocol has been audited twice, once by a top independent auditor on the Code4rena leaderboards, and again by a total of 152 auditors via an open contest on Sherlock (report available soon). We care deeply about security and are committed to strong audit practices and incentivizing the disclosure of vulnerabilities at the protocol level, and communicating this proactively to our community.
The Fixed Issue
Under some edge conditions, it was technically possible to unlink a linked (aka "grafted") top hat in such a way that it would have no wearer once unlinked. This would render the top hat non-operational.
Specifically, if a linked top hat had been configured with an eligibility and/or toggle module when linked, and the top hat had subsequently been revoked from its wearer (eligibility) or set to inactive (toggle), unlinking would have resulted in the newly-unlinked top hat not having a wearer and no way to gain one. This could also have occurred if the linked top hat's wearer renounced it. This could be relatively easily avoided by ensuring the top hat had an eligible wearer before unlinking, but the protocol did not explicitly protect against the failure to do so.
Version 1.0 explicitly prevents such mistakes by reverting the unlink function if the top hat does not have a wearer, ensuring that unlinked top hats will always be operational.
A big hat tip to @gershido, who found, reported, and helped review the fix for this issue!
New Features
Several convenience view functions have also been added:
getHatEligibilityModule()
getHatToggleModule()
getHatMaxSupply()
Other Notes
- If you have already created hats on the original contract, please reach out and we'll assist you in recreating them on the new contract.
- v1.hatsprotocol.eth has been updated to point to the new v1.0 contract address.
Deployments
Network | Address |
---|---|
Goerli (testnet) | 0x9d2dfd6066d5935267291718e8aa16c8ab729e9d |
Sepolia (testnet) | 0x9d2dfd6066d5935267291718e8aa16c8ab729e9d |
Ethereum (mainnet) | 0x9d2dfd6066d5935267291718e8aa16c8ab729e9d |
Polygon | 0x9d2dfd6066d5935267291718e8aa16c8ab729e9d |
Gnosis Chain | 0x9d2dfd6066d5935267291718e8aa16c8ab729e9d |
Arbitrum | 0x9d2dfd6066d5935267291718e8aa16c8ab729e9d |
Optimism | 0x9d2dfd6066d5935267291718e8aa16c8ab729e9d |
All deployments are made to the same address using a CREATE2 factory, with the following parameters (also viewable in the DeployHats
script):
- salt:
0x0000000000000000000000000000000000000000000000000000000000004a75
- name:
"Hats Protocol v1.0"
- baseImageURI:
"ipfs://bafybeigcimbqwfajsnhoq7fqnbdllz7kye7cpdy3adj2sob3wku2llu5bi"