Gas Optimizations #11
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Save gas with unchecked
Impact
If arithmetic will not overflow, use unchecked to save gas. There are several locations where safeMath is not needed and unchecked can lower gas consumption.
Proof of Concept
In this code from RevenueDistributionToken.sol, callerAllowance >= shares_ so unchecked can be used
Instead, replace the last line with
Tools Used
Manual analysis
Recommended Mitigation Steps
Use unchecked for arithmetic gas optimizations
The text was updated successfully, but these errors were encountered: