Hats Protocol Docs
hatsprotocol.xyzGithub
  • ๐Ÿ‘‹Welcome to Hats Protocol
  • ๐ŸงขGetting Started with Hats
  • โญQuick Start
  • Using The Hats App
    • ๐Ÿค Essentials For Hat Wearers
    • ๐ŸŽฉCreating My First Hat
    • ๐Ÿง™Admins: Creating, Issuing, and Revising Hats
    • ๐Ÿ‘ฅWhat Hats Do I Need?
    • ๐ŸŒณDrafting, Exporting, and Deploying Tree Changes
    • ๐Ÿ—๏ธSetting a Hat's Basic Properties
    • ๐ŸฅณAdding Wearers
    • ๐Ÿ”Connecting Hats w/ Permissions & Authorities
      • Types of Hat-Powered Authorities
      • Connecting Hats to Token Gates
        • Hats Protocol Contract Addresses
        • Finding a Hat's Token ID
      • Documenting Hat Powers & Responsibilities
    • ๐ŸŒŸRevocation & Eligibility: Requirements for Wearers
    • โšกDeactivating & Reactivating Hats
    • โœ…Making Hats Claimable
    • ๐Ÿ”—Linking Trees Together
    • โ›“๏ธHats Protocol Supported Chains
    • โ“Glossary & FAQ
  • Hats Integrations
    • ๐Ÿ”Permissions & Authorities
      • Coordinape
      • Council Voting Vault
      • Charmverse
      • Discord
        • Collab.Land --> Discord
        • Guild.xyz --> Discord
      • Farcaster Casting Rights
      • Fileverse
      • Google Workspace
      • Hats Account
      • Role-Based Compensation
      • Safe Multisig Signing Authority
      • Telegram
        • Collab.Land --> Telegram
        • Guild.xyz --> Telegram
      • Snapshot: Voting, Weight & Proposal Creation
      • Wonderverse
    • ๐ŸŒŸEligibility & Accountability Criteria
      • Agreement Eligibility
      • Allow-List Eligibility
      • CoLinks Eligibility
      • ERC20 Eligibility
      • ERC721 Eligibility
      • ERC1155 Eligibility
      • Hat-Wearing Eligibility
      • Hats Election Eligibility
      • JokeRace Eligibility
      • Pass-Through (Hat-Based) Eligibility
      • Staking Eligibility
      • Subscription or Membership Fee (Unlock Protocol)
      • Gitcoin Passport Eligibility
    • โšกActivation & Deactivation Criteria
      • Seasonal/ Time-Expiry Toggle
      • Pass-Through (Hat-Based) Toggle
    • ๐Ÿ‘ทHatter Modules
      • Multi Claims Hatter
      • DAOhaus Moloch v3 Membership & Share Allocation
  • For Developers
    • ๐Ÿ‘ทHats Protocol, for Developers
      • Hat Properties
      • Wearing a Hat
      • Hat Admins & Hatter Contracts
      • Hats Trees
      • Hat IDs
      • Linking Hats Trees
      • Eligibility Modules
      • Toggle Modules
      • Hat Mutability and Editing
      • Creating Hats
      • Minting Hats
      • Transfering Hats
      • Renouncing Hats
      • Batch Actions
      • Hat Image URIs
      • ERC1155 Compatibility
      • โ›“๏ธSupported Chains
    • ๐Ÿค–v1 Protocol Spec
      • Hats.sol
      • HatsEvents.sol
      • HatsErrors.sol
      • HatsIdUtilities.sol
      • Interfaces
        • IHats.sol
        • IHatsIdUtilities.sol
        • IHatsEligibility.sol
        • IHatsToggle.sol
    • ๐Ÿ–ฅ๏ธv1 SDK
      • Core
        • Getting Started
        • Onchain Reads
        • Onchain Writes
        • Multicall
        • Claiming Hats
        • Utilities
      • Subgraph
        • Getting Started
        • Fetching Hats
        • Fetching Wearers
        • Fetching Trees
        • Misc
        • Types
      • Hat Details
        • Getting Started
        • Usage
    • ๐Ÿ”ญv1 Subgraphs
    • ๐ŸงฉHats Modules
      • ๐Ÿ”ŒModules SDK
        • Getting Started
        • Get Available Modules
        • Create New Instance/s
        • Composing Modules
        • Interact With Instances
        • Utilities
        • Types
      • โš’๏ธBuilding Hats Modules
        • Inside a Hats Module
          • Immutable Arguments
          • Module Setup
          • Versioning
        • Creating New Modules
        • How Module Instances Are Deployed
        • Modules Registry
        • About Module Chains
    • ๐Ÿ”Hats Signer Gate v2
    • ๐Ÿ‘’Hats Signer Gate SDK
      • Getting Started
      • Creating New Instances
      • Hats Signer Gate
      • Multi Hats Signer Gate
      • HSG & MHSG Handlers
    • ๐Ÿ’ผHats Account SDK
      • 1 of N Hats Account
        • Getting Started
        • Creating New Instances
        • Executing From An Instance
        • Constants
        • Types
    • ๐ŸŒHats Security Audits
  • Legal
    • Terms
      • Terms of Service
      • Acceptable Use
      • Privacy Policy
      • Cookie Policy
      • Attribution
