{"uid":"cap_VR96WTRg5JPnT_wXuivtu","slug":"ethereum-bytecode-similarity-radar-8454ee2e","name":"Ethereum Bytecode Similarity Radar","description":"Compares the runtime bytecode of two Ethereum contracts you name: the share of shared PUSH4 function selectors (Jaccard) and the cosine similarity of their opcode frequencies, combined into one 0 to 1 score with a SIMILAR, PARTIAL or DIFFERENT label. It compares two addresses only; it has no database of known scam or exploit templates, so it cannot say a contract is a known clone.","url":"https://api.fadeandco.workers.dev/api/agent-intel/bytecode-similarity-radar?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["a","b"],"properties":{"a":{"type":"string","description":"First contract address 0x... (40 hex)"},"b":{"type":"string","description":"Second contract address 0x... (40 hex)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"a":"0x6982508145454ce325ddbe47a25d4ec3d2311933","b":"0xdac17f958d2ee523a2206206994597c13d831ec7","note":"Pairwise comparison of two given contracts only. Not a database of known scam templates; a SIMILAR label is a lead for review.","label":"PARTIAL","score":0.559,"bytesA":4517,"bytesB":11075,"source":"https://ethereum-rpc.publicnode.com","checkedAt":"2026-10-23T09:35:17.855Z","selectorsA":25,"selectorsB":36,"opcodeCosine":0.898,"selectorJaccard":0.22,"sharedSelectors":11}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_HTeb6frXxeCl9xbmaJxqy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares the runtime bytecode of two Ethereum contracts by computing Jaccard similarity of PUSH4 function selectors and cosine similarity of opcode frequencies, returning a combined 0–1 score with a SIMILAR, PARTIAL, or DIFFERENT label.","exampleAgentPrompt":"Compare the bytecode of these two Ethereum contracts and tell me how similar they are: 0x6982508145454ce325ddbe47a25d4ec3d2311933 and 0xdac17f958d2ee523a2206206994597c13d831ec7 — give me the score and whether they're SIMILAR, PARTIAL, or DIFFERENT.","exampleUseCases":[{"title":"Clone detection for new token contracts","prompt":"I just found this new token at 0xabc123...def and I want to know if it's a bytecode copy of USDT at 0xdac17f958d2ee523a2206206994597c13d831ec7. Can you compare their bytecodes and tell me the similarity score and label?"},{"title":"DeFi protocol fork investigation","prompt":"Can you check how similar the bytecode is between Uniswap V2 at 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f and this suspicious DEX contract at 0x1111111111111111111111111111111111111111? I need the Jaccard selector score, cosine opcode score, and the overall label."},{"title":"Security audit pre-check","prompt":"Before I audit this contract at 0xdeadbeef...1234, I want to know if it looks like a clone of the contract at 0xcafe...5678 — run a bytecode similarity comparison and let me know if they share most of their function selectors."}],"resultDescription":"Returns a JSON object with: a combined similarity score (0–1), a categorical label (SIMILAR, PARTIAL, or DIFFERENT), the Jaccard similarity of shared PUSH4 function selectors, the cosine similarity of opcode frequency vectors, the number of shared selectors, total selectors per contract, bytecode size in bytes for each contract, the RPC source used, and the timestamp of the check. Also includes a disclaimer that this is a pairwise comparison only, not a match against a scam/exploit template database.","failureModes":["Invalid or malformed Ethereum address (not 40 hex chars after 0x) returns an error","Contract address with no deployed bytecode (EOA or non-existent contract) may return empty bytecode error","RPC node (publicnode.com) unavailable or rate-limited causes a fetch failure","Network timeout if public RPC is slow","Missing required query params `a` or `b` returns a 400-level error"],"whenToPreferThis":"Use this endpoint when you need a fast, on-demand pairwise bytecode similarity check between two specific Ethereum contract addresses and want a quantified score (not just a yes/no). It is ideal for clone detection leads, fork investigation, or pre-audit screening. Prefer this over manual decompilation when speed matters. Note: this endpoint does NOT match against any database of known scam or exploit templates — it only tells you how similar two specific contracts are to each other.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T00:33:49.172Z","isFirstParty":false,"canonicalSlug":"ethereum-bytecode-similarity-radar-8454ee2e"}