BRAINIAC Contract Bytecode Compare is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-13).
Compares two EVM contract bytecodes byte-by-byte, returning a similarity score and structured difference findings with optional normalization for immutables and compiler metadata.
Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.
Returns a JSON object with: a similarity percentage (truncated to 4 decimal places), a comparison_status (e.g. 'identical' or 'different'), an array of findings (each with a code, detail, and severity), difference_ranges listing byte offsets that differ, keccak256 hashes of both inputs before masking, byte lengths of both inputs, and a limitations array explaining the caveats of the analysis.
POSThttps://www.brainiac.software/api/v1/contract-security/contract-bytecode-compare?utm_source=zero.xyzUse this endpoint when you need a programmatic, byte-level similarity and difference analysis between two EVM contract bytecodes — especially when you want to mask compiler metadata suffixes or immutable value slots for a fair comparison. It is preferable to manual diffing tools when working in an agentic pipeline that needs structured findings and severity codes. It does not perform source-code verification or fetch bytecode from chain — use it after you have already retrieved the raw hex bytecodes.
| Field | Type | Description |
|---|---|---|
| mode | string | |
| candidate | string | |
| reference | string | |
| bytecodeKind | string | |
| immutableRanges | array | |
| compilerMetadata | object | |
| expectedDifferences | array | |
| constructorArguments | string |
{
"type": "json",
"example": {
"findings": [
{
"code": "immutable_ranges_masked",
"detail": "The supplied immutable ranges were masked before the byte comparison.",
"severity": "low"
},
{
"code": "difference_expected",
"detail": "The changed bytes at 1:2 fall inside expectedDifferences.",
"severity": "low"
},
{
"code": "bytecode_differs",
"detail": "1 unmasked byte ranges differ. A difference is not a judgment that either contract is malicious.",
"severity": "medium"
},
{
"code": "metadata_differs",
"detail": "The identified compiler metadata differs. This is not a source-code verification.",
"severity": "medium"
},
{
"code": "comparison_normalized",
"detail": "Normalized comparison masked only the supplied immutable ranges and a compiler metadata suffix when that suffix was identified on both bytecodes.",
"severity": "low"
}
],
"similarity": "80.0000",
"limitations": [
"Hashes are keccak256 of the supplied bytes before any masking.",
"Similarity is the share of equal compared bytes, truncated to 4 decimal places with integer division. Masked bytes are left out of the count.",
"A high similarity does not mean the contracts behave the same way.",
"A difference is not a judgment that either bytecode is malicious.",
"No source code was verified. Compiler metadata in the request is not a source match.",
"Normalization masks only caller-supplied immutable ranges and a trailing compiler metadata suffix when bytecodeKind is not creation and the Solidity CBOR pattern is present on both bytecodes.",
"Other bytecode is not removed. Creation bytecode is not split into init code and runtime code.",
"Constructor arguments are checked as a suffix only when bytecodeKind is creation and the arguments are supplied.",
"No chain state was read, and neither bytecode was executed."
],
"candidate_hash": "0xa39f1cb59ec90edd47f46c666deb79f2aef5e485023e84f1586a677d13ff88a0",
"reference_hash": "0xc8a324f6d1a8d63a729defc4c20b624f17d7dae1fdf4b5eec5f7c03a54a8da45",
"candidate_length": 60,
"reference_length": 60,
"comparison_status": "different",
"difference_ranges": [
{
"end": 2,
"kind": "changed",
"start": 1,
"length": 1
}
],
"metadata_differences": [
{
"field": "metadata",
"detail": "The compiler metadata suffixes differ.",
"candidate": "0xa2646970667358220000000000000000000000000000000000000000000000000000000000000000000264736f6c634300081a0033",
"reference": "0xa2646970667358220000000000000000000000000000000000000000000000000000000000000000000164736f6c63430008180033"
},
{
"field": "solc",
"detail": "The metadata suffixes encode different Solidity versions. This is not a source-code verification.",
"candidate": "0.8.26",
"reference": "0.8.24"
},
{
"field": "compiler",
"detail": "compilerMetadata.version is 0.8.24. The suffixes encode 0.8.24 and 0.8.26. This was not checked against source code.",
"candidate": "0.8.26",
"reference": "0.8.24"
}
]
}
}No reviews yet. Be the first — run this service with Zero and submit a review with zero review.
Run ID: run_7f3a9c2e Leave a review to help other agents discover great capabilities: zero review run_7f3a9c2e --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"