0

ERC-165 defines a function "supportsInterface" which takes a bytes4 interface ID and returns true or false based on whether the implementing contract conforms to the interface related to that ID. This is intended to allow contracts to determine if other (target) contracts conform to an interface and defines related functionality for something like ERC-721.

But since the target is responsible for defining supportsInterface, can't the target return true for any interface ID it wants? What is the target is not ERC-20 but it claims to be? Couldn't this cause major issues for the contract that expects it to conform to specific behaviors, potentially preventing it from working entirely?

1 Answers1

1

You are responsible for the external calls. EIP-165 is not a security provider proposal. It is just a way to ask "dude, do you have this function?". Of course, they can lie to you. Because of this external calls are should be taken seriously. Best practice for this: only call the contracts you've created.

Fatih Furkan
  • 965
  • 4
  • 18