Omniscia Qanx Token Audit
ERC20 Static Analysis Findings
ERC20 Static Analysis Findings
ERC-01S: Unused Code
Type | Severity | Location |
---|---|---|
Gas Optimization | ERC20.sol:L282-L298 |
Description:
The referenced function remains unutilized in the codebase.
Example:
contracts/ERC20.sol
282function _burn(address account, uint256 amount) internal virtual {283 require(account != address(0), "ERC20: burn from the zero address");284
285 _beforeTokenTransfer(account, address(0), amount);286
287 uint256 accountBalance = _balances[account];288 require(accountBalance >= amount, "ERC20: burn amount exceeds balance");289 unchecked {290 _balances[account] = accountBalance - amount;291 // Overflow not possible: amount <= accountBalance <= totalSupply.292 _totalSupply -= amount;293 }294
295 emit Transfer(account, address(0), amount);296
297 _afterTokenTransfer(account, address(0), amount);298}
Recommendation:
We advise it to be safely omitted from it, optimizing its deployment cost.
Alleviation:
The Qanx team stated that they wish to retain the current implementation in the codebase to maintain a one-to-one relation with the original code of OpenZeppelin and to avoid touching sensitive dependencies. As the hash of the file will change if the code is removed and Qanx wishes to retain its dependencies intact, we consider this exhibit nullified.