In the original implementation, sometimes block.timestamp is used as deadline for uniswap operation instead of the users' deadline input. Setting deadline as block.timestamp has no effect since the deadline value is compared exactly to block.timestamp in UniswapV3 checkDeadline modifier.
Mitigation
PR #24
The block.timestamp now is replaced with deadline in every related code. Some examples:
Lines of code
Vulnerability details
C4 issue
M-21: Dangerous use of deadline parameter
Comment
In the original implementation, sometimes
block.timestamp
is used as deadline for uniswap operation instead of the users'deadline
input. Settingdeadline
asblock.timestamp
has no effect since thedeadline
value is compared exactly toblock.timestamp
in UniswapV3checkDeadline
modifier.Mitigation
PR #24 The
block.timestamp
now is replaced withdeadline
in every related code. Some examples:The mitigation solved the original issue.
Conclusion
LGTM