Platform: Code4rena
Start Date: 26/05/2023
Pot Size: $100,000 USDC
Total HM: 0
Participants: 33
Period: 14 days
Judge: leastwood
Id: 241
League: ETH
Rank: 30/33
Findings: 1
Award: $0.00
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: souilos
Also found by: fatherOfBlocks, judeabara, koxuan
L1CrossDomainMessenger
L180/187/192/209/304/342 - Instead of checking if a bool is true or false like this: (bool == true), it is less expensive to do it like this: (bool) or (!bool).
L84/181/188/193/198/266/343 - REQUIRE()/REVERT() STRINGS LONGER THAN 32 BYTE COST EXTRA GAS
L1StandardBridge.sol
L2OutputOracle.sol
OptimismPortal.sol
L138/388/417 - Instead of checking if a bool is true or false like this: (bool == true), it is less expensive to do it like this: (bool) or (!bool).
L175/184/253/263/280/304/334/346/354/363/377/383/389/446/454 - REQUIRE()/REVERT() STRINGS LONGER THAN 32 BYTE COST EXTRA GAS
OptimismMintableERC20Factory.sol
SystemConfig.sol
SystemDictator.sol
GasPriceOracle.sol
L43 - The getL1Fee() function could be written more simply like this, generating less gas costs: uint256 l1Fee = getL1GasUsed(_data) * l1BaseFee(); return (l1Fee * scalar()) / (10**DECIMALS);
L57/103 - The functions gasPrice(), decimals() are public since they are not used in the contract, they should be external.
#0 - c4-judge
2023-06-16T13:29:03Z
0xleastwood marked the issue as grade-b
#1 - liveactionllama
2023-07-18T20:27:12Z
Closing, as gas optimizations were out of scope for this audit.