# 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.

- Authors: Isaac David; Liyi Zhou; Dawn Song; Arthur Gervais; Kaihua Qin
- 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
- Sources reviewed: 2026-10-20
- Added to the catalog: 2026-11-02
- Original paper: <https://arxiv.org/abs/2506.19624>
- PDF: <https://arxiv.org/pdf/2506.19624v1>
- Project: <https://evmdecompiler.com/>
- BibTeX: <https://awesomerea.org/papers/citations/paper-llm-evm-decompiler.bib>
- Catalog page: <https://awesomerea.org/papers/paper-llm-evm-decompiler/>
- Record JSON: <https://awesomerea.org/papers/paper-llm-evm-decompiler/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/papers/paper-llm-evm-decompiler/index.md)

## 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 notes

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.

## Primary sources

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

## About this entry

Reviewed against the paper and its primary sources. Cite the original authors using the linked paper or BibTeX.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
