The unchecked keyword can be applied in the following lines of code since there are statements before to ensure the arithmetic operations would not cause an integer underflow or overflow:
return a > b ? a - b : b - a;
By the way, here because Solidity 0.8.9 is used, this desired overflow will fail:
Handle
pauliax
Vulnerability details
Impact
The unchecked keyword can be applied in the following lines of code since there are statements before to ensure the arithmetic operations would not cause an integer underflow or overflow:
By the way, here because Solidity 0.8.9 is used, this desired overflow will fail: