20,000 USDC
View results
Submission Details
Severity: medium
Valid

block.timestamp as deadline

Summary

deadline is set as block.timestamp

Vulnerability Details

Fees.sol line 36-> deadline = block.timestamp
ISwapRouter.ExactInputSingleParams memory params = ISwapRouter
.ExactInputSingleParams({
tokenIn: _profits,
tokenOut: WETH,
fee: 3000,
recipient: address(this),
deadline: block.timestamp,
amountIn: amount,
amountOutMinimum: 0,
sqrtPriceLimitX96: 0
});
block.timestamp is open to attack by malicious validators

Impact

High: Validator may hold transaction and eventually even if in later blocks block.timestamp will still be valid

See resource past report "Code4rena finding report on use block.timestamp" with more information

See here resource stating "Protocols shouldn't set the deadline to block.timestamp" for more information

Tools Used

Manual Analysis

Recommendations

It is recommended not to use block.timestamp as the deadline

Support

FAQs

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

Give us feedback!