DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Consider making some constants as non-public to save gas

Summary

Reducing from public to private or internal can save gas when a constant isn't used outside of its contract. I suggest changing the visibility from public to internal or private here:

Impact

Gas

Tools Used

Manual Review

Recommendations

src/FjordStaking.sol
Line: 254

- uint256 public constant epochDuration = 86_400 * 7;
+ uint256 private constant epochDuration = 86_400 * 7;

src/FjordStaking.sol
Line: 257

- uint8 public constant lockCycle = 6;
+ uint8 private constant lockCycle = 6;

src/FjordStaking.sol
Line: 263

- uint8 public constant claimCycle = 3;
+ uint8 private constant claimCycle = 3;

src/FjordPoints.sol
Line: 54

- uint256 public constant EPOCH_DURATION = 1 weeks;
+ uint256 private constant EPOCH_DURATION = 1 weeks;
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.