52750 sc low percentage limit bypass via unstaking from other validators
Description
Brief/Intro
Vulnerability Details
function _validateValidatorPercentage(uint16 validatorId, uint256 stakeAmount) internal view {
PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();
uint256 previousTotalStaked = $.totalStaked - stakeAmount;
// Check if exceeding validator percentage limit
if (previousTotalStaked > 0 && $.maxValidatorPercentage > 0) {
uint256 newDelegatedAmount = $.validators[validatorId].delegatedAmount;
uint256 validatorPercentage = (newDelegatedAmount * 10_000) / $.totalStaked;
if (validatorPercentage > $.maxValidatorPercentage) {
revert ValidatorPercentageExceeded();
}
}
}Impact Details
Proof of Concept
References
Previous51684 sc medium unbounded gas consumption in removestakerfromallvalidators leads to denial of service preventing users with large validator counts from removing associations and potentially lock Next52931 sc high validators can not claim their commissions after the reward token removal
Was this helpful?