40,000 USDC
View results
Submission Details
Severity: low

Gas inefficiency in the computeEscrowAddress function

Summary

Gas inefficiency in the computeEscrowAddress function due to using U160 address

Vulnerability Details

The computedAddress variable in the computeEscrowAddress function is of type uint160. This means that the value of the computedAddress variable can only be up to 160 bits long. This is a limitation, as addresses in Ethereum are 128 bits long. This means that the computedAddress variable cannot store the full value and the computeEscrowAddress function uses more gas than necessary to calculate the escrow contract address.

Impact

The gas inefficiency in the computeEscrowAddress function could lead to higher gas costs when creating escrow contracts

Tools Used

Remix, Slither

Recommendations

To improve the gas efficiency of the computeEscrowAddress function, the uint160 type should be replaced with the uint128 type

Support

FAQs

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