New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swapAVAXForExactTokens() Logical error #84
Comments
This is very far from critical vulnerability, the worse that can happen is that the TX through the router will revert if the sent amount is too high. Overly inflated. |
Dup of #469 |
L |
Duplicate of #124 |
Reverted to M as requested by @GalloDaSballo |
GalloDaSballo marked the issue as not a duplicate |
GalloDaSballo marked the issue as duplicate of #469 |
Marked this issue as satisfactory as requested by @GalloDaSballo |
Lines of code
https://github.com/code-423n4/2022-10-traderjoe/blob/main/src/LBRouter.sol#L520
Vulnerability details
Impact
In the last line, the excess money is returned to the user. But the processing is reversed
amountsIn[0] -msg.value
Proof of Concept
forge test --mt testswapAVAXForExactTokens -vvvv
Tools Used
forge
Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: