Strategy withdraw may fail if weights of strategies differ from the real values and might lead to frozen ReservePool
Description
When depositing or withdrawing in the ReservePool, it deposits/withdraws individually from the strategies based on the weights. In the case of withdrawals, the transaction might revert. Suppose default strategy with 50% weight and AaveV3 strategy with 50% weight. AaveV3 yield reduces, such that its amount is no longer 50%, but 49%.
In the ReservePool, withdraw(), the transaction will revert because it tries to withdraw 50% from the AaveV3 strategy, which will revert.
Recommendation
Call the getBalance() (3S-GLACIER-H02), to get the maximum available balance and withdraw at most this amount. Then, return the actual withdrawn amount, so that glAVAX can deal with a possibly reduced amount.
Then, in glAVAX, it has to be dealt with accordingly. The max withdrawal amount check should be done in the ReservePool, so it is unnecessary to check again in glAVAX.
Status
Currently being reviewed by the team.