The rewards claiming loop in Gauge#getReward can be optimized with a few loop optimization tricks: caching loop length, using unchecked increments, and caching the intermediate token value. Since this will be a frequently called function, it's probably worth the extra optimization:
Gas
Optimize loop in
Gauge#getReward
The rewards claiming loop in
Gauge#getReward
can be optimized with a few loop optimization tricks: caching loop length, using unchecked increments, and caching the intermediatetoken
value. Since this will be a frequently called function, it's probably worth the extra optimization:Gauge#getReward
Recommendation: