Adding unchecked directive can save gas #43
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
G (Gas Optimization)
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.
The text was updated successfully, but these errors were encountered: