Closed sherlock-admin2 closed 7 months ago
2 comment(s) were left on this issue during the judging contest.
PNS commented:
L-03 OZ Audit; Dutch Orders Without Duration Benefit the Filler
0xAadi commented:
Invalid: OOS, contract not in scope
the library is out of scope
pkqs90
medium
Orders with equal
decayStartTime
anddecayEndTime
benefit the filler instead of swapperSummary
GladiusReactor uses a linear decay function to adjust the input and output amounts within the specified time range between
decayStartTime
anddecayEndTime
. An edge case arises whendecayStartTime
anddecayEndTime
are set to the same value, butstartAmount
andendAmount
differ. In such a scenario, the trade's final amount defaults toendAmount
, which benefits the filler over the swapper.Vulnerability Detail
As stated in the Summary.
This issue was actually fixed in the latest UniswapX in this PR https://github.com/Uniswap/UniswapX/pull/194, however it still exists in this codebase.
Impact
Swappers might be unaware of this specific edge case, potentially leading them to unintentionally place orders that favor the filler instead of benefiting themselves.
Code Snippet
DutchDecayLib.sol
Tool used
VSCode
Recommendation
Disable dutch orders with zero duration to avoid ambiguity.