code-423n4 / 2024-06-vultisig-validation

2 stars 0 forks source link

Invalid validation for pool price range #648

Open c4-bot-4 opened 4 months ago

c4-bot-4 commented 4 months ago

Lines of code

https://github.com/code-423n4/2024-06-vultisig/blob/cb72b1e9053c02a58d874ff376359a83dc3f0742/src/ILOManager.sol#L90

Vulnerability details

Impact

initILOPool function in the ILOPool contract should check if the initialPoolPrice is in range of the lower and upper tick provided.

But we look closely, it only checks if the lower < upper & lower < initial.

Thus there can be scenario where lower < upper < initial will hold true

Tools Used

Manual Review

Recommended Mitigation Steps

require(sqrtRatioLowerX96 < _project.initialPoolPriceX96 && _project.initialPoolPriceX96 < sqrtRatioUpperX96, "RANGE");

Assessed type

Invalid Validation