Submitted by Tigerfrake, also found by DadeKuma
Both the update_position_internal() and adjust_position_internal() functions are responsible for managing token positions, which involves taking tokens from users. However, there is a critical inconsistency in how each function verifies the operational status of the liquidity pool before performing token transfers from the user.
update_position_internal() - checks if the pool is enabled before taking tokens from the user.
adjust_position_internal() - does not explicitly check whether the pool is enabled before proceeding.
First, it calls self.pools.setter(pool).adjust_position(...) which has the following comment:
The comment in the adjust_position() function implies that a check for the pools operational state is necessary and should be enforced in update_position(). However, update_position() function does not make such enforcement as it does not check for pool status.
Users could unintentionally have their tokens adjusted or transferred to a pool that is not operational which is not in accordance with protocol requirement. This also exposes users to risks in the event that there are potential issues with the pool.
Modify the adjust_position_internal() function to include a status check before executing the position adjustment:
af-afk (Superposition) acknowledged and commented via duplicate Issue #4:
0xsomeone (judge) commented via duplicate Issue #4:
DadeKuma (warden) commented via duplicate Issue #4:
0xsomeone (judge) commented via duplicate Issue #4:
af-afk (Superposition) commented:
