The _requireIsKeeper
check that is implemented in the onlyMarketOrderKeeper
and onlyOffChainOrdersKeeper
in SettlementBranch.sol
can be bypassed if the keeper address is set to 0.
This if
statement in requireIsKeeper
uses logical AND (&&
). Both conditions must be true
for the revert to happen:
sender != keeper
keeper != address(0)
Hence, if keeper == address(0)
, condition #2 is false
, and the entire expression in the if
statement evaluates to false
regardless of sender != keeper
. This means the revert is never triggered, letting anyone call the function.
Admins could forget to set or update the keeper address to 0 inadvertently making the function open to the public.
The settlement/market order calls (fillMarketOrder
, fillOffchainOrders
, etc.) are supposed to be restricted to a single address (the designated keeper). When keeper == address(0)
, the condition in _requireIsKeeper
short‐circuits, causing no revert for any caller. This effectively grants public access to the function.
Manual Review of Access Control Modifiers
A simple refactor can enforce that the keeper address cannot be zero
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.