40,000 USDC
View results
Submission Details
Severity: gas

`Escrow` redundantly checks for tokenBalance

Summary

Escrow unnecessarily checks if the contract has enough token balance. This is already guaranteed in EscrowFactory::newEscrow.

Vulnerability Details

Assuming Escrow only deploys through EscrowFactory, there is no need to check if the new Escrow has enough balance. EscrowFactory transfers tokens before deployment.

Impact

Deploying a new Escrow takes more gas than necessary. On average this consumes 1229 more gas.

Tools Used

Manual Review

Recommendations

Remove the check in Escrow::constructor.

Support

FAQs

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