Combining Fine-Tuning and LLM-based Agents for Intuitive Smart Contract Auditing with Justifications
Wei Ma, Daoyuan Wu, Yuqiang Sun, Tianwen Wang, Shangqing Liu, Jian, Zhang, Yue Xue, and Yang Liu

TL;DR
This paper introduces iAudit, a novel framework combining fine-tuning and LLM-based agents to improve smart contract auditing accuracy and justification quality, outperforming existing models.
Contribution
iAudit integrates a two-stage fine-tuning process with LLM-based agents for more accurate and intuitive smart contract vulnerability detection and explanation.
Findings
iAudit achieves over 91% F1 score and accuracy on real smart contract vulnerabilities.
The framework outperforms traditional fine-tuned models and prompt-based LLMs.
Generated causes have about 38% consistency with ground truth causes.
Abstract
Smart contracts are decentralized applications built atop blockchains like Ethereum. Recent research has shown that large language models (LLMs) have potential in auditing smart contracts, but the state-of-the-art indicates that even GPT-4 can achieve only 30% precision (when both decision and justification are correct). This is likely because off-the-shelf LLMs were primarily pre-trained on a general text/code corpus and not fine-tuned on the specific domain of Solidity smart contract auditing. In this paper, we propose iAudit, a general framework that combines fine-tuning and LLM-based agents for intuitive smart contract auditing with justifications. Specifically, iAudit is inspired by the observation that expert human auditors first perceive what could be wrong and then perform a detailed analysis of the code to identify the cause. As such, iAudit employs a two-stage fine-tuning…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBlockchain Technology Applications and Security · Insurance and Financial Risk Management · FinTech, Crowdfunding, Digital Finance
