Omniscia Echidna Finance Audit

MerkleDistributor Code Style Findings

MerkleDistributor Code Style Findings

MDR-01C: Inexistent Error Message

TypeSeverityLocation
Code StyleInformationalMerkleDistributor.sol:L115

Description:

The linked require check has no error message explicitly defined.

Example:

contracts/airdrop/MerkleDistributor.sol
115require(block.timestamp <= vestingUntil);

Recommendation:

We advise one to be set so to aid in the validation of the require's condition as well as the legibility of the codebase.

Alleviation:

An error message was properly defined for the linked statement.

MDR-02C: Redundant Contract Variable

TypeSeverityLocation
Gas OptimizationInformationalMerkleDistributor.sol:L19, L46

Description:

The linked variable remains unutilized in the code.

Example:

contracts/airdrop/MerkleDistributor.sol
19address public rewardPool;

Recommendation:

We advise it to be safely omitted.

Alleviation:

The variable was safely omitted from the codebase.

MDR-03C: Variable Mutability Specifiers

TypeSeverityLocation
Gas OptimizationInformationalMerkleDistributor.sol:L18, L20-L22, L42-L45

Description:

The linked variables are assigned to only once during the contract's constructor.

Example:

contracts/airdrop/MerkleDistributor.sol
37constructor(
38 address token_,
39 uint256 total_,
40 bytes32 merkleRoot_
41) {
42 vestingStart = block.timestamp;
43 vestingUntil = block.timestamp + VESTING;
44 token = token_;
45 merkleRoot = merkleRoot_;
46 rewardPool = address(0);
47 totalLeft = total_;
48}

Recommendation:

We advise them to be set as immutable greatly optimizing the codebase.

Alleviation:

All referenced variables were properly set as immutable.