Lucene search

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

Users cannot receive rewards from ConcentratedLiquidityPoolManager if their liquidity is too large

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

Handle

broccoli

Vulnerability details

Impact

There could be an integer underflow error when the reward of an incentive is claimed, forcing users to wait for a sufficient period or reduce their liquidity to claim the rewards.

Proof of Concept

The unclaimed reward that a user could claim is proportional to the secondsInside, which is, in fact, proportional to the position’s liquidity. It is possible that the liquidity is too large and causes secondsInside to be larger than secondsUnclaimed. As a result, the rewards that the user wants to claim exceed the incentive.rewardsUnclaimed and causes an integer underflow error, which prevents him from getting the rewards.

Referenced code:
ConcentratedLiquidityPoolManager.sol#L94-L95

Recommended Mitigation Steps

Check whether the rewards exceeds the incentive.rewardsUnclaimed. If so, then send only incentive.rewardsUnclaimed amount of rewards to the user.


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

All reactions