Omniscia Nuklai Audit
VerifierManager Code Style Findings
VerifierManager Code Style Findings
VMR-01C: Inexistent Event Indexing
Type | Severity | Location |
---|---|---|
Language Specific | VerifierManager.sol:L26, L27 |
Description:
The FragmentPending
, and FragmentResolved
events of the VerifierManager
contract do not contain any indexed
arguments.
Example:
26event FragmentPending(uint256 id);27event FragmentResolved(uint256 id, bool accept);
Recommendation:
We advise them to be introduced, particularly in relation to the id
to ensure off-chain processes can optimally filter these events.
Alleviation (fb50b5c39665f7df086b2de1fdbf93ba2d836bf9):
The indexed
keyword has been properly introduced to the id
values as advised, optimizing their off-chain usability.
VMR-02C: Loop Iterator Optimization
Type | Severity | Location |
---|---|---|
Gas Optimization | VerifierManager.sol:L89 |
Description:
The linked for
loop increments / decrements the iterator "safely" due to Solidity's built-in safe arithmetics (post-0.8.X
).
Example:
89for (uint256 i; i < tags.length; i++) {
Recommendation:
We advise the increment / decrement operation to be performed in an unchecked
code block as the last statement within the for
loop to optimize its execution cost.
Alleviation (fb50b5c39665f7df086b2de1fdbf93ba2d836bf9):
The referenced loop iterator's increment statement has been relocated at the end of the for
loop's body and has been unwrapped in an unchecked
code block, optimizing its gas cost.