DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: low
Valid

LibWeth.sol incorrectly assumes WETH address is the same on L2s

Summary

Currently WETH address is hardcoded:

address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

However this belongs to WETH only on Mainnet, this address is empty on other networks such as Arbitrum, Optimism, Polygon.

Impact

TokenFacet.wrapEth() and TokenFacet.unwrapEth() functions will not work. It means TractorFacet cannot be used to convert ETH into WETH inside batch.

Tools Used

Manual Review

Recommendations

Configure WETH address during deployment instead of hardcoding.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

Hardcoded WETH/WSTETH/USDC/USDT won't be the same on L2's

Appeal created

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Hardcoded WETH/WSTETH/USDC/USDT won't be the same on L2's

Support

FAQs

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