Informational 08 Inconsistent Handling Of Comparison Cases
Low/Info issue submitted by 1337web3
Summary
The MultiInvoker::canExecuteOrder function should appropriately handle all comparison cases in the TriggerOrderLib::fillable function.
Vulnerability Detail
The TriggerOrderLib::fillable function currently only considers the comparison cases of -1 and 1, neglecting other possible comparison values. This could lead to incorrect validation of whether an order can be executed or not.
The incomplete handling of comparison cases in TriggerOrderLib::fillable might result in erroneous validation decisions, potentially allowing orders to be executed incorrectly or preventing valid orders from being executed.
Ensure that MultiInvoker::canExecuteOrder properly handles all comparison cases defined in TriggerOrderLib::fillable by updating the implementation to consider all possible comparison values (-2, -1, 0, 1, 2) according to the defined logic.
Informational 08 Inconsistent Handling Of Comparison Cases
Low/Info issue submitted by 1337web3
Summary
The
MultiInvoker::canExecuteOrder
function should appropriately handle all comparison cases in theTriggerOrderLib::fillable
function.Vulnerability Detail
The
TriggerOrderLib::fillable
function currently only considers the comparison cases of -1 and 1, neglecting other possible comparison values. This could lead to incorrect validation of whether an order can be executed or not.https://github.com/sherlock-audit/2024-05-kwenta-x-perennial-integration-update/blob/main/perennial-v2/packages/perennial-extensions/contracts/MultiInvoker.sol#L109-L114
https://github.com/sherlock-audit/2024-05-kwenta-x-perennial-integration-update/blob/main/perennial-v2/packages/perennial-extensions/contracts/types/TriggerOrder.sol#L52-L57
Impact
The incomplete handling of comparison cases in
TriggerOrderLib::fillable
might result in erroneous validation decisions, potentially allowing orders to be executed incorrectly or preventing valid orders from being executed.Code Snippet
Tool used
Manual Review
Recommendation
Ensure that
MultiInvoker::canExecuteOrder
properly handles all comparison cases defined inTriggerOrderLib::fillable
by updating the implementation to consider all possible comparison values (-2, -1, 0, 1, 2) according to the defined logic.