40,000 USDC
View results
Submission Details
Severity: gas

>= used when < can be used

Summary

In Escrow.sol line 43 there is a check for the arbiterFee if (arbiterFee >= price) which is less gas efficient than price < arbiterFee since two op codes are executed for greater than or equal to versus one op code for less than.

Recommendations

Change line 43 to

if (price < arbiterFee) revert Escrow__FeeExceedsPrice(price, arbiterFee);

If creator feels the equal check is important here they may want to ignore this gas optimization, but the escrow could still be valid if arbiterFee == price though neither buyer or seller would receive any funds on a dispute, only the arbiter would.

Support

FAQs

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