Giter Site home page Giter Site logo

l3x's Introduction

L3X - AI-driven Smart Contract Static Analyzer

L3X detects vulnerabilities in Smart Contracts based on patterns and AI code analysis. Various LLMs act as validators for vulnerabilities detected by patterns and validate each other's results in AI code analysis. Vulnerabilities are confirmed when they receive confirmation from a majority of validators. As a result, a report with validated vulnerabilities and detected safe patterns is generated.

Smart Contract Support

  • Solana based on Rust

Design

design

How It Works

  • Vulnerability Patterns Analysis: Analysis of smart contract code for vulnerability patterns.
  • AI Code Analysis: Analysis of smart contract code for vulnerabilities using Language Model validators (LLMs).
  • LLM Validators: Potential vulnerabilities detected are passed on to multiple LLM validators for confirmation. Three different models are utilized: GPT-4, Gemini, and Claude 2.
  • Validation Process: Each validator independently assesses potential vulnerabilities. Detected vulnerabilities undergo a validation check.
  • Decision Making:
    • Valid: A vulnerability is confirmed as valid when at least two LLM validators agree.
    • False Positive: A finding is marked as a false positive when identified as such by at least two validators.
  • Cross-Validation: Each LLM performs a cross-validation check during the AI Code Analysis phase.
  • Report Generation: A report is generated that compiles all confirmed vulnerabilities, with duplicates removed.

Current limitations

Currently it's MVP

  1. Vulnerabilities detects only based on vuln patterns
  2. GPT-3.5 act as validators for vulnerabilities detected by patterns

LLM supported

  • GPT-3.5
  • GPT-4 (Soon)
  • Claude (Planned)
  • Gemini (Planned)

Set API Keys

Set the openai api key as an environment variable OPENAI_KEY in your operating system

Linux/Mac

export OPENAI_KEY=sk-ApiKeyExample

Windows

set OPENAI_KEY=sk-ApiKeyExample

How to Use โ“

  1. Build
cargo build
  1. Compile
cargo run
  1. Run
l3x smart-contracts-folder-to-analyse

Usage Example ๐Ÿ

exec!

gif!

Report example

Roadmap ๐Ÿ—“๏ธ

  • Design
  • MVP concept
  • GPT-4 Integration ๐Ÿ”œ
  • Claude Integration
  • Gemini Integration
  • AI Code Analysis
  • AI Code Analysis - Cross-Validation
  • Refactor
  • Accuracy Comparison

Contact ๐Ÿ“ง

All suggestions write to contact [email protected]

l3x's People

Contributors

yevh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.