It may be better to use minimal proxy pattern with initialization instead of deploying big amount of contracts with the same logic.
Minimal proxy pattern with initialization saves significant amounts of gas by reducing the contract deployment cost. In our case, EscrowFactory::newEscrow() just deploys a new Escrow contract. This can be optimized by deploying it using minimal proxy pattern with initialization instead, which does not contain all the bytecode of Escrow in itself, but delegatecalls to implementation contract (the deployed logic of Escrow contract). In this case, you should use storage state variables in Escrow contract instead of immutable ones.
Increased both Escrow contract deployment cost and EscrowFactory::newEscrow() interaction cost.
Foundry
Use minimal proxy pattern with initialization when deploying new Escrow contracts in EscrowFactory::newEscrow().
See: https://www.rareskills.io/post/eip-1167-minimal-proxy-standard-with-initialization-clone-pattern
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.