Snapshot
Search…
Create a new strategy
Create a strategy and use it on your own space
To add your own strategy on Snapshot you need to fork the snapshot-strategies repository and create a pull request.
GitHub - snapshot-labs/snapshot-strategies: Snapshot voting strategies
GitHub

1. Navigate to the src\strategies

1
└── src
2
└── strategies
3
└── erc20-balance-of
Copied!

2. Create a copy of the erc20-balance-of strategy folder and rename it to the name of your strategy

3. Write the logic of your strategy, include it in**src\strategies\index.ts and test it with:

1
npm run test --strategy=<STRATEGY NAME> // replace <STRATEGY NAME>
Copied!

4. Make sure you pass the checklist

Have a look here on the requirements for adding a new strategy and make sure you full fill the points in the checklist: https://github.com/snapshot-labs/snapshot.js/issues/212

5. Create a pull request

The team will then review your PR and after it's approved and merged it will be available in your space settings.
Last modified 18d ago