In VaultRouterBranch.sol
the stake
function will cause users to lose rewards. This is due to incorrectly calling accumulateActor
without distributing the valueChange
. As a result the protocol will incorrectly update the lastValuePerShare
of the actor, leading to loss of rewards.
The following call will try to update the actor's rewards:
However when we check out the accumulateActor
function we can see that the valueChange
is not actually distributed:
Furthermore, the _updateLastValuePerShare
will return the accumulated rewards and perform the following storage updates:
This will update the lastValuePerShare
without distributing the valueChange
as a result users will lose rewards, since the valueChange
is not distributed.
Consider the following scenario:
1.Alice is the only staker and has staked 5 index tokens.
2.The protocol accumulates a weth reward of 10weth which will be 2 weth per index token.
3.Alice calls stake again trying to stake another 5 tokens
4.Due to accumulateActor
not distributing the `valueChange` these 10 weth will be stuck in the contract and Alice will be assumed to have successfully claimed them.
Definite loss of funds anytime stake
is called.
Manual Review
Consider distributing the `valueChange` in the stake function.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.