TempleGold

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

Unsafe downcast in TempleGoldStaking

Summary

Unsafe downcast in TempleGoldStaking

Vulnerability Details

In _notifyReward() unsafe downcast of lastUpdateTime from uint256 to uint40.

https://github.com/Cyfrin/2024-07-templegold/blob/main/protocol/contracts/templegold/TempleGoldStaking.sol#L527

Impact

Tools Used

Recommendations

Make sure to implement a safe cast that checks if overflows occur to prevent computing a totally different value than what it should really be. Use OZ safeCast library for this type of operation.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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