#41938 [SC-Critical] Unstake process manipulation and reward distribution vulnerability
Description
Brief/Intro
Vulnerability Details
function stake(uint256 amount) external {
require(amount > 0, "Amount must be greater than 0");
_updateRewards(msg.sender);
stakingToken.transferFrom(msg.sender, address(this), amount);
balanceOf[msg.sender] += amount;
>> totalSupply += amount;
emit Stake(msg.sender, amount);
}Impact Details
References
Proof of Concept
Proof of Concept
Previous#41911 [SC-Critical] Unstake amount can be zapped before user withdrawalNext#41949 [SC-Insight] Optimize StakeV2::startUnstake with `unchecked` block to reduce gas costs
Was this helpful?