Powered by GitBook
On this page
  • The Basic Steps
  • 1. Only allowing certain hats to make a new proposal
  • 2 & 3: Only allowing certain hats to vote on a proposal + assigning different voting weights to different hats
  • Link your Hats tree to Snapshot to automatically display Snapshot authorities
  1. Hats Integrations
  2. Permissions & Authorities

Snapshot: Voting, Weight & Proposal Creation

How to give specific hats voting access & voting weight in Snapshot polls

PreviousGuild.xyz --> TelegramNextWonderverse

Last updated 1 year ago

The Basic Steps

is an off-chain voting platform that allows communities to participate in the decentralized governance. But even though Snapshot votes happen off-chain, Snapshot can still read what hats an address is wearing to determine eligibility to create proposals, vote on proposals, and/or assign a specific voting weight.

There are three primary ways to attach Snapshot authorities to Hats:

  1. Only allowing certain hats to create a new proposal

  2. Only allowing certain hats to vote on a proposal

  3. Assigning different voting weights to different hats

Following is a guide to implement each of these authorities.

  • Note: Distinct sets of strategies require distinct Snapshot spaces. If you want to enforce different space settings for proposal creation, voting access, and voting weight (e.g., giving a specific hat voting access to vote on some proposals but not others), you will need to set up a different Snapshot space for each collection of settings. Fortunately, Snapshot makes it possible for organizations to create multiple spaces and link them together.

1. Only allowing certain hats to make a new proposal

As an admin of your Snapshot space:

  • Enter the Settings

  • Select Proposal

Then under Validation, select Basic.

In the window that appears:

  • Set "Minimum score" to 1

  • Select "Use custom strategies"

  • Select "erc1155-balance-of-ids" for the strategy

  • Select the network your hats are on

Then enter the following under Params:

{ 
"ids": [ "Hat-ID-1", "Hat-ID-2", "Hat-ID-3"],
 "address": "0x3bc1A0Ad72417f2d411118085256fC53CBdDd137" 
}

2 & 3: Only allowing certain hats to vote on a proposal + assigning different voting weights to different hats

These use cases are combined because they are implemented simultaneously.

As the admin of the Snapshot space:

  • Enter the Settings

  • Select Strategies

Here you can set up to 8 strategies for your Snapshot space. For the purposes of hat-gating voting access and voting weight, you will only need to set up one strategy (unless your hats are on different networks, in case you'll need one strategy per network).

To set up a strategy:

  • Click the "+ Add" button

  • Select "erc1155-weighted-by-id" for the Strategy type

  • Select the network your hats are on

  • Enter the following into the box:

{ 
"ids": ["Hat-ID-1", "Hat-ID-2"], 
"symbol": "Hats", 
"weight": [X, Y], 
"address": "0x3bc1A0Ad72417f2d411118085256fC53CBdDd137" 
}

And where X = the voting weight you want to assign to Hat-ID-1, Y = the voting weight for Hat-ID-3, and so on.

NOTE: Voting weight from Snapshot strategies is cumulative! So if someone is wearing two different hats that are each allowed to vote on a proposal, one of which comes with a voting weight of 1 and the other with a voting weight of 2, they will actually be able to vote on the proposal with a voting weight of

Link your Hats tree to Snapshot to automatically display Snapshot authorities

This step will enable the Hats app to automatically detect and display Snapshot related authorities in your Hats tree:

Skip this step if your tree's top-hat already includes the relevant Snapshot space(s).

  • Select "Edit Tree"

  • Locate and select the tree's top-hat

  • In the "Hat Basics" section, add the relevant Snapshot spaces. A space ID can be found in its URL. For example, if the Snapshot space page is https://snapshot.org/#/hatsprotocol.eth, then its ID is 'hatsprotocol.eth'.

Snapshot authorities will now be displayed on the relevant hats:

Replace Hat-ID-1, Hat-ID-2, and Hat-ID-3 with the specific hat token IDs that you want to give permission to post a new Snapshot proposal in this space (be sure to keep the quotations around each ID). You can add as many different hat token IDs as you want, using the convention above. See for details on how to find specific hat token IDs.

Replace Hat-ID-1 and Hat-ID-2 with the specific hat token IDs that you want to give permission to vote on Snapshot proposals in this space (be sure to keep the quotations around each ID). You can add as many different Hat IDs as you want, using the convention above. See for details on how to find specific hat token IDs.

๐Ÿ”
Snapshot
See here for more details on how to set up multiple spaces and link them together.
#finding-a-hats-token-id
#finding-a-hats-token-id