The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

The eurUsd state variable is declared but not used in the contract

Summary

The eurUsd state variable is declared but not used in the contract. Unused variables can potentially increase deployment and execution costs.

Vulnerability Details

Code Snippet:

address private immutable eurUsd;

The eurUsd state variable is declared in the LiquidationPool contract but remains unused throughout the contract's code.

Impact

The declaration of the unused eurUsd state variable may lead to increased deployment and execution costs without providing any functionality or benefits to the contract. Unused variables contribute unnecessary complexity to the codebase and could potentially confuse developers reviewing the code.

Tools Used

Manual Code Review

Recommendations

To address the unused state variable in the LiquidationPool contract, the following recommendations are provided:

  1. Remove Unused Variable:

    • Remove the eurUsd state variable if it serves no purpose in the contract. This helps simplify the codebase, reduces unnecessary gas costs, and enhances overall code clarity.

    // Remove the following line
    address private immutable eurUsd;

Removing the unused eurUsd state variable, the LiquidationPool contract can streamline its codebase and improve gas efficiency during deployment and execution.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

informational/invalid

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.