Skip to content

Latest commit

 

History

History
60 lines (29 loc) · 2.9 KB

README.md

File metadata and controls

60 lines (29 loc) · 2.9 KB

GPTLens Demo

Screenshot 2024-05-01 at 8 37 33 AM

Generated by DALL·E-3 | Image by Sihao Hu

What is GPTLens?

GPTLens leverages Large Language Models (LLMs) like GPT-4 to improve the security analysis of smart contracts. It addresses the critical need for effective smart contract vulnerability detection, which has become increasingly important with the prevalence of blockchain technology. GPTLens introduces a two-stage framework: generation and discrimination. In the generation stage, LLMs act as auditors to identify a broad spectrum of potential vulnerabilities. The discrimination stage then evaluates these findings to minimize false positives, significantly enhancing the accuracy and reliability of vulnerability detection(shown in the figure below).

Screenshot 2024-05-01 at 8 42 39 AM

Some key features of GPTLens include:

  • Dual-stage Analysis: Utilizes generation and discrimination stages to identify and verify smart contract vulnerabilities.
  • LLM-driven Approach: Completely driven by LLMs, requiring no specialist knowledge in smart contracts for initial assessments.
  • High Accuracy and Efficiency: Designed to reduce false positives and enhance the detection process without compromising on performance.

To see the detailed implementation, go to : https://github.com/git-disl/GPTLens. This demo app provides a scenario-based walkthrough of how GPTLens utilizes LLMs to examine smart contract code and detect vulnerabilities.

Installation

pip install -r requirements.txt

Running GPTLens Demo

python src/gpt_lens_demo.py

Sample Pages of GPTLens Demo

This demo shows the GPT-lens workflow

Demo app Coverpage:

GPTLens Demo app cover page

Demo app showing GPTLens architecture step-by-step:

Screen-Recording-2024-05-01-at-9.mp4

Demo app displaying data pipelining:

data_loading_page.mp4

Acknowledgements

This mini-project, GPTLens, was developed by Yining Yuan in collaboration with the GIT DiSL group under the supervision of Prof. Dr. Ling Liu and PhD student Sihao Hu.

For more detailed information on GPTLens, please refer to the following resources:

For any technical questions regarding this project, please consult with Sihao Hu.