Unnecessary comparison leading to waste of gas
In EscrowFactory::newEscrow(), in lines 48-50 the code performs a comparsion between the deployed Escrow address and precomputed Escrow address. The thing is, the addresses will never differ. This can be checked with a fuzz-test. This issue leads to both higher EscrowFactory contract deployment cost and EscrowFactory::newEscrow() function interaction cost.
POC (foundry fuzz test):
And in the foundry.toml file:
I tested this with 50000 fuzz runs.
About 34 wasted gas units on EscrowFactory::newEscrow() interaction.
Foundry, fuzz-tests
Remove the unnecessary comparsion (lines 48-50 in EscrowFactory.sol)
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.