Skip to content
Business logic Audit finding Intermediate

Cannot claim reward

The claimReward function in the ConcentratedLiquidityPoolManager checks a stake.initialized flag that is never set, and also computes 128 minus incentive.secondsClaimed, which almost always underflows and reverts. As a result, users cannot claim their rewards.

cmichel Follow

Originally disclosed on Code4rena

Submitted by cmichel, also found by 0xsanson, broccoli, hickuphh3, and WatchPug

The ConcentratedLiquidityPoolManager.claimReward requires stake.initialized but it is never set. It also performs a strange computation as 128 - incentive.secondsClaimed which will almost always underflow and revert the transaction.

Impact

One cannot claim rewards.

Recommended Mitigation Steps

Rethink how claiming rewards should work.

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 stake.initialized flag is never assigned before the check, and the subtraction 128 - incentive.secondsClaimed underflows because secondsClaimed is usually larger than 128.

What the attacker needed

A deployed vulnerable contract

The fix

The reward-claiming logic should be redesigned so the initialisation flag is actually set and the time calculation cannot underflow.

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 function that is meant to pay out rewards always fails. It checks a flag that is never turned on, and it does a subtraction that goes below zero, which the programming language treats as an error. So the reward payout simply never works.

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.