Submitted by WatchPug, also found by danb, gzeon, Heartless, and pauliax
When the value of _amount is larger than type(uint192).max, due to unsafe type casting, the recorded deposited amount can be much smaller than their invested amount.
ConvexStakingWrapper.sol#L228-L250
When _amount = uint256(type(uint192).max) + 1:
Expected results:
deposits[_pid][msg.sender].amount == uint256(type(uint192).max) + 1;
Actual results:
deposits[_pid][msg.sender].amount = 0.
The depositor loses all their invested funds.
Consider adding a upper limit for the _amount parameter:
ryuheimat (Concur) confirmed
Alex the Entreprenerd (judge) decreased severity to Medium and commented:
