code-423n4 / 2021-09-sushitrident-2-findings

0 stars 0 forks source link

Can reclaim the same incentive multiple times #64

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

pauliax

Vulnerability details

Impact

function reclaimIncentive can be invoked more than once for the same incentiveId. If there were multiple incentives for the same token it would allow to drain these tokens by repeatedly calling reclaimIncentive.

Recommended Mitigation Steps

Simple mitigation is to simply add the amount to the rewardsUnclaimed or add an extra boolean flag 'reclaimed' to the Incentive struct but that would incur more gas.

sarangparikh22 commented 3 years ago

Duplicate of #37