Function Selector Collision Database Checker
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Function Selector Collision Database Checker is a read-only security tool that analyzes EVM smart contract bytecode to extract function selectors and cross-references them against a comprehensive database of known function signatures. It identifies which selectors are recognized from common standards (ERC20, ERC721, OpenZeppelin, Uniswap, etc.) and flags unknown selectors that may indicate custom functions, proxy patterns, or potential collision risks. The tool also detects internal selector collisions within the same contract where two functions share the same 4-byte identifier, which can cause ambiguous dispatch and unexpected behavior. It helps developers, auditors, and security researchers quickly assess the function footprint of a contract, identify suspicious or unexpected selectors, and understand the contract's interface composition.
HOW TO USE
Connect your EVM-compatible wallet via the BGWallet bridge and select the network where your contract is deployed. Enter the contract address and click "Check for Collisions". The tool fetches the bytecode, scans for PUSH4 opcodes (0x63) to extract all function selectors, and compares each selector against a built-in database of over 30 common function signatures. Results include a summary of total selectors found, count of known vs. unknown selectors, a detailed list of recognized functions with their names, a list of unknown selectors, and a critical alert if internal selector collisions are detected. All analysis is read-only—no signatures or transactions are submitted.
TECHNICAL MECHANISM
The tool uses ethers.js v5.7.2 to fetch contract bytecode via provider.getCode(address), then performs static bytecode analysis using opcode pattern recognition. It scans the bytecode hex string for the PUSH4 opcode (0x63), which indicates a 4-byte function selector is being pushed onto the stack. The 8 hex characters following the 0x63 opcode are extracted as the selector. Duplicate selectors are deduplicated to generate a unique set of functions exposed by the contract. Each selector is then looked up in a built-in database of common EVM function signatures, which includes standards like ERC20 (transfer, approve, balanceOf, totalSupply, allowance, transferFrom), ERC721 (ownerOf, tokenURI, safeTransferFrom, approve, getApproved, isApprovedForAll), OpenZeppelin ownership (owner, renounceOwnership, transferOwnership), and DeFi functions (mint, burn, deposit, withdraw, stake, unstake, claim, swap, addLiquidity, removeLiquidity, pause, unpause, upgradeTo, initialize, and more). The tool also checks for internal collisions by identifying duplicate selectors within the extracted set—a rare but critical issue where two functions in the same contract share the same 4-byte identifier. The analysis is purely static, deterministic, and does not require source code verification.
WHAT IT CANNOT SEE
This tool has fundamental limitations that users must understand. It cannot detect collisions with functions not in the database—the tool only compares against its curated list of common signatures, so custom functions or less common standards will appear as unknown selectors. It cannot analyze functions that are dynamically dispatched via fallback or receive functions, as these do not have explicit selectors in the bytecode. It cannot predict future collisions with as-yet-unregistered signatures—new standards or custom functions may collide with existing selectors in ways the database does not cover. It cannot verify whether a detected collision is exploitable without understanding contract logic and access controls—a selector collision may be harmless if the functions are never called, or critical if they handle sensitive operations. It cannot detect collisions in libraries or inherited contracts that are not directly deployed. It cannot analyze proxies where the implementation bytecode is not in the same address. It cannot determine if unknown selectors are malicious or benign—only that they are not in the database. The tool's database is static and may be outdated; developers should maintain their own databases for comprehensive coverage.
PLEASE NOTE
This tool only supports EVM-compatible blockchains (Ethereum, Polygon, BSC, Avalanche C-Chain, Optimism, Arbitrum, and their testnets). Solana, Tron, Starknet, SUI, TON, Aptos, Bitcoin, Cosmos, and XRP are not supported. The tool is free, open-source, requires no API keys, and uses the wallet's native provider for all read operations. Unknown selectors are not necessarily dangerous—they may simply be custom or newly deployed functions not yet added to the database. Always review unknown selectors in the context of the contract's source code and documentation.