Open code423n4 opened 2 years ago
https://github.com/code-423n4/2022-05-backd/blob/8121e5244ca29f87b0763d05a69e7fc654d14f45/protocol/contracts/tokenomics/AmmConvexGauge.sol#L158
!= 0 better than use > 0 to safe gas.
https://github.com/code-423n4/2022-05-backd/blob/8121e5244ca29f87b0763d05a69e7fc654d14f45/protocol/contracts/RewardHandler.sol#L42
chached array length "pool.length" to save gas.
Saves 3 gas
Total Gas Saved 6
POC
https://github.com/code-423n4/2022-05-backd/blob/8121e5244ca29f87b0763d05a69e7fc654d14f45/protocol/contracts/tokenomics/AmmConvexGauge.sol#L158
Impact
!= 0 better than use > 0 to safe gas.
POC
https://github.com/code-423n4/2022-05-backd/blob/8121e5244ca29f87b0763d05a69e7fc654d14f45/protocol/contracts/RewardHandler.sol#L42
Impact
chached array length "pool.length" to save gas.