H-04 talked about the possibility of the virtualRewardsToAdd being more than type(uint128).max and hence impacting reward variables here.
Mitigation
All calculations related to rewards are now represented in uint256. The attack was based on the ability of the first depositor to donate some SALT and cause the calculation to surpass the limit. This is not practically possible now due to the prerequisite values being ridiculously high.
Lines of code
Vulnerability details
Summary
H-04 talked about the possibility of the
virtualRewardsToAdd
being more thantype(uint128).max
and hence impacting reward variables here.Mitigation
All calculations related to rewards are now represented in
uint256
. The attack was based on the ability of the first depositor to donate some SALT and cause the calculation to surpass the limit. This is not practically possible now due to the prerequisite values being ridiculously high.Conclusion
LGTM