Omniscia Steer Protocol Audit

PoolSharkBaseLiquidityManager Code Style Findings

PoolSharkBaseLiquidityManager Code Style Findings

PSB-01C: Incorrect Specification of Gap

Description:

The gap variable declared by the PoolSharkBaseLiquidityManager is set as 37 in length when the contract consumes 9 storage slots per its structure.

Example:

contracts/vault-types/PoolSharkLiquidityManagers/PoolSharkBaseLiquidityManager.sol
101/// @dev Address of vault registry
102/// Address strategist can collect strategist fees, but is not stored here.
103address internal vaultRegistry;
104
105/// @notice Addresses of Token0 and Token1
106IERC20 public token0;
107
108IERC20 public token1;
109
110/// @notice Address of PoolShark pool
111IRangePool public pool;
112
113/// @dev For depositing
114/// Roughly corresponds to a 5% diff between current price and twap price
115int24 public maxTickChange;
116
117/// @dev Number of seconds to get the time-weighted average over
118uint32 public twapInterval;
119
120//For mint Callback Protection
121bool internal mintCallBackProtection;
122
123//For swap Callback Protection
124bool internal swapCallBackProtection;
125
126mapping(string => uint256) public accruedFees0;
127
128mapping(string => uint256) public accruedFees1;
129
130address internal feeManager;
131
132uint256 public totalFees0;
133
134uint256 public totalFees1;

Recommendation:

We advise the gap to be corrected to 41, properly summing up to 50 slots in total per contract.

Alleviation (6513a21a002d422e298719b22f73a4559dfd4663):

The gap size has been corrected to 41 per our recommendation, addressing this exhibit.

As an answer to a separate concern raised by the Steer Protocol team, we would like to outline that the OpenZeppelin documentation itself advocates for a constructor in upgradeable contracts when they are initializable, and thus is safe to use.