Open code423n4 opened 3 years ago
I fixed it in the two places outlined in the issue.
The issue alludes to there being more, but that kind of hand-waving isn't very helpful. Give us a list to fix! Thank you
Agree with the sponsor, please send links to specific lines That said 2 spots where found and the sponsor has applied the improvement
Handle
pauliax
Vulnerability details
Impact
You can save some gas by using the 'unchecked' keyword to avoid redundant arithmetic checks when an underflow/overflow cannot happen. For example, here: while (_prizeSplits.length > newPrizeSplitsLength) { uint256 _index = _prizeSplits.length - 1; or here: require(_accountDetails.balance >= _amount, _revertMessage); ... accountDetails.balance = _accountDetails.balance - _amount;
Recommended Mitigation Steps
Consider applying 'unchecked' keyword where overflows/underflows are not possible.