https://github.com/Cyfrin/2024-09-stakelink/blob/f5824f9ad67058b24a2c08494e51ddd7efdbb90b/contracts/linkStaking/OperatorVault.sol#L261
The setRewardsReceiver function restricts the ability to modify the rewards receiver to the current rewards receiver itself, leaving the contract owner unable to intervene or reset the rewards receiver after it has been set. This poses a control issue for the owner, particularly if the rewards receiver becomes unreachable or compromised, as the owner cannot directly modify the rewardsReceiver.
In the setRewardsReceiver function, the logic imposes strict access control that only allows the current rewardsReceiver to modify its own address after it has been set. The owner is permitted to set the rewardsReceiver only when it is initially set to address(0).
After the rewardsReceiver
has been set, the owner loses the ability to reset or modify the rewards receiver. This can cause operational issues if the rewards receiver is compromised, loses access, or is otherwise unable to perform its functions.
The contract owner is unable to change or reset the rewardsReceiver once it has been set, even in cases where such action might be necessary, such as the receiver becoming unresponsive or compromised.
Manual Review
Allow the owner to always have the ability to reset the rewardsReceiver, regardless of whether a receiver is already set. This would provide a failsafe mechanism for recovering control of the vault's rewards in case of emergency.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.