Skip to content
Business logic Audit finding Beginner

ConcentratedLiquidityPool : initialPrice should be checked to be within allowable range

The pool contract does not validate that the initial price is within the allowed range, so it can be set to an extreme value such as zero. This prevents all other functions like minting, swapping, and burning from working.

hickuphh3 Follow

Originally disclosed on Code4rena

Submitted by hickuphh3

Impact

No check is performed for the initial price. This means that it can be set to be below the MIN_SQRT_RATIO or above MAX_SQRT_RATIO (Eg. zero value), which will prevent the usability of all other functions (minting, swapping, burning).

For example, Ticks.insert() would fail when attempting to calculate actualNearestTick = TickMath.getTickAtSqrtRatio(currentPrice);, which means no one will be able to mint positions.

Recommended Mitigation Steps

Check the initialPrice is within the acceptable range, ie. MIN_SQRT_RATIO <= initialPrice <= MAX_SQRT_RATIO

sarangparikh22 (Sushi) confirmed

The original report as published on Code4rena, by hickuphh3. 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 contract's initialisation function lacks a bounds check on the initial price parameter.

Impact

If the initial price is set outside the allowed range, all pool functions (minting, swapping, burning) become unusable.

What the attacker needed

Ability to set initial price at pool creation

The fix

The initial price should be validated to be within the acceptable range before use.

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 for a trading pool lets someone set the starting price when it is created. The code never checks that this price is sensible, so it can be set to zero or another extreme value. That breaks the pool: no one can add funds, trade, or withdraw because the maths fails.

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 hickuphh3

View all

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