Omniscia Steer Protocol Audit

AlgebraBaseLiquidityManager Manual Review Findings

AlgebraBaseLiquidityManager Manual Review Findings

ABL-01M: Inexistent Configuration of Fee Manager (Migration)

Description:

The AlgebraBaseLiquidityManager::migrate function is meant to permit previously present liquidity managers to migrate to the new fee structure, however, the feeManager will never be configured for those entries causing the AlgebraBaseLiquidityManager::migrate function to fail.

Impact:

All previously deployed liquidity managers that are upgraded will never properly migrate as the feeManager would point to the zero address and would never be configured.

Example:

contracts/vault-types/AlgebraLiquidityManagers/AlgebraBaseLiquidityManager.sol
641function migrate() external {
642 require(!isMigrated);
643 isMigrated = true;
644 //Migration of fee percentages
645 IFeeManager(feeManager).setMigratedVaultFeeAndWithdrawalPermission();
646 //Migration of fees accrued
647 accruedFees0["STEER_FEES"] += accruedSteerFees0;
648 totalFees0 += accruedSteerFees0;
649 accruedFees0["STRATEGIST_FEES"] += accruedStrategistFees0;
650 totalFees0 += accruedStrategistFees0;
651
652 accruedFees1["STEER_FEES"] += accruedSteerFees1;
653 totalFees1 += accruedSteerFees1;
654 accruedFees1["STRATEGIST_FEES"] += accruedStrategistFees1;
655 totalFees1 += accruedStrategistFees1;
656}

Recommendation:

We advise the function to accept an input argument, properly configuring the feeManager before its body is executed.

Additionally, we advise access control to be imposed on the function to ensure the correct feeManager is specified by a caller affiliated with the Steer Protocol team.

Alleviation (6513a21a002d422e298719b22f73a4559dfd4663):

The migration mechanism of the AlgebraBaseLiquidityManager has been moved onto the AlgebraMultiPositionLiquidityManager contract implementation, and will now fetch the _feeManager as well as _helper dynamically from the vaultRegistry.

As such, the migration procedure will be correctly performed and the contract will be re-configured during its migration for the newly introduced feeManager and helper variables.