Snapshot.org DAO Voting
We have now officially launched the DAO voting on the Snapshot.org platform. This platform allows us to to raise proposals and accept votes from both Zombie Zebras or $WORMS holders.
Each proposal will have its own custom voting mechanism and will be based on what the vote relates to. For example all Zombie Comic votes will be voted on using $WORMS.
The good news is we have been able to implement a strategy where you dont have to unstake your Zebras or claim your $WORMS to vote. This article will dive into how we were able to achieve that.
Snapshot Voting Strategies
The snapshot platform allows you to customize the voting rights based on a code that can check balances on the blockchain. The basic checks are for ERC20 Tokens or ERC721/ERC1155 NFTs. In order to customize this for your DAO, you can try and submit some code to the Snapshot team to get them to merge your new code into their platform.
Zombie Zebras Voting
In order to achieve the voting with both Staked and Unstaked Zebras, we were able to use a strategy called mutant-cats-stakers-and-holders. Which as you can guess was created by the Mutant Cats team, so their community could vote with their staked cats.
As well as that we have also deployed a smart contract which can help us achieve the same thing. As part of the NFT specification the contract must contain a function called balanceOf which returns a number. The contract we deployed has a custom balanceOf function. which checks the wallet for the NFT. It also checks the staking contract for their NFTs, then adds those two balances together. The core piece of code looks like this:
Zombie Comics Voting
When using the $WORMS token to vote we have to implement a similar strategy. Instead of checking how many NFTs you have, we are checking how many $WORMS you have in your wallet, as well as how many the staking contract thinks you are owed. We deployed a similar contract to the one above, this time to check the balanceOf your wallet, and add that with the result of the calculateRewards functions. This allows us to check an up to date amount of total $WORMS you have.
We have also provided some custom code to the Snapshot.org team which will allow not only us, but other projects to use in their DAO voting strategy. The strategy we created is called staking-claimed-unclaimed.
You can find a link to the succesful pull request here: https://github.com/snapshot-labs/snapshot-strategies/pull/386
What’s next?
We will continue to push the boundaries and try to innovate in this space.
Long live the herd!