Skip to content
Business logic Audit finding Intermediate

ConcentratedLiquidityPoolManager ’s incentives can be stolen

The reclaimIncentive function does not reduce the incentive.rewardsUnclaimed field, allowing repeated claims. An attacker can create their own incentive, wait for expiry, and repeatedly reclaim the same amount until the contract's token balance is drained.

cmichel Follow

Originally disclosed on Code4rena

Submitted by cmichel, also found by broccoli, hickuphh3, pauliax, and WatchPug

The ConcentratedLiquidityPoolManager keeps all tokens for all incentives in the same contract. The reclaimIncentive function does not reduce the incentive.rewardsUnclaimed field and thus one can reclaim tokens several times. This allows anyone to steal all tokens from all incentives by creating an incentive themself, and once it’s expired, repeatedly claim the unclaimed rewards until the token balance is empty.

POC

  • Attacker creates an incentive for a non-existent pool using a random address for pool (This is done such that no other user can claim rewards as we need a non-zero rewardsUnclaimed balance for expiry). They choose the incentive.token to be the token they want to steal from other incentives. (for example, WETH, USDC, or SUSHI) They choose the startTime, endTime, expiry such that the checks pass, i.e., starting and ending in a few seconds from now, expiring in 5 weeks. Then they choose a non-zero rewardsUnclaimed and transfer the incentive.token to the PoolManager.
  • Attacker waits for 5 weeks until the incentive is expired
  • Attacker can now call reclaimIncentive(pool, incentiveId, amount=incentive.rewardsUnclaimed, attacker, false) to withdraw incentive.rewardsUnclaimed of incentive.token from the pool manager.
  • As the incentive.rewardsUnclaimed variable has not been decreased, they can keep calling reclaimIncentive until the pool is drained.

Impact

An attacker can steal all tokens in the PoolManager.

Recommended Mitigation Steps

In reclaimIncentive, reduce incentive.rewardsUnclaimed by the withdrawn amount.

sarangparikh22 (Sushi) confirmed

The original report as published on Code4rena, by cmichel. 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 reclaimIncentive function fails to decrement the incentive.rewardsUnclaimed state variable after transferring tokens.

Impact

An attacker can steal all tokens held by the PoolManager for all incentives.

What the attacker needed

Ability to create an incentive; wait for incentive expiry (5 weeks); no special privileges

The fix

The reclaimIncentive function should reduce incentive.rewardsUnclaimed by the withdrawn amount.

How it was found

  1. Attacker creates an incentive for a non-existent pool with a random pool address, choosing the token to steal and setting startTime, endTime, expiry to pass checks, and a non-zero rewardsUnclaimed, then transfers that token to the…
  2. Attacker waits for the incentive to expire (5 weeks).
  3. Attacker calls reclaimIncentive with amount equal to incentive.rewardsUnclaimed, receiving that amount of the token.
  4. Attacker repeats the call because rewardsUnclaimed is not decreased, draining the PoolManager's balance of that token.

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.

A smart contract holds reward tokens for many incentives. When an incentive expires, users can reclaim leftover rewards, but the contract forgets to update the record of how much is left. So the same person can call the reclaim function over and over, each time getting the same amount, until all tokens are gone.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by cmichel

View all

196 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.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.