This repository has been archived by the owner on May 26, 2023. It is now read-only.
shw - Specification of the new base fee calculation is inconsistent with the code #266
Labels
Reward
A payout will be made for this issue
Specification
An issue related to the specification (low severity)
shw
low
Specification of the new base fee calculation is inconsistent with the code
Summary
Specification of the new base fee calculation is inconsistent with the code.
Vulnerability Detail
The "Guaranteed Gas Fee Market" specification provides a pseudocode explaining how a new base fee is calculated, which has two inconsistencies with the actual code implementation:
newBaseFee
(seeResourceMetering.sol#L115
) while the specification uses the un-updatedprev_basefee
.UINT_64_MAX_VALUE
but is set totype(uint128).max
in the code.Impact
The specification does not match the code.
Code Snippet
https://github.com/ethereum-optimism/optimism/blob/3f4b3c328153a8aa03611158b6984d624b17c1d9/packages/contracts-bedrock/contracts/L1/ResourceMetering.sol#L115
Tool used
Manual Review
Recommendation
Fix either the specification or the code.
The text was updated successfully, but these errors were encountered: