Submitted by shaflow2
M-16: https://code4rena.com/evaluate/2024-12-bakerfi-invitational/findings/F-43
The function will return the actual amount of tokens withdrawn, which has been fixed. However, the balance value calculation is incorrect, causing the contract to emit events with incorrect parameters.
https://github.com/baker-fi/bakerfi-contracts/blob/42eb8e7a09022e0ab4007d768f068874b02c8a50/contracts/core/strategies/StrategySupplyBase.sol#L129
The actual remaining balance should be balance - withdrawalValue, where withdrawalValue is the actual amount of tokens withdrawn.
Dravee (judge) commented:
