Sandwich Attack on rewardValidators Function, Attacker can earn max-profit quickly.
Summary
A Sandwich Attack is possible on OperationalStaking.sol::rewardValidators function.
Vulnerability Detail
Sanwitch attack is possible on OperationalStaking.sol::rewardValidators function where attacker frontrun the OperationalStaking.sol::rewardValidators function and stakes to the validator-Id who is getting more rewards and then OperationalStaking.sol::rewardValidators function will execute and again Attacker will submit the transaction and call OperationalStaking.sol:redeemRewards and will get the profit without staking for long time.
Check when the people staking and add time period after finishing that specific time only people will get rewards not before finishing the timeperiod with same validator.
Atharv
high
Sandwich Attack on rewardValidators Function, Attacker can earn max-profit quickly.
Summary
A Sandwich Attack is possible on
OperationalStaking.sol::rewardValidators
function.Vulnerability Detail
Sanwitch attack is possible on
OperationalStaking.sol::rewardValidators
function where attacker frontrun theOperationalStaking.sol::rewardValidators
function and stakes to the validator-Id who is getting more rewards and thenOperationalStaking.sol::rewardValidators
function will execute and again Attacker will submit the transaction and callOperationalStaking.sol:redeemRewards
and will get the profit without staking for long time.Impact
High
Code Snippet
Code
Tool used
Manual Review
Recommendation
Check when the people staking and add time period after finishing that specific time only people will get rewards not before finishing the timeperiod with same validator.
Duplicate of #47