Omniscia Pareto Audit

ParetoGovernorHybrid Code Style Findings

ParetoGovernorHybrid Code Style Findings

PGH-01C: Ineffectual Usage of Safe Arithmetics

Description:

The linked mathematical operation is guaranteed to be performed safely by logical inference, such as surrounding conditionals evaluated in require checks or if-else constructs.

Example:

src/governance/ParetoGovernorHybrid.sol
59return Math.mulDiv(aggregator.getPastTotalSupply(clock() - 1), MIN_VOTES_BPS, BPS_DENOMINATOR);

Recommendation:

Given that safe arithmetics are toggled on by default in pragma versions of 0.8.X, we advise the linked statement to be wrapped in an unchecked code block thereby optimizing its execution cost.

Alleviation:

The Pareto team evaluated this exhibit but opted to acknowledge it in the current iteration of the codebase.

PGH-02C: Misleading Documentation

Description:

The referenced documentation implies that the voting power of the previous block is queried yet the voting power of the previous timestamp is.

Example:

src/governance/ParetoGovernorHybrid.sol
56/// @inheritdoc Governor
57/// @notice 1% of total voting power at the previous block
58function proposalThreshold() public view override returns (uint256) {
59 return Math.mulDiv(aggregator.getPastTotalSupply(clock() - 1), MIN_VOTES_BPS, BPS_DENOMINATOR);
60}

Recommendation:

We advise it to be corrected, ensuring that the system's documentation is correct.

Alleviation:

The documentation has been rectified as advised.