Function Selector Collisions

Architecture

Ethereum virtual machine smart contracts utilize a four-byte identifier derived from the Keccak-256 hash of a function signature to route incoming calls to specific logic gates. When two distinct function signatures yield an identical four-byte prefix, the compiler encounters a selector collision. This structural ambiguity forces the execution environment to prioritize the first defined function within the bytecode, rendering the second unreachable and potentially compromising contract integrity.