40,000 USDC
View results
Submission Details
Severity: gas
Valid

Use minimal proxies instead of deploying Escrow contract

Minimal proxy only has 55 bytes which is much cheaper to deploy than the Escrow contract. The contract can only be deployed once and EscrowFactory will then just deploy a proxy pointing to the implementation which is much more gas efficient.

This is the entire bytecode of minimal proxy
0x3d602d80600a3d3981f3363d3d373d3d3d363d73bebebebebebebebebebebebebebebebebebebebe5af43d82803e903d91602b57fd5bf3
https://solidity-by-example.org/app/minimal-proxy/

See https://docs.openzeppelin.com/contracts/4.x/api/proxy#Clones-cloneDeterministic-address-bytes32-

Support

FAQs

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