Omniscia Nexera Protocol Audit
BaseTxAuthDataVerifier Code Style Findings
BaseTxAuthDataVerifier Code Style Findings
BTA-01C: Ineffectual Usage of Safe Arithmetics
Type | Severity | Location |
---|---|---|
Language Specific | BaseTxAuthDataVerifier.sol:L131 |
Description:
The linked mathematical operation is guaranteed to be performed safely by surrounding conditionals evaluated in either require
checks or if-else
constructs.
Example:
sig-gating-contracts/contracts/sigVerifiers/BaseTxAuthDataVerifier.sol
131uint256 userNonce = nonces[userAddress]++;
Recommendation:
Given that safe arithmetics are toggled on by default in pragma
versions of 0.8.X
, we advise the linked statement to be wrapped in an unchecked
code block thereby optimizing its execution cost.
Alleviation:
The referenced statement has been wrapped in an unchecked
code block as advised, optimizing its gas cost.