The Standard

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

Use of block.timestamp for deadline of a swap can lead to loss for a user

Summary

Use of block.timestamp for deadline of a swap can lead to loss for a user.

Vulnerability Details

The deadline of a swap is set to block.timestamp in the swap function. What this means is that a validator can hold the swap transaction and the block the transaction is eventually put into will be the block.timestamp.

By this, validators determine the timeframe within which a swap should be included in a blockchain and not the user.

Impact

Swap may not be immediate and this can result to loss for a user since crypto is volatile.

Tools Used

Manual review

Recommendations

I suggest use of a deadline parameter where users can input deadline they want.

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.