In BaseAdapter.sol
, the setDeadline
function allows setting the deadline to block.timestamp
:
The function only checks if the deadline is in the past (_deadline < block.timestamp
) but allows setting it to exactly block.timestamp
.
When a transaction is executed, block.timestamp
represents the time when the validator includes the transaction in a block, not when it was submitted. This means transactions could potentially sit in the mempool and be executed at a much later time than intended.
Transactions can remain pending in the mempool indefinitely until validators decide to include them
MEV bots can take advantage of this window to perform sandwich attacks
Update the deadline validation in setDeadline
to ensure the deadline must be strictly greater than the current block timestamp:
This change ensures that deadlines must be set to a future timestamp, providing better protection against MEV and delayed execution issues.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.