40,000 USDC
View results
Submission Details
Severity: gas

Parameters should be checked inside the factory contract

Summary

Checking the input parameters of the newEscrow function inside the factory contract sooner would save gas, if the function is called with invalid parameters.

Vulnerability Details

The parameters passed to the newEscrow function inside the factory are not checked for validity, inside the function itself, but later inside the constructor of the escrow contract. This can lead to a waste of gas on invalid inputs.

Impact

An unnecessary amount of gas is lost on an invalid function call.

Tools Used

Manual Review, Foundry, VSCode

Recommendations

Check the parameters inside the newEscrow function.

Support

FAQs

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