Omniscia Evergon Labs Audit

TokenWrapperToERC1155WithERC20FractionsDataManager Code Style Findings

TokenWrapperToERC1155WithERC20FractionsDataManager Code Style Findings

TWT-01C: Ineffectual Usage of Safe Arithmetics

TypeSeverityLocation
Language SpecificTokenWrapperToERC1155WithERC20FractionsDataManager.sol:
I-1: L315
I-2: L332
I-3: L352
I-4: L371
I-5: L396
I-6: L415
I-7: L433

Description:

The linked mathematical operations are guaranteed to be performed safely by surrounding conditionals evaluated in either require checks or if-else constructs.

Example:

contracts/dataManagers/wrappers/TokenWrapperToERC1155WithERC20FractionsDataManager.sol
315uint256 wid = ++_wrapCounter;

Recommendation:

Given that safe arithmetics are toggled on by default in pragma versions of 0.8.X, we advise the linked statements to be wrapped in unchecked code blocks thereby optimizing their execution cost.

Alleviation (c6b23c23d8bcd8cce85049ad959cbd711a37126b):

An unchecked code block has been introduced around each relevant arithmetic operation optimizing their gas cost safely.