Platform: Code4rena
Start Date: 14/10/2022
Pot Size: $100,000 USDC
Total HM: 12
Participants: 75
Period: 9 days
Judge: GalloDaSballo
Total Solo HM: 1
Id: 171
League: ETH
Rank: 53/75
Findings: 1
Award: $0.49
🌟 Selected for report: 0
🚀 Solo Findings: 0
0.4864 USDC - $0.49
Judge has assessed an item in Issue #307 as M risk. The relevant finding follows:
L-1. Wrong comparison sign Description The function swapAVAXForExactTokens will revert when msg.value > amountsIn[0] because amountsIn[0] - msg.value will always cause underflow. Solidity version ^0.8.0 is used, so it will revert when underflow happens.
Instances https://github.com/code-423n4/2022-10-traderjoe/blob/main/src/LBRouter.sol#L520 Recommendation Change to:
if (msg.value > amountsIn[0]) _safeTransferAVAX(_to, msg.value - amountsIn[0] );
#0 - c4-judge
2022-11-21T15:17:19Z
GalloDaSballo marked the issue as duplicate of #469
#1 - c4-judge
2022-11-21T15:18:53Z
GalloDaSballo marked the issue as partial-50