Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low

Usage of `block.timestamp` is unreliable

Summary

Using block.timestamp as part of the time checks could be modified by miners/validators to favor them in contracts that contain logic heavily dependent on them.

Vulnerability Detail

Consider this problem and warn users that a scenario like this could occur. If the change of timestamps will not affect the protocol in any way, consider documenting the reasoning and writing tests enforcing that these guarantees will be preserved even if the code changes in the future.

Impact

Low, since, while it's true that miners could influence this, they can only do it for a relatively short amount of time

Tool used

Manual Audit

Recommendation

Use block.number instead

Support

FAQs

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