Section 01
BELMA Framework Guide: A Smart Contract Security Solution Combining Formal Verification and LLMs
BELMA is a two-layer smart contract vulnerability detection and automatic repair framework that innovatively combines the rigor of formal verification with the flexibility of Large Language Models (LLMs). The first layer performs vulnerability detection using word vector models, symbolic execution, and the SWC rule base; the second layer uses fine-tuned LLMs to generate candidate patches, and ensures patch correctness through a closed-loop refinement cycle (generate-verify-feedback-regenerate). This framework can not only handle known SWC vulnerabilities but also has the ability to explore zero-day vulnerabilities, providing a complete solution for smart contract security.