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
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
fantasy的应助被鲁大海采纳,获得10
刚刚
张继超完成签到,获得积分10
刚刚
刚刚
THEODLL完成签到,获得积分10
刚刚
Lucky完成签到 ,获得积分10
1秒前
地兮完成签到 ,获得积分10
1秒前
Yiling完成签到,获得积分10
1秒前
lzc完成签到,获得积分10
1秒前
1秒前
三橋gzzzzz完成签到,获得积分10
2秒前
Y星人完成签到,获得积分10
2秒前
华风完成签到,获得积分10
2秒前
liangzhy发布了新的文献求助10
3秒前
RRui完成签到,获得积分10
3秒前
xh完成签到,获得积分10
3秒前
3秒前
pp完成签到 ,获得积分10
3秒前
醉熏的百合完成签到,获得积分10
4秒前
ke完成签到,获得积分10
4秒前
冷酷的天宇完成签到,获得积分10
4秒前
虚幻凌晴完成签到,获得积分10
4秒前
4秒前
科研澄澄完成签到,获得积分10
5秒前
怡然的海秋完成签到 ,获得积分10
6秒前
didida_he完成签到,获得积分10
6秒前
由不尤完成签到 ,获得积分10
6秒前
追寻曼雁完成签到 ,获得积分10
7秒前
哒哒哒发布了新的文献求助10
7秒前
Frank完成签到 ,获得积分10
8秒前
许泰菲完成签到,获得积分10
8秒前
妮妮发布了新的文献求助10
8秒前
faye完成签到,获得积分10
9秒前
VENTUS完成签到,获得积分10
9秒前
Shaynin完成签到,获得积分0
9秒前
9秒前
花开富贵完成签到,获得积分10
9秒前
断水断粮的科研民工完成签到,获得积分10
10秒前
开心市民小刘完成签到,获得积分10
10秒前
玲玲玲完成签到,获得积分10
11秒前
shaw完成签到,获得积分10
12秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
The Martian climate revisited : atmosphere and environment of a desert planet 600
Sleisenger and Fordtran's Gastrointestinal and Liver Disease - 2 Volume Set Pathophysiology, Diagnosis, Management 500
[Radiotherapy of prostatic cancer at the loco-regional stage: therapeutic results and prognostic factors] 500
[Experiences with intensive radiotherapy of prostatic cancer in conjunction with surgery (transurethral resection, pelvic lymph node excision)] 500
Prior transurethral resection does not increase morbidity following real-time ultrasound-guided prostate seed implantation 500
Orthognathic Surgery - 2 Volume Set 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 工程类 有机化学 化学工程 生物化学 物理 复合材料 内科学 催化作用 光电子学 人工智能 细胞生物学 无机化学 物理化学 数学
热门帖子
关注 科研通微信公众号,转发送积分 8220777
求助须知:如何正确求助?哪些是违规求助? 9600742
关于积分的说明 21995949
捐赠科研通 7830241
什么是DOI,文献DOI怎么找? 3446497
关于科研通互助平台的介绍 2567802
邀请新用户注册赠送积分活动 2495380