Do you still need a manual smart contract audit?

06/21/2023
by   Isaac David, et al.
0

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

READ FULL TEXT

page 14

page 15

page 16

page 17

page 18

page 19

page 20

page 21

research
03/06/2023

Metamorphic Testing for Smart Contract Vulnerabilities Detection

Despite the rapid growth of smart contracts, they are suffering numerous...
research
07/18/2023

CONTRACTFIX: A Framework for Automatically Fixing Vulnerabilities in Smart Contracts

The increased adoption of smart contracts in many industries has made th...
research
12/18/2018

Detecting Standard Violation Errors in Smart Contracts

We present Aloes, a new technique and system for automatically detecting...
research
09/11/2023

When ChatGPT Meets Smart Contract Vulnerability Detection: How Far Are We?

With the development of blockchain technology, smart contracts have beco...
research
04/21/2023

Smart Learning to Find Dumb Contracts

We introduce Deep Learning Vulnerability Analyzer (DLVA), a vulnerabilit...
research
01/13/2020

Formal specification of a security framework for smart contracts

As smart contracts are growing in size and complexity, it becomes harder...

Please sign up or login with your details

Forgot password? Click here to reset