Omniscia Box Fun Audit
Unboxed Static Analysis Findings
Unboxed Static Analysis Findings
UDE-01S: Inexistent Event Emission
| Type | Severity | Location |
|---|---|---|
| Language Specific | ![]() | Unboxed.sol:L35 |
Description:
The linked function adjusts a sensitive contract variable yet does not emit an event for it.
Example:
32function mint(address _to, uint256 _tokenId, bool _isGold) external {33 require(msg.sender == unboxer, "Invalid caller");34
35 isGold[_tokenId] = _isGold;36
37 _safeMint(_to, _tokenId);38}Recommendation:
We advise an event to be declared and correspondingly emitted to ensure off-chain processes can properly react to this system adjustment.
Alleviation:
The GoldStatusSet event was introduced to the codebase and is correspondingly emitted in the Unboxed::mint function, addressing this exhibit in full.
UDE-02S: Inexistent Sanitization of Input Address
| Type | Severity | Location |
|---|---|---|
| Input Sanitization | ![]() | Unboxed.sol:L49-L53 |
Description:
The linked function accepts an address argument yet does not properly sanitize it.
Impact:
The presence of zero-value addresses, especially in constructor implementations, can cause the contract to be permanently inoperable. These checks are advised as zero-value inputs are a common side-effect of off-chain software related bugs.
Example:
49function setUnboxer(address _unboxer) external onlyRole(DEFAULT_ADMIN_ROLE) {50 require(unboxer == address(0), "Unboxer already set");51
52 unboxer = _unboxer;53}Recommendation:
We advise some basic sanitization to be put in place by ensuring that the address specified is non-zero.
Alleviation:
The input _unboxer address argument of the Unboxed::setUnboxer function is adequately sanitized as non-zero in the latest in-scope revision of the codebase, addressing this exhibit.
