Files
dex/api/openapi.yaml
T
zeekayandHanzo Dev 5b9ac470d9 The deadline is honoured on every arm, not only the V2 one
SwapRouter02 dropped the deadline from exactInputSingle's tuple and takes it
through multicall(uint256,bytes[]) instead, which is how Uniswap's own
interface sends one. Without that wrap a deadline handed to /v1/trade/swap was
accepted and silently dropped on every V3 route while the V2 route honoured it
— one field meaning two things depending on which pool happened to win the
quote.

amountOutMinimum bounds the price; the deadline bounds the time. A signed swap
that sits in a mempool and lands an hour later still passes its floor, at a
price nobody would choose now. Unset means twenty minutes out, because zero is
a deadline in 1970 and every swap would revert as too old.

Measured against 96369's live SwapRouter02, both directions:
  deadline ahead of block.timestamp -> 997001483075056712, the quoted amount
  deadline behind it                -> execution reverted: Transaction too old

Worth knowing for anything that tests this: 96369 seals a block when there is a
transaction, so block.timestamp ran 4709 seconds behind wall clock while this
was measured. A deadline computed from wall clock is generous here rather than
tight — the safe direction, but `now - 60` will not read as expired.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-09 01:17:20 -07:00

18 KiB