The Standard

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

Using `block.timestamp` for swap deadline offers no protection

Summary

block.timestamp is used as the deadline for swaps in SmartVaultV3::swap() L223.

Vulnerability Details

In the PoS model, proposers know well in advance if they will propose one or consecutive blocks ahead of time. In such a scenario, a malicious validator can hold back the transaction and execute it at a more favorable block number.

Impact

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

Tools Used

Manual review

Recommendations

  • Consider allowing function caller to specify swap deadline input parameter.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year 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.