Issue:
The _swapUnderlyingToAsset
function does not validate that the provided _path
actually converts the underlying
token (WETH) to the asset
token (alETH). This lack of validation allows Keepers to provide arbitrary or incorrect paths, which can lead to unintended behavior, including swapping to the wrong token or maliciously rerouting funds.
High.
Incorrect Token Swaps:
If _path
does not lead from WETH to alETH, the strategy may end up holding an incorrect or unexpected token, disrupting operations and yield generation.
Malicious Token Diversion:
An attacker could provide a _path
that routes tokens to a malicious contract, leading to unauthorized fund transfers or token theft.
Yield Disruption:
Incorrect swaps can halt subsequent operations or require manual intervention to recover misallocated funds, causing yield interruptions and financial losses.
The function does not validate:
That the first token in _path
matches underlying
(WETH).
That the last token in _path
matches asset
(alETH).
Incorrect Path Injection:
A Keeper provides a _path
that swaps WETH to an arbitrary token (e.g., USDC) instead of alETH.
The strategy receives USDC instead of alETH, disrupting its ability to operate and causing potential losses.
Malicious Token Diversion:
A Keeper provides a _path
that routes tokens to a malicious contract, siphoning WETH from the strategy.
Incomplete Swaps:
The _path
ends with an intermediary token instead of alETH, leaving the strategy with unutilized tokens and failing to meet the intended yield objectives.
Path Validation: Validate that the first token in _path
matches underlying
and the last token matches asset
.
Whitelist Trusted Tokens: Maintain a whitelist of tokens that are allowed in the swap path, ensuring only approved tokens can be swapped.
Path Sanity Checks: Implement checks to ensure _path
adheres to the expected swap structure and does not include unnecessary or redundant hops.
Ensures Correct Swap Execution:
Guarantees that swaps start with underlying
and end with asset
, eliminating the risk of holding incorrect tokens.
Prevents Token Diversion:
Blocks malicious paths that attempt to reroute funds to unauthorized addresses.
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.