40,000 USDC
View results
Submission Details
Severity: low

newEscrow function

Summary

Check the Escrow contract deployment was successful, then transfer the tokens.

Vulnerability Details

From EscrowFactory.sol => Reorder check and transfer functionalities.
address computedAddress = computeEscrowAddress(
type(Escrow).creationCode,
address(this),
uint256(salt),
price,
tokenContract,
msg.sender,
seller,
arbiter,
arbiterFee
);

    if (address(escrow) != computedAddress) {
        revert EscrowFactory__AddressesDiffer();
    }

tokenContract.safeTransferFrom(msg.sender, computedAddress, price);
Escrow escrow = new Escrow{salt: salt}(
price,
tokenContract,
msg.sender,
seller,
arbiter,
arbiterFee
);

Impact

Those tokens will be lost.It will be safe to transfer the tokens after the contract has been deployed.

Tools Used

AI

Recommendations

Support

FAQs

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