code-423n4 / 2022-05-velodrome-findings

0 stars 0 forks source link

Gas Optimizations #213

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Visibility declared as public an not used inside the contract can be declared external

Risk: Gas optimization

Findings:

getVotingStage(uint256) should be declared external:

getFee(bool) should be declared external:

setGovernor(address) should be declared external:

setEmergencyCouncil(address) should be declared external:

whitelist(address) should be declared external:

getPastVotes(address,uint256) should be declared external:

delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32) should be declared external:

Recommendation: Change visibility to external Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-external

GalloDaSballo commented 2 years ago

The finding will not save gas since 0.6.12