In the StrategyOp
and StrategyArb
contracts, the claimAndSwap
function allows a keeper to specify the swap path ( _path
) for swapping WETH (the underlying token) to alETH (the asset). The keeper provides this path when calling the function:
The _swapUnderlyingToAsset
function executes the swap based on the keeper-provided path:
Because the keeper controls the swap path, they could potentially provide a malicious path that swaps WETH into an unintended or less valuable token rather than alETH. This could cause the strategy to hold tokens that are not the intended asset, potentially leading to losses or requiring manual intervention to recover funds.
The risk arises because there is no check to ensure that the output token of the swap is indeed alETH. The only safeguard is the balance check of asset before and after the swap, but if the swap results in receiving a different token, this check would fail, and the transaction would revert. However, if the keeper can manipulate the swap in a way that passes the balance check (e.g., if a malicious token incorrectly reports balances), they could cause
undesired behavior.
In contrast, the StrategyMainnet contract mitigates this risk by storing predefined swap routes in contract storage, which are added via the addRoute function by management. The claimAndSwap function in StrategyMainnet uses a route number to reference these stored routes, preventing arbitrary paths from being used:
By not allowing arbitrary swap paths, StrategyMainnet
reduces the risk of keeper manipulation. The lack of similar restrictions in StrategyOp
and StrategyArb
presents a potential vulnerability where a malicious keeper could exploit the swap functionality.
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.