Summary
The compiler for Solidity 0.8.20 switches the default target EVM version to Shanghai, which includes the new PUSH0
opcode.
Vulnerability Details
There are 9 instances of this issue.
View 9 Instances
File: src/Beedle.sol
2: pragma solidity ^0.8.19;
File: src/Fees.sol
2: pragma solidity ^0.8.19;
File Link |
Instance Count |
Instance Link |
Fees.sol |
1 |
2 |
File: src/Lender.sol
2: pragma solidity ^0.8.19;
File: src/Staking.sol
2: pragma solidity ^0.8.19;
File: src/interfaces/IERC20.sol
2: pragma solidity ^0.8.19;
File: src/interfaces/ISwapRouter.sol
2: pragma solidity ^0.8.19;
File: src/utils/Errors.sol
2: pragma solidity ^0.8.19;
File: src/utils/Ownable.sol
2: pragma solidity ^0.8.19;
File: src/utils/Structs.sol
2: pragma solidity ^0.8.19;
Impact
This opcode may not yet be implemented on all L2 chains, so deployment on those chains will fail.
Tools Used
baudit: a custom static code analysis tool; manual review
Recommendations
To avoid L2 chain compatibility issues related to PUSH0
, set the EVM version to target at compilation time.