Submitted by hyh, also found by jonatascm
shutdownPool() marks shutdown successful even if its not (i.e. when withdrawAll() call wasnt successful). As withdrawing logic expect that the pool in shutdown has already provided the funds, and makes no additional attempts to retrieve them, user funds will be frozen permanently as there are no mechanics in place to turn shutdown off for a pool.
Setting severity to medium as thats user principal funds freeze scenario conditional on any issues in withdrawAll().
In the case of unsuccessful withdrawAll() call the pool nevertheless will be marked as shutdown:
https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/contracts/Booster.sol#L312-L320
It will block the withdrawals as there will be not enough funds to fulfil the claim:
https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/contracts/Booster.sol#L408-L422
This way user funds will be frozen as the system will not attempt to withdraw from the pool, while there will be no funds to transfer to the user and _withdraw() will be reverting on L422 safeTransfer call.
The shutdownPool logic can to be updated:
https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/contracts/Booster.sol#L307-L320
Consider unifying the logic with shutdownSystem() and marking the pool shutdown only if withdraw was successful, for example:
jetbrain10 (veToken Finance) acknowledged, but disagreed with severity and commented:
Alex the Entreprenerd (judge) commented:
Alex the Entreprenerd (judge) commented:
