#41487 [SC-Critical] Updates totalSupply before transferring the tokens which causes calculating more reward tokens
Description
Brief/Intro
Vulnerability Details
balanceOf[msg.sender] -= unStakeAmount;
totalSupply -= unStakeAmount;Impact Details
References
Proof of Concept
Proof of Concept
Previous#41456 [SC-Critical] `executeRewardDistributionYeet` will count user withdraws as rewardsNext#41488 [SC-Insight] In `StakeV2.sol` there exists a critical flaw that allows adversaries to earn more rewards than should be possible for a period of having staked minimal tokens.
Was this helpful?