Gas Optimizations #89
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
https://github.com/fei-protocol/flywheel-v2/blob/77bfadf388db25cf5917d39cd9c0ad920f404aad/src/token/ERC20Gauges.sol#L52
This implementation below can saving more gas instead
##Recommendation Mitigation
uint256 i = 0
intouint i
for saving more gasusing this implementation can saving more gas for each loops.
##Tool Used
Manual Review
##Recommended Mitigation
Change it
##Occurances
= 0
https://github.com/fei-protocol/flywheel-v2/blob/77bfadf388db25cf5917d39cd9c0ad920f404aad/src/token/ERC20MultiVotes.sol#L354
If a variable was not set/initialized, it is assumed to have default value to 0
this implementation was used for saving more gas by removing
= 0
##TOOLS USED
Manual Review
##Mitigation Step
Remove
= 0
The text was updated successfully, but these errors were encountered: