Skip to content
Request an audit

‹ All findings

Rebalancing back to original lower and upper ticks will not deposit nft to farm

Low/InfoClip Finance Strategy Upgrade·by the Three Sigma team·DeFi infrastructure·15th March 20243S-Clip-L03

Description

Rebalance changes the lower and upper ticks in PHyperLPoolSwapInside and withdraw from the farming contract if it is allocated. If the rebalance is performed to a previously used lower and upper ticks, the nftId will not be 0 and it will add liquidity instead of minting.

As can be seen, the add liquidity branch does not deposit to the farming contract if it is not allocated yet.

Recommendation

The impact is reduced as it can be deposited later by calling PHyperLPoolSwapInside::depositNftToFarm().

Consider try allocating after the _mint() call if it is not allocated yet (and setting the allocatedToFarming bool to true)

Status

Addressed in #0c8de23.