2025 · Preprint

Decompiling Smart Contracts with a Large Language Model

Converts Ethereum Virtual Machine bytecode into Solidity in two stages. Static analysis first lifts the bytecode into three-address code with recovered control flow; a Llama-3.2-3B model fine-tuned with LoRA on 238,446 TAC-to-Solidity function pairs then writes each function. On 9,731 held-out functions from verified Ethereum contracts, the authors report average semantic similarity of 0.82 to the original source, with 78.3% of functions above 0.8. An ablation compares the untuned base model on 663 functions, and case studies decompile an unverified Dx Protocol contract and an exploited MEV bot.

Scope and limitations

The 0.82 figure is the paper’s semantic-similarity score, whose computation v1 does not specify. With normalized edit distance and token-frequency comparisons, it measures resemblance to verified source, not behavioral equivalence; v1 reports no compilation, execution or differential tests of the generated Solidity. Training and test functions come from verified contracts, so closed-source deployments appear only in case studies. Comparisons with traditional decompilers are stated in general terms; no head-to-head experiment against a named decompiler such as Elipmoc is reported. The authors show a DeFi staking function whose output lost its fixed-point arithmetic and time-based reward logic (similarity 0.52), and report weaker results on very long functions and on contracts with deep inheritance or nested control flow.

Why it fits this collection

Adds fine-tuned LLM decompilation of EVM bytecode through an explicit three-address-code stage, complementing prompt-based EVM decompilation and the native-code LLM decompilers in this section.

Publication and review details

Venue
arXiv
Status
Preprint
Publication / posting date
June 24, 2025
Date source
arXiv v1 submission date; no later version, journal reference or proceedings publication was found.
First arXiv submission
June 24, 2025
arXiv
2506.19624
Reviewed arXiv version
v1

Reviewed arXiv v1, the only version, which has no comment, journal reference or DOI. Crossref and OpenAlex searches found no peer-reviewed version. The paper says its evaluation dataset and metrics code are publicly available but gives no URL, and it does not name the bytecode-to-TAC analysis it uses; no model weights, training data or code release was found. The project link is the service named in the paper. On 2026-10-20 its landing page described an LLM-based decompiler with pricing and API pages and linked no code or model; the service was not used, and no code or experiments were run.

Sources reviewed

Source review only; experiments were not rerun for this collection. Cite the original authors using the linked paper or BibTeX.

Report an outdated entry Suggest a translation fix

Primary sources

  1. https://arxiv.org/abs/2506.19624v1
  2. https://arxiv.org/pdf/2506.19624v1
  3. https://evmdecompiler.com/