Submitted by EV_om
The Dispenser contract is responsible for distributing staking incentives to various targets. One of the functionalities provided by the contract is the ability to claim staking incentives for a specific staking target using the claimStakingIncentives() function. This function calculates the staking incentives for a given target and distributes them accordingly.
The retain() function, on the other hand, is designed to retain staking incentives for the retainer address and return them back to the staking inflation.
However, there is no check to ensure users cannot call the claimStakingIncentives() function for the retainer address and send the staking incentives to the retainer instead of returning them to the staking inflation.
This means anyone can divert the retainer rewards, which are meant to be sent back to the staking inflation, to the retainer itself. In that scenario, there is no way to return the funds to the staking incentive.
Loss of staking incentives that should have been returned to the staking inflation.
Restrict the claimStakingIncentives() function to prevent the claiming of rewards for the retainer address.
Invalid Validation
kupermind (Olas) confirmed
Olas mitigated
Varun_05 (warden) commented:
