40,000 USDC
View results
Submission Details
Severity: gas
Valid

`>=` costs less gas than `>`.

Summary

Vulnerability Details

The compiler uses opcodes GT and ISZERO for solidity code that uses >, but only requires LT for >=, which saves 3 gas

Impact

There are 4 instances of this issue:

File: 2023-07-escrow/src/Escrow.sol

112: if (totalFee > tokenBalance) {
119: if (buyerAward > 0) {
122: if (i_arbiterFee > 0) {
126: if (tokenBalance > 0) {

Tools Used

Manual code review

Recommendations

Use >= instead if appropriate.

Support

FAQs

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