Do you still need a manual smart contract audit?

AI-generated keywords: LLMs Security Audits DeFi Smart Contracts False Positive Rate Mutation Testing

AI-generated Key Points

The license of the paper does not allow us to build upon its content and the key points are generated using the paper metadata rather than the full article.

  • Isaac David, Liyi Zhou, Kaihua Qin, Dawn Song, Lorenzo Cavallaro, and Arthur Gervais investigate the feasibility of using large language models (LLMs) for security audits of smart contracts.
  • The researchers evaluate the performance and accuracy of LLMs using a benchmark dataset of 52 compromised DeFi smart contracts.
  • GPT-4 and Claude models correctly identify vulnerability types in 40% of cases but have a high false positive rate.
  • LLMs outperform a random model by 20% in terms of F1-score.
  • Mutation testing on five newly developed secure smart contracts reveals a best-case true positive rate of 78.7% for the GPT-4-32k model.
  • The models are evaluated using binary classification tasks and non-binary prompts, considering model temperature variations and context length.
  • Manual auditors' involvement remains crucial due to the high false positive rate exhibited by LLMs.
  • This research lays the groundwork for a more efficient and cost-effective approach to conducting smart contract security audits.
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Isaac David, Liyi Zhou, Kaihua Qin, Dawn Song, Lorenzo Cavallaro, Arthur Gervais

License: CC BY-NC-ND 4.0

Abstract: We investigate the feasibility of employing large language models (LLMs) for conducting the security audit of smart contracts, a traditionally time-consuming and costly process. Our research focuses on the optimization of prompt engineering for enhanced security analysis, and we evaluate the performance and accuracy of LLMs using a benchmark dataset comprising 52 Decentralized Finance (DeFi) smart contracts that have previously been compromised. Our findings reveal that, when applied to vulnerable contracts, both GPT-4 and Claude models correctly identify the vulnerability type in 40% of the cases. However, these models also demonstrate a high false positive rate, necessitating continued involvement from manual auditors. The LLMs tested outperform a random model by 20% in terms of F1-score. To ensure the integrity of our study, we conduct mutation testing on five newly developed and ostensibly secure smart contracts, into which we manually insert two and 15 vulnerabilities each. This testing yielded a remarkable best-case 78.7% true positive rate for the GPT-4-32k model. We tested both, asking the models to perform a binary classification on whether a contract is vulnerable, and a non-binary prompt. We also examined the influence of model temperature variations and context length on the LLM's performance. Despite the potential for many further enhancements, this work lays the groundwork for a more efficient and economical approach to smart contract security audits.

Submitted to arXiv on 21 Jun. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

The license of the paper does not allow us to build upon its content and the AI assistant only knows about the paper metadata rather than the full article.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2306.12338v1

This paper's license doesn't allow us to build upon its content and the summarizing process is here made with the paper's metadata rather than the article.

In their research, Isaac David, Liyi Zhou, Kaihua Qin, Dawn Song, Lorenzo Cavallaro and Arthur Gervais investigate the feasibility of using large language models (LLMs) for conducting security audits of smart contracts. They aim to optimize prompt engineering for enhanced security analysis and evaluate the performance and accuracy of LLMs using a benchmark dataset consisting of 52 previously compromised Decentralized Finance (DeFi) smart contracts. The researchers find that when vulnerable contracts are analyzed, both the GPT-4 and Claude models correctly identify the vulnerability type in 40% of cases. However, these models also exhibit a high false positive rate, indicating the need for continued involvement from manual auditors. Despite this limitation, the LLMs tested outperform a random model by 20% in terms of F1-score. To ensure the integrity of their study, mutation testing is conducted on five newly developed supposedly secure smart contracts. The researchers manually insert two and 15 vulnerabilities into each contract. This testing reveals an impressive best-case true positive rate of 78.7% for the GPT-4-32k model. The models are evaluated using both binary classification tasks to determine contract vulnerability and non-binary prompts as well as examining the influence of model temperature variations and context length on LLM performance. Overall, this research highlights the potential benefits of employing LLMs in security audits but emphasizes that manual auditors' involvement remains crucial due to the high false positive rate exhibited by these models. Although there is room for further enhancements, this work lays the groundwork for a more efficient and cost-effective approach to conducting smart contract security audits.
Created on 02 Jul. 2023

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

The license of this specific paper does not allow us to build upon its content and the summarizing tools will be run using the paper metadata rather than the full article. However, it still does a good job, and you can also try our tools on papers with more open licenses.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.