Assessment reports>Concrete>Discussion>Unused _decimals variable in strategies

Unused _decimals variable in strategies

The StrategyBase contract includes a _decimals storage variable, which is initialized to be nine greater than the asset's original decimals.

uint8 public _decimals;

uint8 public constant DECIMAL_OFFSET = 9;

function __StrategyBase_init(
	IERC20 baseAsset_,
	string memory shareName_,
	string memory shareSymbol_,
	address feeRecipient_,
	uint256 depositLimit_,
	address owner_,
	RewardToken[] memory rewardTokens_,
	address vault_
) internal nonReentrant initializer {
	// [...]
	_decimals = IERC20Metadata(address(baseAsset_)).decimals() + DECIMAL_OFFSET;
	// [...]
}

However, in the strategies covered by the current audit (AaveV3Strategy, MorphoVaultStrategy, and MultiSigStrategyV1), the _decimals variable is not used. These strategies do not override the decimals, _convertToShares, or _convertToAssets functions to utilize _decimals and DECIMAL_OFFSET, as demonstrated in the ExampleStrategyBaseImplementation contract.

If _decimals is not intended for use, consider removing this variable to prevent confusion in the code.

Zellic © 2025Back to top ↑