20,000 USDC
View results
Submission Details
Severity: gas

## [G-24] >= costs less gas than >

Summary

[G-24] >= costs less gas than >

The compiler uses opcodes GT and ISZERO for solidity code that uses >, but only requires LT for >=, which saves 3 gas
Reference: https://gist.github.com/IllIllI000/3dc79d25acccfa16dee4e83ffdc6ffde

file: /src/Lender.sol
93 if (_fee > 500) revert FeeTooHigh();

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L93

file: /src/Staking.sol
63 if (totalSupply > 0) {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Staking.sol#L63

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.