code-423n4 / 2022-01-behodler-findings

1 stars 0 forks source link

Unused imports #2

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

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 :) :

    WithdrawERC20Proposal.sol, line 2, import "../ProposalFactory.sol";
    FlanBackstop.sol, line 5, import "./ERC677/ERC20Burnable.sol";
    Limbo.sol, line 3, import "@openzeppelin/contracts/access/Ownable.sol";
    FlanBackstop.sol, line 7, import "hardhat/console.sol";
    Limbo.sol, line 6, // import "hardhat/console.sol";
    BurnFlashStakeDeposit.sol, line 2, import "../ProposalFactory.sol";
    FlashGovernanceArbiter.sol, line 3, import "hardhat/console.sol";
    SetAssetApprovalProposal.sol, line 2, import "../ProposalFactory.sol";
    Limbo.sol, line 7, import "./facades/LimboDAOLike.sol";
    LimboDAO.sol, line 7, import "../facades/SwapFactoryLike.sol";
    Limbo.sol, line 11, import "./facades/UniPairLike.sol";
    Governable.sol, line 2, import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
    Limbo.sol, line 12, import "./facades/MigratorLike.sol";
    UpdateMultipleSoulConfigProposal.sol, line 2, import "../ProposalFactory.sol";
gititGoro commented 2 years ago

The proposals do not compile if I remove ProposalFactory.sol. They require the Proposal abstract contract.