Liquid Staking

Stakelink
DeFiHardhatOracle
50,000 USDC
View results
Submission Details
Severity: high
Invalid

Operator does not receive reward when calling a valid `OperatorVault::raiseAlert` call

Summary

Calling a valid OperatorVault::raiseAlert would reward the caller as stated on Chainlink docs, but the OperatorVault is not transferring portion of the reward to the operator, making the call not profitable and instead the opreator reward is lost.

Vulnerability Details

OperatorVault.sol#L126-L137

function raiseAlert(address _feed) external onlyOperator {
uint256 prevBalance = token.balanceOf(address(this));
pfAlertsController.raiseAlert(_feed);
uint256 rewards = token.balanceOf(address(this)) - prevBalance;
@> uint256 opRewards = (rewards * IOperatorVCS(vaultController).operatorRewardPercentage()) / 10000;
@> token.safeTransfer(vaultController, rewards - opRewards);
emit AlertRaised();
}

opRewards is calculated and deducted when transfering the token to vaultController address but after that there are no action for opRewards as this variable is local variable then it would dissapear after the call is completed

Impact

Operator would lose their reward when calling the raiseAlert function, making the call not provitable and would make the vaultController lose potential reward that can be received from raising valid alert.
This is significant loses for the protocol overall.

Tools Used

manual review

Recommendations

There would be varying recommendation for this issue, and I prefer the first one to make the operator reward logic not much changed:

  1. add the value of opRewards after calling raiseAlert in the state variable unclaimedRewards

  2. add code to transfer the opRewards to the operator inside the raiseAlert function similar to vaultController

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.