Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

Voting can only be run once

Summary

This contract allows the creator to invite a select group of people to vote on something and provides an eth reward to the for voters if the proposal passes.

Vulnerability Details

Once the minimum quorum is reached s_votingComplete variable is set to true and there is no logic in the contract to reset the voting status.

if (totalCurrentVotes * 100 / s_totalAllowedVoters >= MIN_QUORUM) {
// mark voting as having been completed
s_votingComplete = true;

Impact

The voting can be run only once.

Tools Used

  • manual review

Recommendations

If the contract will be used for more than once there should be mechanism to reset the voting status and delete all the votes.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.