Submitted by IllIllI
Note: this finding was reported via the winning Automated Findings report. It was declared out of scope for the audit, but is being included here for completeness.
Passing block.timestamp as the expiry/deadline of an operation does not mean require immediate execution - it means whatever block this transaction appears in, Im comfortable with that blocks timestamp. Providing this value means that a malicious miner can hold the transaction for as long as they like (think the flashbots mempool for bundling transactions), which may be until they are able to cause the transaction to incur the maximum amount of slippage allowed by the slippage parameter, or until conditions become unfavorable enough that other orders, e.g. liquidations, are triggered. Timestamps should be chosen off-chain, and should be specified by the caller to avoid unnecessary MEV.
There is one instance of this issue:
GitHub: 337
psytama (Dopex) confirmed
Alex the Entreprenerd (Judge) commented
