Alchemix strategies use the underlying state to keep track of the WETH address. This is used several times in the code to determine the WETH balance of the strategies. Only strategies have access to that variable (inherited contracts never use it). The problem is that the WETH balance is used in balanceDeployed() and especially in _harvestAndReport() to calculate profit and loss. As explained by the code, it is to account for possible some dormant WETH that isn't swapped yet. However, there is absolutely no function to swap/collect them. So every WETH sent to any strategy will be blocked in the contract and corrupt the profit and loss calculation in BaseStrategy::report().
Likelyhood: High
Any person can transfer WETH to the contract at any time.
The 3 strategies are concerned.
Impact: High
_harvestAndReport() is used to calculate the profit/loss, and that calculation will always be wrong since those tokens are not real profit, they are just stuck.
The returned value of this function, as explained in the natspec, has to be trusted and accurate because it will increase the collected fees and the newProfitLockingPeriod !
balanceDeployed() will return a incorrect value.
Several solutions are possible:
Uncomment the lines in _harvestAndReport() and patch them to use the correct _swapUnderlyingToAsset function (with the missing parameters).
claimAndSwap could include those lines to collect the remaining amount just before depositing the alETH balance:
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.