A gas calculation vulnerability was identified in the getExecutionGasLimit function. The function does not handle new or unhandled OrderTypes, leading to an underestimation of the gas limit, which could cause transaction reverts.
The function calculates executionGasLimit based on the OrderType. However, if a new OrderType is added to the enum but not explicitly handled in this function, estimatedGasLimit defaults to 0.
This results in:
Leading to an underestimation of the required gas for unhandled order types.
Transactions involving new or unhandled OrderTypes might fail due to insufficient gas, potentially disrupting the functionality of the contract with new features or updates.
Add a default case for unhandled OrderTypes:
OR
Before gas calculation, check if the orderType is one of the known types:
There is no real proof, concrete root cause, specific impact, or enough details in those submissions. Examples include: "It could happen" without specifying when, "If this impossible case happens," "Unexpected behavior," etc. Make a Proof of Concept (PoC) using external functions and realistic parameters. Do not test only the internal function where you think you found something.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.