40,000 USDC
View results
Submission Details
Severity: medium

Attacker could spam the network

Summary

See Details

Vulnerability Details

There is no limit on the number of Escrow contracts that can be deployed.

function newEscrow(
uint256 price,
IERC20 tokenContract,
address seller,
address arbiter,
uint256 arbiterFee,
bytes32 salt
) external returns (IEscrow) {
address computedAddress = computeEscrowAddress(
type(Escrow).creationCode,
address(this),
uint256(salt),
price,
tokenContract,
msg.sender,
seller,
arbiter,
arbiterFee
);
tokenContract.safeTransferFrom(msg.sender, computedAddress, price);
Escrow escrow = new Escrow{salt: salt}(
price,
tokenContract,
msg.sender,
seller,
arbiter,
arbiterFee
);
if (address(escrow) != computedAddress) {
revert EscrowFactory__AddressesDiffer();
}
emit EscrowCreated(address(escrow), msg.sender, seller, arbiter);
return escrow;
}

Impact

An attacker could spam the network with contracts.

Tools Used

Manual code review

Recommendations

Add a limit to the number of escrows at a time

Support

FAQs

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