Orders on Optimism chains can not be settled due to revert of keep()
Summary
After Ecotone upgrade, Optimism's OptGasInfo("0x420000000000000000000000000000000000000F").scalar() function has been deprecated, which would cause Kept_Optimism contract revert always.
KingNFT
medium
Orders on Optimism chains can not be settled due to revert of
keep()
Summary
After
Ecotone
upgrade, Optimism'sOptGasInfo("0x420000000000000000000000000000000000000F").scalar()
function has been deprecated, which would causeKept_Optimism
contractrevert
always.Reference: https://docs.optimism.io/stack/transactions/fees#l1-data-fee
Vulnerability Detail
The issue arises on L29 of
_calldataFee()
function, asOPT_GAS.scalar()
would revert.The following PoC is built on both Optimism and Base mainnet, we can see
OPT_GAS.scalar()
reverts withGasPriceOracle: scalar() is deprecated
message.the test log:
Impact
Orders can not be settled, break of core functionality.
Code Snippet
https://github.com/sherlock-audit/2024-02-perennial-v2-3/blob/main/root/contracts/attribute/Kept/Kept_Optimism.sol#L29
Tool used
Manual Review
Recommendation
reference: https://docs.optimism.io/stack/transactions/fees#ecotone