/SolGPT

SolGPT智能合约(区块链)漏洞检测大模型 Solidity(Smart Contract) Vulnerability Detection Base on GPT Model

Primary LanguagePythonMIT LicenseMIT

SolGPT

Model Training Part for Solidity vulnerability Detection based on GPT (torch backen)

Paper

Paper "SolGPT: a GPT-Based Static Vulnerability Detection Model for Enhancing Smart Contract Security" has published in ICA3PP 2023.

Author: Shengqiang Zeng, Hongwei Zhang, Jinsong Wang, and Kai Shi.

Online Link SolGPT: a GPT-Based Static Vulnerability Detection Model for Enhancing Smart Contract Security.

Paper Manuscript already upload as "SolGPT.9.17.2023".

Requirements

Required Packages

Required Dataset

This repository contains the smart contract dataset of source code and processed code fragment. As to the source code, we crawled the source code of the smart contract from the Ethereum by using the crawler tool. Besides, we have collected some data from some other websites. At the same time, we also designed and wrote some smart contract codes with reentrancy vulnerabilities.

Note: crawler tool is available here.

Dataset

Original Ethereum smart contracts: Etherscan_contract

The train data after normalization in dataset.

OverView

Trainning

Training contain two part

  • TAPT training
  • finetunnng

You can see the instruction in train_tapt.sh and train_finetune.sh to learn how to train this model

References