Issue:
The _swapUnderlyingToAsset
function performs a simplistic validation of the minOut
parameter, requiring only that minOut > _amount
. This check ensures that the output amount of alETH exceeds the input amount of WETH but does not verify whether the trade achieves a true premium based on real market conditions or oracle-based pricing.
High.
Price Manipulation:
Attackers can manipulate on-chain liquidity pools or swap paths to achieve favorable conditions and front-run the transaction, leading to swaps at suboptimal rates.
This can cause the strategy to lose value and harm depositor yields.
Lack of Price Verification:
Without reference to a trusted price oracle, the strategy cannot ensure swaps are executed at fair market rates, leaving it exposed to slippage and unfavorable trades.
Inaccurate Slippage Protection:
The simplistic minOut
check does not account for real-time token price volatility or premium expectations, making it susceptible to rapid market changes or malicious actors.
The condition require(minOut > _amount, "minOut too low");
ensures only that the output exceeds the input but lacks validation against actual market prices or a premium.
Front-Running with Manipulated Liquidity:
An attacker observes the transaction in the mempool (assuming Optimism has a malicious sequencer or private transaction leaks).
The attacker preemptively manipulates the liquidity pool to skew the exchange rate and achieves a profit by adjusting the market temporarily before and after the strategy's swap.
Slippage Exploitation:
An attacker designs a swap route that appears valid but incurs significant slippage due to poorly selected intermediary tokens or pools.
The strategy performs the trade, receiving less value than expected without triggering the simplistic minOut > _amount
condition.
Misaligned Premium Expectations:
A Keeper submits a transaction with a minOut
that only marginally exceeds _amount
, causing the strategy to swap without realizing a true premium, thereby reducing user yields.
Oracle-Based Price Validation: Introduce a price oracle to validate that minOut
corresponds to an acceptable exchange rate. Compare the expected output with the oracle-reported price for the trade.
Premium Threshold Enforcement: Require that minOut
includes a predefined premium (e.g., 1.5%) to account for slippage and ensure profitability.
Dynamic Slippage Tolerance: Adjust the minOut
condition dynamically based on real-time volatility or liquidity metrics from the router or pools.
Time-Limited Transactions: Include a deadline parameter to ensure the transaction executes promptly, minimizing exposure to front-running.
Fair Market Protection:
Prevents swaps from executing at rates significantly below market value.
Protects against slippage and manipulated trades.
Premium Enforcement:
Ensures swaps generate positive returns, improving depositor confidence and yield reliability.
Minimized Exploitation:
Reduces the feasibility of front-running and slippage attacks by requiring adherence to oracle-verified pricing and premium thresholds.
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.