TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: low
Invalid

Unused Variables

Summary

During a manual review of the TempleGoldStaking contract, two unused variables were identified.

Vulnerability Details

https://github.com/Cyfrin/2024-07-templegold/blob/57a3e597e9199f9e9e0c26aab2123332eb19cc28/protocol/contracts/templegold/TempleGoldStaking.sol#L44-L47

The following variables are declared but not used within the TempleGoldStaking contract:

  • uint256 public override periodFinish

  • uint256 public override lastUpdateTime

These variables are intended for time tracking and rewards update purposes but do not serve any functional role in the current implementation.

Impact

Unused variables can increase code complexity and may mislead developers or auditors regarding the actual functionality of the contract. Removing them can help maintain clarity and reduce potential confusion.

Tools Used

Manual Review

Recommendations

Remove the following unused variables from the TempleGoldStaking contract:

  • uint256 public override periodFinish

  • uint256 public override lastUpdateTime

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.