Thankful Plum Pheasant
Medium
When we update tick bounds in SolidlyV3AMO, we don't adjust the previous position's liquidity to the new position. This will cause the previous liquidity cannot be used in _unfarmBuyBurn
.
In SolidlyV3AMO.sol::86, the SETTER ROLE can update tick bounds to one new position according to current condition.
The problem is that we don't adjust the previous liquidity from the previous position to the new position when the SETTER role update the tick bounds. This will cause that the new position holds zero liquidity after we update tick bounds. If the amo bot wants to adjust the BOOST price via unfarmBuyBurn
, the operation will be reverted because there is no any liquidity in the new position.
function setTickBounds(int24 tickLower_, int24 tickUpper_) public override onlyRole(SETTER_ROLE) {
tickLower = tickLower_;
tickUpper = tickUpper_;
emit TickBoundsSet(tickLower, tickUpper);
}
- SolidlyV3AMO runs for a while and we have some liquidity in the previous position.
- The Setter role updates the tick bounds to one new position.
N/A
- SolidlyV3AMO runs for a while and we have some liquidity in AMO contract.
- Setter role updates the tick bound to one new position.
- Boost token becomes below-pegged.
- AMO bot wants to trigger
unfarmBuyBurn
to adjust BOOST price, this will be reverted because the existing liquidity cannot be burned.
The existing liquidity cannot be burned to adjust BOOST price.
N/A
When we update tick bound, remove liquidity from the previous position and add liquidity to the new position.