From EVM bytecode to Solidity and back to bytecode
summary
An LLM-assisted decompiler is built that translates EVM bytecode to Solidity which recompiles to byte-identical bytecode using round-tripping as the correctness check. It detects Solidity version from bytecode, recovers function names via Sourcify or brute-force selector guessing, and uses an LLM pass to produce readable names and diagrams. The tool has decompiled about 500 contracts perfectly so far, speeds and costs beat full-LLM runs, and surfaces LLM pitfalls like reward-hacking and runaway test generation.
AI-written summary · about
