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
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
邢现良完成签到,获得积分10
刚刚
Moyee完成签到,获得积分10
刚刚
andy完成签到,获得积分10
刚刚
刚刚
兔子里的乌龟完成签到 ,获得积分10
刚刚
YAN完成签到,获得积分10
刚刚
希翼完成签到,获得积分10
1秒前
花花公子完成签到,获得积分10
1秒前
一首简单的歌完成签到,获得积分10
1秒前
华仔的应助被MR_MA采纳,获得10
1秒前
Clair完成签到 ,获得积分10
1秒前
风风完成签到,获得积分10
2秒前
卡皮巴拉完成签到,获得积分10
2秒前
青年才俊完成签到,获得积分10
3秒前
RYAN完成签到 ,获得积分10
3秒前
3秒前
null的应助被陌路孤星采纳,获得10
4秒前
want完成签到,获得积分10
4秒前
adogi完成签到 ,获得积分10
4秒前
忧心的曼凝的应助被难过云朵采纳,获得10
4秒前
wsnsnns完成签到,获得积分20
4秒前
Victoria完成签到 ,获得积分10
4秒前
boom发布了新的文献求助10
4秒前
5秒前
SwaggyBJ1120完成签到 ,获得积分10
5秒前
儒雅大象完成签到,获得积分10
6秒前
花火完成签到,获得积分10
6秒前
梦云点灯完成签到,获得积分10
6秒前
顾矜的应助被健行美好采纳,获得10
6秒前
科研完成签到,获得积分10
6秒前
Daniel完成签到,获得积分10
6秒前
活泼寒凡完成签到,获得积分10
7秒前
7秒前
拼搏一曲完成签到,获得积分10
7秒前
张迪完成签到,获得积分10
7秒前
芒小果完成签到,获得积分10
7秒前
合适的狗发布了新的文献求助10
8秒前
好人一生平安完成签到,获得积分10
8秒前
鲁木完成签到,获得积分10
8秒前
8秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Comparison of cardiorespiratory responses, kinematic changes and psychological responses between tachi run and moderate intensity constant run 500
Cortex activity fluctuations during TaiChi Run by functional near-inferred spectroscopy 500
高速电流舵型数字模拟转换器 500
Data Driven Casing Collar Feature Detection and Identification for Automated Depth Estimation for Wireline 500
Cellulose and Cellulose Derivatives PART III 400
Social Psychology in the Real World 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 工程类 有机化学 化学工程 生物化学 物理 复合材料 内科学 催化作用 光电子学 人工智能 细胞生物学 无机化学 物理化学 数学
热门帖子
关注 科研通微信公众号,转发送积分 8260156
求助须知:如何正确求助?哪些是违规求助? 9633769
关于积分的说明 22184090
捐赠科研通 7883812
什么是DOI,文献DOI怎么找? 3460590
关于科研通互助平台的介绍 2579099
邀请新用户注册赠送积分活动 2512423