Closed code423n4 closed 2 years ago
defsec
For the arithmetic operations that will never over/underflow, using the unchecked directive (Solidity v0.8 has default overflow/underflow checks) can save some gas from the unnecessary internal over/underflow checks.
https://github.com/code-423n4/2021-11-streaming/blob/main/Streaming/src/Locke.sol#L360
None
Consider applying unchecked arithmetic where overflow/underflow is not possible.
dupe of #238
Handle
defsec
Vulnerability details
Impact
For the arithmetic operations that will never over/underflow, using the unchecked directive (Solidity v0.8 has default overflow/underflow checks) can save some gas from the unnecessary internal over/underflow checks.
Proof of Concept
Tools Used
None
Recommended Mitigation Steps
Consider applying unchecked arithmetic where overflow/underflow is not possible.