Validation strategies
Last updated
Last updated
A voting validation is a JavaScript function that returns a boolean (true
or false
) for the connected account. Voting validations are being used on Snapshot to decide if an account can vote or create a proposal in a specific space. Each space can use one voting validation for all of its proposals at a time. While voting strategies calculate the Voting Power mainly on the basis of the monetary assets, the validation strategy can serve as a protection against Sybil attacks. It can take into consideration how many POAPs an account owns or track the account activity to assess if the account is a bot or a real human.
The default validation is checking if the address has any voting power. If the voting power is higher than 0
the connected account is validated. A validation strategy can send a call to a node or subgraph.
When setting the Validation Strategy up it’s important to keep in mind that it is meant to make it difficult for users outside of your community to post scam proposals or post spam votes.
Therefore for Proposal Validation make sure to use a high threshold, for example $100 worth of your organization’s token. A good idea would be to check the holdings of previous proposal creators, both legitimate and scammers, to assess a reasonable value.
Spaces are required to use Proposal Validation. Learn how to set it up on this page or read our article.
Spaces using only a ticket strategy are required to set a Voting Validation to secure their spaces and ensure a fair voting process preventing spam. Learn here how to set it up: Voting Validation in Space Settings
Validation strategies can be used for two purposes:
proposal validation - determine if the account can create a new proposal,
voting validation - determine if the account can take part in the voting process.
Head to Proposals tab in the sidebar to update the configuration:
Head to Voting tab in the sidebar to update the configuration:
If you want to allow addresses with any voting power to vote you can use the default voting validation.
If you are using only a ticket Voting Strategy for your space you are required to use a Gitcoin Passport Validation for Voting to protect your space from spam votes.
If you wish to limit proposal creators to Admins, Moderators and Authors only, you can do so by enabling the Authors only setting in the Proposal tab in the space settings. Make sure to give the Author role to the users you trust!
The Basic validation strategy allows you to use existing Voting Strategies configured for your space or define a custom setup to determine if a user is eligible to create a proposal or cast a vote.
In order to use existing setup of Voting Strategies you can simply chose Basic Validation and define a required threshold as on the screenshot below. 100
corresponds to user's Voting Power calculated on the basis of the Voting Strategies.
If you wish to use a different configuration, toggle the Use custom strategies button and define the strategies for your use case:
Validation strategy built together with Gitcoin Passport. You can select individual or multiple stamps that matter for your space. You can also decide if they need to meet all of these criteria or only one. The more criteria you select, the more sybil resistant your space is.
Have a look at the example of the Gitcoin Passport validation strategy.
Voting validation can be specified in your space settings at https://snapshot.page/#/<SPACE ADDRESS>/settings
.
The possibilities are endless! You can build a custom validation strategy for your space. Please have a look at Create a validation strategyfor more details.