The returned values from decoding call data should always be checked, one of important which is minBuyAmount, which is used for slippage, and this should be checked the the task of validate the returned data. _validateData function does not validate the value of minBuyAmount:
Lines of code
https://github.com/LoopFi/loop-prelaunch-contracts/blob/c8b13474aa4f319eec368fc4827bf51eddad080f/src/PrelaunchPoints.sol#L263 https://github.com/LoopFi/loop-prelaunch-contracts/blob/c8b13474aa4f319eec368fc4827bf51eddad080f/src/PrelaunchPoints.sol#L424 https://github.com/LoopFi/loop-prelaunch-contracts/blob/c8b13474aa4f319eec368fc4827bf51eddad080f/src/PrelaunchPoints.sol#L461
Vulnerability details
The returned values from decoding call data should always be checked, one of important which is
minBuyAmount
, which is used forslippage
, and this should be checked the the task of validate the returned data._validateData
function does not validate the value ofminBuyAmount
:Vulnerable function is
_validateData()
: https://github.com/LoopFi/loop-prelaunch-contracts/blob/c8b13474aa4f319eec368fc4827bf51eddad080f/src/PrelaunchPoints.sol#L417C1-L455C6