The BaseAdapter.setDeadline
function sets the new deadline variable which is used in the swap parameters. The problem of the implementation is that the deadline variable is an absolute value and should be set before each swap to prevent swapping with stale parameters such as amountOutMin
.
The new _deadline
should exceed the block.timestamp
.
The deadline
variable is used as is in the swap parameters.
When the deadline
variable will be set for the first time it will be necessary to continuously update. It is important because the protocol uses off chain price as a base for the amountOutMin
parameter calculation and the late deadline can cause swapping with worse prices.
Unintended behavior, unexpected slippage.
Manual Review
Consider implementing relative deadline
parameter:
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.