The Standard

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

`block.timestamp` used as deadline for a swap

Summary

block.timestamp is used as a deadline in swap function in SmartVaultV3.

Vulnerability details

Passing block.timestamp as deadline parameter allow malicious miner to hold the transaction for as long as they like, which may be until they are able to cause the transaction to incur the maximum amount of slippage allowed by the slippage parameter (slippage parameter is set to zero in some cases in this codebase).

Impact

This offers no protection as block.timestamp will have the value of whichever block the txn is inserted into, hence the txn can be held indefinitely by malicious validators.

Tools used

VScode, Manual Review

Recommendations

Allow user to parameterize deadline parameter of swap.

Updates

Lead Judging Commences

hrishibhat Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

deadline-check-low

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

deadline-check

Support

FAQs

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