The claimAndSwap
function, present across multiple chain-specific strategy implementations (StrategyOp.sol
, StrategyMainnet.sol
, and StrategyArb.sol
), relies on the onlyKeepers
modifier to enforce access control. However, the code does not enforce chain-specific restrictions on keeper calls. This omission allows a keeper with privileges on one chain to exploit opportunities intended for keepers on another chain. By monitoring conditions across different chains and front-running legitimate keeper operations, a malicious actor can claim profits not intended for them.
This violates the protocol’s intended invariant that keepers must only operate under controlled, chain-specific conditions. The vulnerability impacts the economic assumptions, enabling profit extraction and disruption of the expected keeper ecosystem. If unaddressed, it can diminish trust, reduce protocol efficiency, and grant unauthorized profits, harming the system’s integrity and stakeholders' interests.
Root Cause: The core issue lies in the claimAndSwap
function’s trust model. While it ensures that only keepers
can invoke it, it does not guarantee that a keeper is authorized for that specific chain. Without a chain-specific identity check, an attacker who controls or impersonates a keeper on a cheaper chain can front-run profitable claimAndSwap
calls intended for another chain.
Affected Code Snippet (from StrategyOp.sol
and similarly in StrategyMainnet.sol
and StrategyArb.sol
):
This snippet shows the onlyKeepers
modifier as the sole check. The logic does not differentiate keepers by deployment or chain, enabling cross-chain exploitation.
Test Code Snippet (Demonstration of Exploit):
Step-by-Step Logic of the Exploit:
Malicious keeper gains or reuses keeper permissions on a cheaper chain.
Monitors the network for profitable claimAndSwap
conditions originally intended for another chain’s deployment.
When detected, malicious keeper calls claimAndSwap
on the chain they control before the legitimate keeper can act on their designated chain.
Profits that were supposed to be captured by the rightful keeper on the correct chain are now taken by the malicious actor.
Invariants Violated:
Keeper roles are assumed to be chain-specific. This vulnerability breaks that assumption by allowing a single keeper identity or address to operate outside its intended domain.
Economic integrity of cross-chain strategies is compromised, as profits meant for legitimate keepers are siphoned off by unauthorized actors.
Manual Review
Foundry
To mitigate this vulnerability, enforce stricter keeper validation:
Chain-Specific Keeper Whitelists:
Maintain distinct whitelists per chain deployment. Each chain’s contract should have its own verified list of keepers, preventing a keeper on one chain from acting on another.
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.