shw
The variable pendingWithdrawals in the contract Withdrawable is not decreased after the function withdraw is called, which causes the return value of function getReserveBalance less than it should be. This bug could cause incorrect results in several critical functions related to FSD token pricing, including getFSDPrice, purchaseMembership, getMaximumBenefitPerUser, mint, and burn in the FSDNetwork and FSD contracts.
Referenced code:
Withdrawable.sol#L14-L19
Withdrawable.sol#L26-L28
Affected functions:
FSD.sol#L85
FSD.sol#L100
FSDNetwork.sol#L136
FSDNetwork.sol#L361
FSDNetwork.sol#L369
Add pendingWithdrawals = pendingWithdrawals.sub(reserveAmount); after line 17 in the contract Withdrawable.
The text was updated successfully, but these errors were encountered:
All reactions