Leveraging Chatgpt for Automated Smart Contract Repair: A Preliminary Exploration of Gpt-3-Based Approaches

计算机科学 系统工程 建筑工程 工程类
作者
Giacomo Ibba,Marco Ortu,Roberto Tonelli,Giuseppe Destefanis
标识
DOI:10.2139/ssrn.4474678
摘要

Context: Ethereum smart contracts are self-executing programs that enable trustless transactions between parties, with applications in digital document management, secure storage and transfer of cryptocurrencies, and non-fungible token (NFT) management. Ensuring the security and robustness of these smart contracts is crucial to avoid significant financial and privacy losses due to bugs or honeypots.Objectives: This work aims to develop a novel approach for automatically repairing Solidity smart contracts and demonstrate the feasibility of detecting and fixing vulnerabilities using a state-of-the-art language model.Methods: We utilize ChatGPT, a large-scale language model, to automatically repair Solidity smart contracts by training it through prompt engineering techniques, tailoring its capabilities to detect and fix vulnerabilities in the code.Results: Our ChatGPT-based approach successfully repairs vulnerable Solidity smart contracts, showcasing its potential as a valuable tool for improving the security and robustness of these programs in various use cases, ultimately reducing the risks associated with bugs and honeypots.Conclusions: ChatGPT is best utilized as an APR tool when combined with vulnerability detection tools. It requires a comprehensive understanding of the program and thorough examination by various vulnerability detection tools to ensure robust coverage.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
Double_N完成签到,获得积分10
2秒前
3秒前
13633501455完成签到 ,获得积分10
6秒前
andy应助科研通管家采纳,获得20
6秒前
andy应助科研通管家采纳,获得10
7秒前
7秒前
7秒前
7秒前
江晚发布了新的文献求助10
10秒前
852应助mizhou采纳,获得10
11秒前
Fan完成签到,获得积分10
13秒前
14秒前
蔡从安发布了新的文献求助10
15秒前
科研通AI2S应助沐风采纳,获得10
17秒前
健忘的晓小完成签到 ,获得积分10
18秒前
Janus完成签到 ,获得积分10
21秒前
韶可愁完成签到,获得积分10
25秒前
糖宝完成签到 ,获得积分0
34秒前
Pauline完成签到 ,获得积分0
34秒前
光亮向真完成签到,获得积分10
35秒前
昔昔完成签到 ,获得积分10
37秒前
jinyu完成签到,获得积分10
37秒前
贤惠的早晨完成签到,获得积分10
38秒前
懵懂的书本完成签到 ,获得积分10
39秒前
爱科研的小虞完成签到 ,获得积分10
42秒前
黄梓同完成签到 ,获得积分10
42秒前
45秒前
哭泣青烟完成签到 ,获得积分10
46秒前
胡杨树2006完成签到,获得积分10
48秒前
天天发布了新的文献求助10
48秒前
Tracy麦子完成签到 ,获得积分10
1分钟前
张大旭77完成签到 ,获得积分10
1分钟前
会飞的螃蟹完成签到,获得积分10
1分钟前
满意的寒凝完成签到 ,获得积分10
1分钟前
刻苦的新烟完成签到 ,获得积分0
1分钟前
过时的傲玉完成签到 ,获得积分10
1分钟前
lichunrong完成签到,获得积分10
1分钟前
笨笨的乘风完成签到 ,获得积分10
1分钟前
111完成签到 ,获得积分10
1分钟前
lili完成签到,获得积分10
1分钟前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
PowerCascade: A Synthetic Dataset for Cascading Failure Analysis in Power Systems 2000
Various Faces of Animal Metaphor in English and Polish 800
Signals, Systems, and Signal Processing 610
Photodetectors: From Ultraviolet to Infrared 500
On the Dragon Seas, a sailor's adventures in the far east 500
Yangtze Reminiscences. Some Notes And Recollections Of Service With The China Navigation Company Ltd., 1925-1939 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6353195
求助须知:如何正确求助?哪些是违规求助? 8168047
关于积分的说明 17191522
捐赠科研通 5409215
什么是DOI,文献DOI怎么找? 2863646
邀请新用户注册赠送积分活动 1840978
关于科研通互助平台的介绍 1689834