Token-0x

First Flight #54
Beginner FriendlyDeFi
100 EXP
Submission Details
Impact: low
Likelihood: medium

`ERC20` Contract Does Not Formally Implement `IERC20` Interface

Author Revealed upon completion

Root + Impact

The ERC20 contract has all required ERC20 functions but does not formally inherit from the IERC20 interface, potentially causing interface compatibility issues.

Description

  • While IERC20.sol exists in the codebase, the main ERC20 contract does not inherit from it.

  • This means type checking at compile time and runtime interface checks may fail.

contract ERC20 is IERC20Errors, ERC20Internals {
........................
}

Risk

Likelihood:

  • Any contract checking interface compatibility will be affected

  • Common in DeFi protocol integrations

Impact:

  • Contracts using interface type casting may fail

  • Some protocols may reject this token

Recommended Mitigation

+ import {IERC20} from "./IERC20.sol";
- contract ERC20 is IERC20Errors, ERC20Internals {
+ contract ERC20 is IERC20, IERC20Errors, ERC20Internals {

Support

FAQs

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

Give us feedback!