This is the smart contract that incentivize voters (of compound) by using the proof of voting NFTs.
GovernorAlpha.sol
of Compound.
GovernorAlphaWithProofOfVotingNFT.sol
inherit the GovernorAlpha.sol of Compound
.
proof of voting NFT
.based on number of a proof of voting NFTs
.
On the assumption that, 1 proof of voting NFT is given to voter per 1 vote .
On the assumption that, default reward distribution amount
is 0.01
COMP.
https://github.com/masaun/governorAlpha-with-proof-of-voting-NFT/blob/main/contracts/RewardsVault.sol#L20
(※ the reward distribution amount can be changed by using changeDistributionAmount
method in the RewardsVault.sol: https://github.com/masaun/governorAlpha-with-proof-of-voting-NFT/blob/main/contracts/RewardsVault.sol#L30-L32 )
e.g). If some voter vote 2 different proposal, that voter receive 2 proof of voting NFTs.
=> In case of that, that voter receive 0.02 COMP (=0.01 * 2 NFTs)
regulary.
Remarks).
manual
distribution method has been implemented already. ( https://github.com/masaun/governorAlpha-with-proof-of-voting-NFT/blob/main/contracts/RewardsVault.sol#L44-L52 )reqular
distribution method has not been implemented yet.
npm install
npm run compile
npm run test:Scenario.test.js