Raisebox Faucet

First Flight #50
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

[L-03] Use of block.timestamp for Time Comparisons


Description

  • The contract uses block.timestamp for 24-hour day calculations and cooldown periods, which can be slightly manipulated by miners.


// Root cause in the codebase with @> marks to highlight the relevant section

Risk

Low Likelihood:

  • Not economically viable to manipulate for these timeframes

Low Impact:

  • Minor time manipulation doesn't significantly affect 24-hour periods or 3-day cooldowns


Recommended Mitigation

Recommended Mitigation:
For higher precision, consider using block numbers:

+uint256 public constant BLOCKS_PER_DAY = 7200; // ~24 hours at 12s/block
+function getCurrentDay() public view returns (uint256) {
+ return block.number / BLOCKS_PER_DAY;
+}
Updates

Lead Judging Commences

inallhonesty Lead Judge 15 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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