There is no price check implemented using oracle price feeds while swapping WETH for alWETH using the functions StrategyArb::_swapUnderlyingToAsset
, StrategyOp::_swapUnderlyingToAsset
and StrategyMainnet::claimAndSwap
.
Below is the implementation of StrategyArb::_swapUnderlyingToAsset
which takes the params _amount
as WETH to swap and minOut
as the minimum number of alWETH to receive after swap. Here, it just checks if input param minOut
is greater than _amount
and after other checks, calls the swap transaction on the Router.
The transaction would fail if the price of alWETH comparative to WETH does not facilitate getting more alWETH in return for less WETH. However, by using an oracle to check the price of the alWETH, the transaction if has to be reverted, will be reverted way before calling the swap function on the Router.
An oracle price check before the swap would ensure that the transaction only proceeds when the price is within an acceptable range.
This would led to transaction failures if price of tokens doesn't fall in the acceptable range.
Manual, VSCode
Should add an oracle price check before calling `swapExactTokensForTokens` on the router.
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.