MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: medium
Invalid

Solidity version 0.8.20 not work on arbitrum chain due to `PUSH0`

Summary

Solidity 0.8.20, by default, targets the Shanghai version of the EVM, which includes the new PUSH0 opcode.
However, this opcode may not yet be implemented on all Layer-2 chains.
For instance Arbitrum does not yet support PUSH0. See Documentation for more information.
As such, deploying contracts compiled with Solidity 0.8.20 on these chains could lead to failures.

Vulnerability Details

File: contracts/Distribution.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/L1Sender.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/L2MessageReceiver.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/L2TokenReceiver.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/MOR.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/interfaces/IDistribution.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/interfaces/IL1Sender.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/interfaces/IL2MessageReceiver.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/interfaces/IL2TokenReceiver.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/interfaces/IMOR.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/interfaces/tokens/IStETH.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/interfaces/tokens/IWStETH.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/interfaces/uniswap-v3/INonfungiblePositionManager.sol
2: pragma solidity ^0.8.20;

| Line #2 |

File: contracts/libs/LinearDistributionIntervalDecrease.sol
2: pragma solidity ^0.8.20;

| Line #2 |

Recommendations

To avoid this, consider specifying an older EVM version as the target, or ensure that the Layer-2 chain used supports the Shanghai EVM.

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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