code-423n4 / 2021-12-defiprotocol-findings

0 stars 0 forks source link

Useless imports #113

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

Jujic

Vulnerability details

Impact

contract Basket does not need to import:

import "hardhat/console.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

Proof of Concept

https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Basket.sol#L6

https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Basket.sol#L11

Tools Used

REmix

Recommended Mitigation Steps

Consider reviewing all the unused imports and removing them to reduce the size of the contract and thus save some deployment gas.