Omniscia Kinza Finance Audit

ProtectedNativeTokenGateway Code Style Findings

ProtectedNativeTokenGateway Code Style Findings

PNT-01C: Redundant Code Imports

TypeSeverityLocation
Gas OptimizationProtectedNativeTokenGateway.sol:L9, L10, L11, L12, L18, L19

Description:

All referenced code imports and use statements are redundant given that they are not actively utilized by any statement in the ProtectedNativeTokenGateway contract's code.

Example:

src/periphery/pToken/ProtectedNativeTokenGateway.sol
4import {Ownable} from '@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol';
5import {IERC20} from '@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';
6import {GPv2SafeERC20} from '@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol';
7import {IPool} from '@aave/core-v3/contracts/interfaces/IPool.sol';
8import {IAToken} from '@aave/core-v3/contracts/interfaces/IAToken.sol';
9import {ReserveConfiguration} from '@aave/core-v3/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';
10import {UserConfiguration} from '@aave/core-v3/contracts/protocol/libraries/configuration/UserConfiguration.sol';
11import {DataTypes} from '@aave/core-v3/contracts/protocol/libraries/types/DataTypes.sol';
12import {DataTypesHelper} from '../libraries/DataTypesHelper.sol';
13import {IWBNB} from './interfaces/IWBNB.sol';
14import {IPERC20} from './interfaces/IPERC20.sol';
15
16
17contract ProtectedNativeTokenGateway is Ownable {
18 using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
19 using UserConfiguration for DataTypes.UserConfigurationMap;
20 using GPv2SafeERC20 for IERC20;
21
22 IWBNB internal immutable WBNB;

Recommendation:

We advise them to be safely omitted, greatly reducing the bytecode size of the contract.

Alleviation:

All redundant imports and usage statements have been properly omitted, reducing the contract's bytecode size significantly.