AI
New Benchmark Exposes Limits of AI-Powered Smart Contract Decompilers
SCDBench, a rigorous evaluation framework, reveals that even the most advanced language models struggle to recover semantically accurate source code from blockchain bytecode.
Recovering source code from compiled smart contracts is a critical challenge for blockchain security and auditing, but evaluating how well decompilers perform the task has proven surprisingly difficult. Researchers have now introduced SCDBench, a comprehensive dataset and methodology designed to rigorously test LLM-based decompilers—with sobering findings about current capabilities.
The Problem with Current Evaluation#
Existing approaches to assessing smart contract decompilers suffer from fragmented, incomplete methods. Prior work relied on narrow datasets, inconsistent success metrics, and weak semantic validation. This matters increasingly as language models become sophisticated enough to generate Solidity code that looks correct and even compiles—yet may behave entirely differently from the original contract. Without robust evaluation, distinguishing between plausible-seeming but broken decompilation and genuine recovery of function becomes nearly impossible.
What SCDBench Measures#
The benchmark evaluates decompiler outputs through a staged hierarchy of increasingly strict criteria. First, it checks whether the output achieves basic format completeness. Second, it verifies compilability—whether the generated code actually compiles without errors. Third, it validates Application Binary Interface (ABI) recovery, ensuring the contract's interface matches the original. Finally, it performs semantic consistency checks using differential replay, the most stringent test: running both the original bytecode and decompiled source code through the same transactions and confirming identical results.
The dataset itself contains 600 real-world Solidity contracts, each paired with bytecode, ground-truth source code, and replayable semantic checkpoints to enable reproducible testing.
How Frontier Models Performed#
Researchers evaluated three leading LLMs—Claude Opus 4.7, GPT-5.3-Codex, and GLM-5—under a zero-shot decompilation regime. They also tested variants of GLM-5 with extended reasoning and applied a zero-shot compilation-repair approach where the same model attempted to fix its own failed compilations.
The results underscore the gap between apparent competence and correctness: across the dataset, even the best-performing model achieved perfect semantic consistency on only (7%). While frontier LLMs proved capable of generating syntactically structured, compilable Solidity, maintaining semantic fidelity—the ability to produce code that actually performs the same operations as the original—remains a far-from-solved problem.

