Token-0x

First Flight #54
Beginner FriendlyDeFi
100 EXP
View results
Submission Details
Impact: high
Likelihood: high
Invalid

# Missing IERC20 Interface in `ERC20.sol` contract

Missing IERC20 Interface in ERC20.sol contract

Description

The contract does not import nor implement the standard IERC20 interface. It manually defines the ERC20 functions but does NOT declare:

contract ERC20 is IERC20
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {ERC20Internals} from "./helpers/ERC20Internals.sol";
import {IERC20Errors} from "./helpers/IERC20Errors.sol";
@> No import here for "IERC20.sol"
@> contract ERC20 is IERC20Errors, ERC20Internals {

Risk

Likelihood:

  • Tools cannot detect that the contract is ERC20-compliant

  • Other contracts expecting a standard interface may fail

  • ABI-level compatibility issues may occur

Impact:

  • Not formally compliant with ERC20 despite exposing the functions. Integrations may break because systems expect an explicit IERC20 inheritance.

Recommended Mitigation

Add to ensure system works correctly.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {ERC20Internals} from "./helpers/ERC20Internals.sol";
import {IERC20Errors} from "./helpers/IERC20Errors.sol";
+ import {IERC20} from "./IERC20.sol";
- contract ERC20 is IERC20Errors, ERC20Internals {}
+ contract ERC20 is IERC20, IERC20Errors, ERC20Internals {}
Updates

Lead Judging Commences

gaurangbrdv Lead Judge 19 days ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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

Give us feedback!