68870 sc insight reward calculation intermediate multiplication overflow
Description
Brief/Intro
Vulnerability Details
// src/Staking.sol#L267-L268
uint256 rewardBpsDenominator = 1e4 * 365 days;
uint256 reward = (amount * stakingPeriod.aprBps * stakingPeriod.stakingDurationSeconds) / rewardBpsDenominator;Impact Details
References
Recommendation
Proof of Concept
Previous69756 sc low staking setmigrationpermit unnecessary hasrole check on revocation blocks users from managing own permitsNext69898 sc low stale migration approvals allow a re authorized migrator to move user positions without renewed consent
Was this helpful?