Omniscia Glimpse Audit
GLMS_ETH Static Analysis Findings
GLMS_ETH Static Analysis Findings
GLS-01S: Incomplete Implementation
Type | Severity | Location |
---|---|---|
Logical Fault | Major | GLMS_ETH.sol:L34-L36 |
Description:
The locker
member does not exist within the contract system and is not actively utilized by the project.
Example:
34function setLocker(address _locker) external onlyOwner{35 locker = ILocker(_locker);36}
Recommendation:
We strongly recommend the locker
and ILocker
items to be defined in the codebase and utilized to ensure that the token implements the functionality it is meant to.
Alleviation:
The setLocker
function was safely omitted from the codebase as it was deemed undesirable functionality.
GLS-02S: Illegible Value Literal
Type | Severity | Location |
---|---|---|
Code Style | Informational | GLMS_ETH.sol:L28 |
Description:
The _totalSupply
variable is assigned to a literal value with multiple digits with no discerning character between them.
Example:
24constructor() {25 _name = "Glimpse";26 _symbol = "GLMS";27 _decimals = 18;28 _totalSupply = 360000000 * 10 ** 18;29 _balances[_msgSender()] = _totalSupply;30 31 emit Transfer(address(0), _msgSender(), _totalSupply);32}
Recommendation:
We strongly recommend the underscore (_
) character to be introduced in between units (i.e. 360000000
becomes 360_000_000
) to increase the legibility of the codebase as the underscore character is ignored in numeric declarations by the compiler.
Alleviation:
The number is now depicted with the underscore (_
) separator thus rendering the value legible.
GLS-03S: Variable Shadowing
Type | Severity | Location |
---|---|---|
Language Specific | Informational | GLMS_ETH.sol:L106-L108, L211-L217 |
Description:
The linked functions both declare an owner
input argument whereas a contract-level declaration with the same name exists.
Example:
211function _approve(address owner, address spender, uint256 amount) internal {212 require(owner != address(0), "BEP20: approve from the zero address");213 require(spender != address(0), "BEP20: approve to the zero address");214 215 _allowances[owner][spender] = amount;216 emit Approval(owner, spender, amount);217}
Recommendation:
We strongly advise the arguments to be renamed to avoid variable shadowing occuring.
Alleviation:
The allowance
and _approve
arguments were properly prefixed with an underscore (_
) to prevent the naming colission from occuring.