The unstake()
function requires users to have zero pending rewards before unstaking, but since rewards are constantly updated with every user action, it becomes extremely difficult to successfully unstake.
In VaultRouterBranch.sol
, the unstake()
function has a strict check that prevents users from unstaking if they have any pending rewards:
The rewards are updated via recalculateVaultsCreditCapacity() which is called during every user action:
Even if users claim their rewards first, by the time they attempt to unstake, new rewards may have accumulated due to vault updates from other users' actions, causing the unstake to fail again.
Users are effectively prevented from unstaking their tokens unless they manage to execute the unstake transaction in a block where no other vault updates have occurred.
Remove the pending rewards check from unstake()
function since rewards are handled separately through the fee distribution system.
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.