I-1: Unnecessary `payable` modifier in `swapExactTokensForTokens`
Description:
The swapExactTokensForTokens function in AggregatorConnector.sol line 33 includes a payable modifier but never sends ETH in its router call, unlike swapExactETHForTokens which explicitly uses { value: swap.amountIn }. Removing the payable modifier will prevent ETH from being sent by mistake.
Impact:
Informational.
Recommendation:
- Consider whether the
payablemodifier is necessary for this function since it doesn't send ETH value in the router call. - If the
payableis kept for interface reasons, check the sent ETH and revert if it's not zero.
Developer Response:
Fixed PR#587.