The modifier ifMinterSelf() is indicated by its name to to be apply with any functions that separate logic between minter and non-minter. However, the modifier only covers when the caller is a minter, which means that non-minters may successfully call that function without any logic being executed. Therefore, causing unnecessary transaction to the network.
Uncoverage Condition
Description
The modifier
ifMinterSelf()
is indicated by its name to to be apply with any functions that separate logic between minter and non-minter. However, the modifier only covers when the caller is a minter, which means that non-minters may successfully call that function without any logic being executed. Therefore, causing unnecessary transaction to the network.Permalinks
https://github.com/code-423n4/2022-03-volt/blob/f1210bf3151095e4d371c9e9d7682d9031860bbd/contracts/refs/CoreRef.sol#L29
Mitigation
Add
else
condition to cover when the caller is not a minter, or remove the code in case that it is not planned to be used.