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.
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-zerorewardsUnclaimedbalance for expiry). They choose theincentive.tokento be the token they want to steal from other incentives. (for example,WETH,USDC, orSUSHI) They choose thestartTime, endTime, expirysuch that the checks pass, i.e., starting and ending in a few seconds from now, expiring in 5 weeks. Then they choose a non-zerorewardsUnclaimedand transfer theincentive.tokento thePoolManager. - Attacker waits for 5 weeks until the incentive is expired
- Attacker can now call
reclaimIncentive(pool, incentiveId, amount=incentive.rewardsUnclaimed, attacker, false)to withdrawincentive.rewardsUnclaimedofincentive.tokenfrom the pool manager. - As the
incentive.rewardsUnclaimedvariable has not been decreased, they can keep callingreclaimIncentiveuntil 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.
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
- 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…
- Attacker waits for the incentive to expire (5 weeks).
- Attacker calls reclaimIncentive with amount equal to incentive.rewardsUnclaimed, receiving that amount of the token.
- 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.