Omniscia Pareto Audit
ParetoGovernorHybrid Code Style Findings
ParetoGovernorHybrid Code Style Findings
PGH-01C: Ineffectual Usage of Safe Arithmetics
| Type | Severity | Location |
|---|---|---|
| Language Specific | ![]() | ParetoGovernorHybrid.sol:L59 |
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
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | ParetoGovernorHybrid.sol:L57 |
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 Governor57/// @notice 1% of total voting power at the previous block58function 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.
