code-423n4 / 2022-05-backd-findings

0 stars 0 forks source link

Gas Optimizations #154

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

[G-01] Unnecessary less than check

amount is a UINT and therefore can not be less than 0. Change <= to ==

https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/tokenomics/LpGauge.sol#L59

GalloDaSballo commented 2 years ago

Should save 3 gas