40,000 USDC
View results
Submission Details
Severity: gas

Constructor can be payable to save gas

Summary

Constructor of Escrow can be payable to save gas

Vulnerability Details

Escrow is deployed through EscrowFactory. So, it is safe to mark the constructor of Escrow as payable.

You can cut out 10 opcodes in the creation-time EVM bytecode if you declare a constructor payable. Making the constructor payable eliminates the need for an initial check of msg.value == 0 and saves 13 gas on deployment with no security risks.

Impact

Tools Used

Manual Review

Recommendations

Set the constructor to payable

Support

FAQs

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