DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Some state variables in `FjordAuction.sol` are not set as immutable, leading to higher gas consumption

Summary

In the FjordAuction.sol, state variables FjordAuction::fjordPoints, FjordAuction::auctionToken, FjordAuction::owner, FjordAuction::auctionEndTime, and FjordAuction::totalTokens, are updated only once in the constructor but haven't been set as immutable.

Vulnerability Details

/// @notice The FjordPoints token contract.
@> ERC20Burnable public fjordPoints;
/// @notice The auction token contract, which will be distributed to bidders.
@> IERC20 public auctionToken;
/// @notice The owner of the auction contract.
@> address public owner;
/// @notice The timestamp when the auction ends.
@> uint256 public auctionEndTime;
/// @notice The total number of tokens available for distribution in the auction.
@> uint256 public totalTokens;

Impact

Contract Consumes more gas, Therefore wasting Gas.

Tools Used

Manual Review

Recommendations

Make em'all immutable

- ERC20Burnable public fjordPoints;
+ ERC20Burnable public immutable fjordPoints;
- IERC20 public auctionToken;
+ IERC20 public immutable auctionToken;
- address public owner;
+ address public immutable owner;
- uint256 public auctionEndTime;
+ uint256 public immutable auctionEndTime;
- uint256 public totalTokens;
+ uint256 public immutable totalTokens;
Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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