Submitted by cmichel
The SynthVault.withdraw function does not claim the users rewards. It decreases the users weight and therefore they are forfeiting their accumulated rewards.
The synthReward variable in _processWithdraw is also never used - it was probably intended that this variable captures the claimed rewards.
Usually, withdrawal functions claim rewards first but this one does not. A user that withdraws loses all their accumulated rewards.
Recommend claiming the rewards with the users deposited balance first in withdraw.
verifyfirst (Spartan) confirmed but disagreed with severity:
