Lucene search

K
code423n4Code4renaCODE423N4:2021-09-SUSHITRIDENT-2-FINDINGS-ISSUES-39
HistoryOct 06, 2021 - 12:00 a.m.

ConcentratedLiquidityPoolManager uses wrong index for incentive

2021-10-0600:00:00
Code4rena
github.com
4

Handle

cmichel

Vulnerability details

The ConcentratedLiquidityPoolManager uses the positionId as an index for incentives[pool][positionId] when it should be incentiveId instead:

// @audit should be Incentive memory incentive = incentives[pool][incentiveId];
Incentive memory incentive = incentives[pool][positionId];

This issue occurs in subscribe, claimReward, getReward

Impact

The incentive reward mechanism does not work correctly and a single person owning the positionId of the actual incentiveId can claim all rewards.

Recommended Mitigation Steps

Use incentiveId to index incentives[pool][.]


The text was updated successfully, but these errors were encountered:

All reactions