Skip to content
DoS Audit finding Intermediate

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

A user with very large liquidity could have their unclaimed reward calculation exceed the incentive's remaining rewards, causing an integer underflow that prevents them from claiming any rewards. The attacker could not steal funds but could be blocked from receiving owed rewards.

broccoli Follow

Originally disclosed on Code4rena

Submitted by broccoli

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:

Recommended Mitigation Steps

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

sarangparikh22 (Sushi) acknowledged:

The problem seems very unlikely to happen, would be great to see a POC.

The original report as published on Code4rena, by broccoli. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the reward calculation does not cap the user's reward at the remaining unclaimed incentive amount, leading to an integer underflow when subtracting.

Impact

Users with very large liquidity could be unable to claim rewards until enough time passes or they reduce their liquidity; the issue was acknowledged but considered unlikely to happen.

What the attacker needed

Very large liquidity position; incentive with insufficient remaining rewards

The fix

The reward calculation should check if the user's reward exceeds the remaining unclaimed incentive and, if so, send only the remaining amount.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you provide liquidity to a pool, you earn rewards over time. The code calculates how much you are owed and subtracts it from a shared pool of rewards. If your share is bigger than what is left in that pool, the subtraction goes negative, which the code cannot handle, so the transaction fails and you get nothing.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by broccoli

View all

16 more disclosed reports, best first.

More from Sushi Trident contest phase 2

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.