Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused imports #157

Open
code423n4 opened this issue Nov 30, 2021 · 1 comment
Open

Unused imports #157

code423n4 opened this issue Nov 30, 2021 · 1 comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")

Comments

@code423n4
Copy link
Contributor

Handle

robee

Vulnerability details

In the following files, there are contract imports that aren't used.
Import of unnecessary files costs deployment gas (and is a bad coding practice that is important to ignore).
The following is a full list of all unused imports, we went through the whole code to find it :) :

    AuctionBurnReserveSkew.sol, line 4, import "@openzeppelin/contracts/access/AccessControl.sol";
    AuctionParticipant.sol, line 2, import "@openzeppelin/contracts/math/SafeMath.sol";
    AuctionParticipant.sol, line 3, import "@openzeppelin/upgrades/contracts/Initializable.sol";
    AuctionPool.sol, line 9, import "./interfaces/IAuction.sol";
    AuctionPool.sol, line 10, import "./interfaces/IBurnMintableERC20.sol";
    AuctionPool.sol, line 11, import "./interfaces/IDexHandler.sol";
    Bonding.sol, line 2, import "@openzeppelin/contracts/math/SafeMath.sol";
    ERC20VestedMine.sol, line 2, import "@openzeppelin/contracts/math/SafeMath.sol";
    ImpliedCollateralService.sol, line 12, import "./interfaces/IRewardThrottle.sol";
    LiquidityExtension.sol, line 2, import "@openzeppelin/contracts/math/SafeMath.sol";
    LiquidityExtension.sol, line 3, import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
    MaltDataLab.sol, line 7, import "./interfaces/IStabilizerNode.sol";
    MaltDataLab.sol, line 9, import "./interfaces/IDAO.sol";
    MiningService.sol, line 2, import "@openzeppelin/contracts/math/SafeMath.sol";
    MiningService.sol, line 3, import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
    PoolTransferVerification.sol, line 2, import "@openzeppelin/contracts/math/SafeMath.sol";
    PoolTransferVerification.sol, line 6, import "./Permissions.sol";
    RewardDistributor.sol, line 2, import "@openzeppelin/contracts/math/SafeMath.sol";
    RewardDistributor.sol, line 11, import "hardhat/console.sol";
    RewardOverflowPool.sol, line 2, import "@openzeppelin/contracts/math/SafeMath.sol";
    RewardThrottle.sol, line 2, import "@openzeppelin/contracts/math/SafeMath.sol";
    RewardThrottle.sol, line 13, import "hardhat/console.sol";
    SwingTrader.sol, line 8, import "./interfaces/IAuction.sol";
    TransferService.sol, line 4, import "./interfaces/IMaltDataLab.sol";
@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Nov 30, 2021
code423n4 added a commit that referenced this issue Nov 30, 2021
@0xScotch 0xScotch added the sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") label Dec 9, 2021
This was referenced Dec 9, 2021
@GalloDaSballo
Copy link
Collaborator

Finding is valid, unused imports do not save gas though, changing to non-critical

@GalloDaSballo GalloDaSballo added 0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation and removed G (Gas Optimization) labels Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

No branches or pull requests

3 participants