The swapExactInput function is supposed to provide the caller with the actual amount of tokens purchased. However, even though it declares the named return value output, it neither assigns a value to it nor includes an explicit return statement.
The swapExactInput function declares a named return value output but never assigns a value to it or uses an explicit return statement. As a result, the function always returns the default value of output, which is 0.
The return value will always be 0, giving incorrect information to the caller. This can mislead users and other smart contracts interacting with this function, causing potential issues in their operations or decision-making processes based on the returned value.
Manual Code review
Assign the output return value to the calculated outputAmount and ensure the function returns it explicitly.
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.