SynthVault withdraw forfeits rewards
The SynthVault withdrawal function reduces a user's weight without first claiming their accumulated rewards, so a user who withdraws directly from the contract loses all unclaimed rewards. The unused synthReward variable suggests claiming was intended but never implemented.
Submitted by cmichel
The SynthVault.withdraw function does not claim the user’s rewards. It decreases the user’s 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 user’s deposited balance first in withdraw.
verifyfirst (Spartan) confirmed but disagreed with severity:
We understand there is a risk of losing unclaimed rewards if a user directly interacts with the synth-vault and not the DAPP. This is a design choice to protect the withdrawal function. We affirm the synthReward variable to be culled.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the withdraw path reduces the user's weight without first claiming accrued rewards, and the variable meant to hold the claimed amount is never used.
Impact
A user who withdraws directly from the contract, rather than through the app, forfeits all accumulated rewards; the project treats this as a deliberate design choice.
What the attacker needed
User has unclaimed rewards; user withdraws directly from the contract
The fix
Rewards should be claimed against the user's deposited balance before the withdrawal proceeds.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A vault is a smart contract that holds users' deposits and pays out rewards over time. When someone takes their money out, the contract should first pay them any rewards they have earned; here it skips that step and simply forgets the rewards, so they are gone. The project said this only affects users who call the contract directly rather than through the official app.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.