SoliDiffy: AST Differencing for Solidity Smart Contracts
Mojtaba Eshghie, Viktor {\AA}ryd, Cyrille Artho, Martin Monperrus

TL;DR
SoliDiffy is a novel AST-based differencing tool for Solidity smart contracts that accurately captures structural changes, outperforming line-based methods in success rate and script brevity, aiding vulnerability detection and repair.
Contribution
It introduces the first AST differencing tool for Solidity, capable of generating sound structural edit scripts that improve over traditional line-based methods.
Findings
Achieved 96.1% diffing success rate on large contract dataset.
Produced significantly shorter and more accurate edit scripts.
Outperformed state-of-the-art line-based differencing methods.
Abstract
Structured code differencing is the act of comparing the hierarchical structure of code via its abstract syntax tree (AST) to capture modifications. AST-based source code differencing enables tasks such as vulnerability detection and automated repair where traditional line-based differencing falls short. We introduce SoliDiffy, the first AST differencing tool for Solidity smart contracts with the ability to generate an edit script that soundly shows the structural differences between two smart-contracts using insert, delete, update, move operations. In our evaluation on 353,262 contract pairs, SoliDiffy achieved a 96.1% diffing success rate, surpassing the state-of-the-art, and produced significantly shorter edit scripts. Additional experiments on 925 real-world commits further confirmed its superiority compared to Git line-based differencing. SoliDiffy provides accurate representations…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsPrivate Equity and Venture Capital · FinTech, Crowdfunding, Digital Finance · Insurance and Financial Risk Management
