Skip to content
Request an audit

‹ All findings

Unnecessary check in StandardGovernor.state

Low/InfoM^0 Minter Gateway·Three Sigma · Stablecoin framework · 8th January, 2024Codebase3S-M^0-N05

Description

Since StandardGovernor._votingPeriod function will always returns 0, voteStart will always be equal to voteEnd.

This means that the following check in the StandardGovernor.state is unnecessary: if (currentEpoch_ <= voteEnd_) return ProposalState.Active; The use of < spends unnecessary gas by checking that currentEpoch_ is less than voteEnd_.

If currentEpoch_ is indeed less that voteEnd_ then the transaction will stop a few lines above: if (currentEpoch_ < voteStart_) return ProposalState.Pending;

Recommendation

The check for strict equality (==) will suffice.

Status

Addressed in #768c250.