Omniscia DUA Audit

ETH_DUAToken Static Analysis Findings

ETH_DUAToken Static Analysis Findings

ETH-01S: Inexistent Event Emissions

TypeSeverityLocation
Language SpecificETH_DUAToken.sol:L188-L194, L200-L202, L208-L210, L215-L217, L222-L224, L229-L231

Description:

The linked functions adjust sensitive contract variables yet do not emit an event for it.

Example:

contracts/ETH_DUAToken.sol
200function selfDestructPause() public onlyRole(ADMIN_ROLE) {
201 _destructPause = true;
202}

Recommendation:

We advise an event to be declared and correspondingly emitted for each function to ensure off-chain processes can properly react to this system adjustment.

Alleviation:

Event emissions have been introduced throughout all referenced statements via the SelfDestructed event which accepts a textual argument to indicate which feature of the asset was self-destructed.

ETH-02S: Redundant Variable Assignments

TypeSeverityLocation
Gas OptimizationETH_DUAToken.sol:L49, L50, L51, L52, L53

Description:

The linked variables are assigned to redundantly to the default value of each relevant data type (i.e. uint256 assigned to 0, address assigned to address(0) etc.).

Example:

contracts/ETH_DUAToken.sol
49_destructPause = false;

Recommendation:

We advise the assignments to be safely omitted optimizing the codebase.

Alleviation:

All referenced redundant default-value assignments have been safely omitted from the codebase as advised.