I am currently implementing the governor contract to make the community decide the certain contract parameters.
I am planning to implement Governor.sol + ERC20Votes.sol. I have a question about the current contract code in Governor.sol as well as ERC20Votes.sol.
- Users can freely delegate their votes by delegate() in ERC20Votes.sol.
- We can determine that if a certain user has already voted for a certain proposal by hasVoted(proposalId, account)
It is good to use the current ERC20Votes' checkpoint to vote for the proposal, but how can it prevent the user to double vote by just simply re-delegate the checkpoints to their other address after he/she cast his/her votes so that he/she can vote infinitely. The reason why I asked is that I cannot see any checkpoint destroy or lock mechanism in governor logic or I do not know how to do that.
It will be very appreciated if you can sure me how to prevent the double vote or how I can implement this feature.