Submitted by minhquanym
In the _getAvailable() function, the calculation performs division before multiplication, which could result in precision loss. The consequence is that users may not be able to withdraw the amount they should receive, leaving some funds locked in the WithdrawalQueue.
Consider the following scenario:
The current calculation will yield:
However, the users should actually receive:
As shown, the users lose almost 50% of what they should receive.
Change the order of calculation to multiply before division.
Math
0xend (Gondi) confirmed
Gondi mitigated:
Status: Mitigation confirmed. Full details in reports from oakcobalt, minhquanym and bin2chen.
