All contracts in the codebase use solidity 0.8.20 and foundry.toml has evm_version = 'shanghai'. The protocol team has stated that they will be deploying on Ethereum mainnet and Base mainnet.
With Solidity version 0.8.20 and evm_version = 'shanghai', Solidity uses the new PUSH0 opcode.
The issue is that Base mainnet doesn't support the PUSH0 opcode yet. Because of this, produced bytecode from the contracts won't be compatible with Base mainnet, as they still don't support the Shanghai hard fork.
This could also become a problem if different versions of Solidity/EVM are used to compile contracts for different chains. The differences in bytecode between versions can impact the deterministic nature of contract addresses.
Tools Used
Manual Review
Recommended Mitigation Steps
Either change the pragma across all files to 0.8.19 or change the evm_version inside foundry.toml to paris and use the same configuration to deploy on both Ethereum and Base.
Lines of code
https://github.com/code-423n4/2023-10-party/blob/b23c65d62a20921c709582b0b76b387f2bb9ebb5/contracts/party/PartyGovernance.sol#L2
Vulnerability details
Impact
All contracts in the codebase use solidity
0.8.20
and foundry.toml hasevm_version = 'shanghai'
. The protocol team has stated that they will be deploying on Ethereum mainnet and Base mainnet.With Solidity version
0.8.20
andevm_version = 'shanghai'
, Solidity uses the newPUSH0
opcode.The issue is that Base mainnet doesn't support the
PUSH0
opcode yet. Because of this, produced bytecode from the contracts won't be compatible with Base mainnet, as they still don't support the Shanghai hard fork.This could also become a problem if different versions of Solidity/EVM are used to compile contracts for different chains. The differences in bytecode between versions can impact the deterministic nature of contract addresses.
Tools Used
Manual Review
Recommended Mitigation Steps
Either change the pragma across all files to
0.8.19
or change theevm_version
insidefoundry.toml
toparis
and use the same configuration to deploy on both Ethereum and Base.Assessed type
Other