Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.06 KB

Voting period and quorum can be set to zero.md

File metadata and controls

30 lines (24 loc) · 1.06 KB

When the Governance contract is initialized, the values of votingPeriod and votingQuorum are checked to make sure that they are greater than 0.

However, the corresponding setter functions setVotingPeriod and setVotingQuorum allow these variables to be reset to 0.

Setting the votingPeriod to zero would cause spurious proposals that cannot be voted.

Setting the quorum to zero is worse because it would allow proposals with 0 votes to be executed.

Recommendation:

Consider adding the validation to the setter functions


Slide Screenshot

092.jpg


Slide Text

  • OpenZeppelin Audit Audius Finding M06
  • Data Validation
  • Medium Severity
  • Voting Period/Quorum Seller Checks
  • Non-Zero
  • Add Setter Checks

References


Tags