Submitted by 0xStalin, also found by zhaojie
WETH supplied to Aave will be lost.
When a strategy pays debt on Aave it does a swap of the withdrawn collateral from Aave in exchange for WETH. After the swap is completed, it checks if there are any weth leftovers after the swap, if so, it deposits them back. The problem with this approach is that the strategy doesnt have any means to pull WETH out of Aave, the strategy is only capable of withdrawing the collateral from Aave, but not WETH.
The strategy uses the StrategyAAVEv3._withdraw() function to withdraw an asset from Aave, but, in the places where this function is called, the only assets requested to be withdrawn is the Collateral.
Instead of supplying the wethLefts, use the excess WETH to repay more WETH debt on Aave, in this way, those extra WETHs wont be lost on Aave because the strategy doesnt have any means to withdraw them.
hvasconcelos (BakerFi) confirmed
ickas (BakerFi) commented:
