Submitted by klau5, also found by 0xlemon, 0xpiken, MrPotatoMagic, pfapostol, and shaflow2
https://github.com/code-423n4/2024-12-bakerfi/blob/0daf8a0547b6245faed5b6cd3f5daf44d2ea7c9a/contracts/core/strategies/StrategySupplyBase.sol#L110
StrategySupplyBase.undeploy does not update _deployedAmount. As a result, if a withdrawal occurs, even if interest is generated, the protocol cannot collect performance fees through rebalance.
StrategySupplyBase.undeploy does not update _deployedAmount. It should subtract the amount of withdrawn asset tokens.
As a result, if a withdrawal occurs, even if interest is generated, the protocol cannot collect performance fees through rebalance. This is because if the withdrawal amount is greater than the interest earned, the Strategy is considered to have a loss and no fee is taken.
This is PoC.  This shows that when harvested after withdrawal, the Strategy is considered to have a loss. This can be executed by adding it to the StrategySupplyAAVEv3.ts file.
Update _deployedAmount by the withdrawal amount in StrategySupplyBase.undeploy.
chefkenji (BakerFi) confirmed
BakerFi mitigated:
Status: Mitigation confirmed. Full details in reports from shaflow2 and 0xlemon.
