Contracts in scope use the claimAndSwap function to claim wETH from the Transmuter contract and use these tokens to swap for alETH at a premium. However, this function only makes sure that the received alETH amount is greater than the wETH to make sure a swap is profitable, but this function does not consider gas costs or fees that will make these swaps overall unprofitable. This is not a problem for Optimism and Arbitrum chains but in Ethereum Mainnet, gas costs are noticeably higher which will lead to unfavourable swaps.
The claimAndSwap function swaps the wETH received from Transmuter contract for alETH at a premium. For simplicity, focus on the mainnet version.
As observed in this function, it only makes sure that the minimum amount of alETH received from this swap is greater than wETH. But this check alone does not make sure that a swap is profitable as it does not consider gas costs. When the price of alETH/wETH gets close to 1 (for example, 1 alETH = 0.998 wETH), added fees for the swap and gas costs on mainnet can make this swap unprofitable even though received alETH amount is greater than the swapped wETH amount.
In an example scenario when the function is used to swap 0.2 wETH for alETH, at the current pool state 0.202 alETH will be received. Considering that a direct swap in this stable pool will cost about 0.004 ETH
We have spent 0.2 wETH + 0.004 ETH for the swap = 0.204 ETH
Received 0.202 alETH
Overall a loss of 0.002 ETH occurs.
The possiblity of manipulation in this low liquidity pool leading to even more unfavourable profits and gas costs fluctuating, the loss can be even more severe.
Lack of a buffer will lead to unprofitable swaps that the system sees as profitable.
Manual review
Implement a buffer to take gas costs into account. An example is shown below.
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.