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

The deadline shouldn't be set to block.timestamp

Summary

A malicious miner can hold the transaction due to block.timestamp set as deadline.

Vulnerability Details

Passing block.timestamp to a pool means that whenever the miner decides to include the txn in a block, it will be valid at that time, since block.timestamp will be the current timestamp.

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Fees.sol#L36

Impact

A malicious miner can hold the transaction, which may be being done in order to free up capital to ensure that there are funds available to do operations to prevent a liquidation. It is highly likely that a liquidation is more profitable for a miner to mine, with its associated follow-on transactions, than to allow the decrease of liquidity.

Tools Used

Manual Review

Recommendations

Add deadline argument

Support

FAQs

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

Give us feedback!