New Progress in Blockchain Security: In-depth Exploration of Smart Contract SAST Technology

7 Minutes Read

MetaTrust Labs

MetaTrust Labs


In summary, the systematic evaluation of SAST tools presented in the paper "Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We?" ( reveals the current status and challenges of smart contract security detection technologies, while the MetaScan platform represents the forefront of technological innovation in this field.

In today's rapidly evolving digital era, smart contracts, as a core component of blockchain technology, are becoming the cornerstone supporting decentralized applications (DApps) and the decentralized finance (DeFi) sector. However, security concerns in smart contracts have been a key factor hindering their widespread adoption. In response, automated, AI-powered smart contract security assessment tools, such as MetaScan from blockchain security solutions provider MetaTrust, are gradually emerging as a vital force in ensuring smart contract safety.

Recently, collaborative research between MetaTrust and Nanyang Technological University, titled "Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We?", was published at FSE2024 and awarded the ACM SIGSOFT Distinguished Paper Award. This recognition highlights the significant contributions of the paper to the field of software engineering. The award, which honors outstanding papers presented at top software engineering conferences, is typically granted to no more than 10% of the best papers, representing the highest level of research achievements in the field.

In the paper, researchers from MetaTrust and Nanyang Technological University conducted a thorough evaluation and analysis of current SAST tools, pointing out their effectiveness and limitations in detecting smart contract vulnerabilities. The authors delved into the security issues of smart contracts and proposed an updated, fine-grained vulnerability classification system encompassing 45 unique vulnerability types. Based on this classification, they developed an extensive benchmarking test suite covering 40 different vulnerability types and incorporating diverse code characteristics, vulnerability patterns, and application scenarios. Through this benchmark, they evaluated eight SAST tools, which were tested on 18,788 smart contract files and 10,394 vulnerabilities.

Among these tools, the most effective SAST tool was MetaScan, a product developed by MetaTrust Labs, which leverages the SAST technology mentioned in the paper to scan smart contracts for security vulnerabilities. MetaScan utilizes advanced static analysis techniques and artificial intelligence (AI) to provide a comprehensive security assessment for smart contracts. Static analysis is the cornerstone of smart contract security testing, as it identifies potential security issues by analyzing the syntax and structure of the code without executing the program itself.

Advancements in Static Analysis Tools

The paper, "Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We?" (, delves into the application of static analysis engines in detecting software security vulnerabilities. The research, recognized with the ACM SIGSOFT Distinguished Paper Award, not only makes significant academic contributions but also has a notable impact on software engineering practices and the security domain, emphasizing its methodological innovation, rigorous experimental design, and practical utility of the findings.

In the paper, static analysis tools are instrumental in detecting potential security vulnerabilities in smart contracts without executing the program. These tools identify possible security issues by analyzing source code or bytecode, providing immediate and comprehensive insights during the coding phase, which is particularly crucial for immutable smart contracts.

The paper conducted a deep analysis of eight static application security testing (SAST) tools, revealing the limitations of existing SAST tools in detecting smart contract vulnerabilities through a comprehensive benchmark covering 40 unique vulnerability types. The study showed that these tools could only identify about half of the benchmark vulnerabilities, with high false-positive rates and precision not exceeding 10%. This indicates that while SAST tools have achieved some success in identifying classic vulnerabilities such as reentrancy attacks, their effectiveness still needs improvement when confronted with deeper logical and protocol-level vulnerabilities.

MetaScan: A Multi-Engine, Multi-Dimensional Security Solution

Smart contracts, as a core component of blockchain technology, are widely used in financial services, supply chain management, identity verification, and other sectors. However, as applications deepen, security issues in smart contracts have become increasingly prominent, especially in areas such as access control, arithmetic processing, cryptography applications, transaction order dependency, and reentrancy attacks. Security vulnerabilities in these scenarios not only threaten the safety of user assets but may also impact the stability of the entire blockchain ecosystem.

MetaScan emerges in this context, integrating diverse security engines to provide comprehensive security testing services for smart contracts. MetaScan incorporates advanced technologies from the SAST tools evaluated in the paper as one of its engines, capable of detecting various vulnerabilities in smart contracts. As a core product of the MetaTrust Security Platform, MetaScan employs multiple security engines to offer multi-dimensional security protection, including:

  • Security Analyzer for SAST: Utilizes static code analysis techniques to detect potential security vulnerabilities in the code.

  • GPTScan: Integrates AI technologies, such as ChatGPT, to detect logical vulnerabilities and adapt to various code variants.

  • Code Quality: Assesses code quality and identifies informational and low-level vulnerabilities.

  • Security Prover: Focuses on identifying vulnerabilities related to contract execution and fixed logical defects.

  • Code Clone: Uses clone detection technology to prevent security risks introduced through code duplication.

  • Open Source Analyzer: Conducts security assessments of open-source library usage to ensure their safe integration into applications.

Static analyzers are tools that analyze source code during the compilation stage to detect potential programming errors, vulnerabilities, or other issues without actually executing the code. Such tools are invaluable for identifying and fixing problems early on, especially in smart contract development, where the code becomes immutable once deployed to the blockchain.

Among these, the traditional Security Analyzer employs static code analysis techniques to detect potential security vulnerabilities, ensuring the basic level of security in the contract code. GPTScan, on the other hand, is an innovative feature that leverages advanced AI technologies, particularly language models like ChatGPT, to identify logical vulnerabilities. By simulating attack scenarios and abnormal behavior patterns, GPTScan can uncover complex logical issues that traditional methods might miss, broadening the scope and depth of vulnerability detection.

MetaScan's static analyzer engine utilizes prompts generated by the GPT model, specifically designed to simulate potential attack scenarios or abnormal behavior patterns. Through this hybrid approach, the engine can delve into the code structure, identifying and exposing complex logical vulnerabilities that might be overlooked by traditional methods.

AI Integration: The Fusion of Smart Assistance and Deep Analysis

MetaScan's novelty lies in its deep integration of AI technology with static analysis techniques. Specifically, the GPTScan engine not only relies on the GPT model to identify vulnerabilities but also utilizes GPT as a code understanding tool. By decomposing logical vulnerability types into scenarios and attributes and matching them with GPT, followed by static confirmation for verification, it enhances the accuracy of detection.

MetaScan's AI assistant not only provides detailed descriptions and repair suggestions for detected security issues but also interacts with users on project detail pages and scan result pages, answering questions related to vulnerabilities. This integrated AI assistance makes MetaScan not just a security tool but also an intelligent collaborative work platform, making the security assessment process more intuitive and user-friendly. Through language as the interface, users can easily access targeted security information or take corresponding remedial measures, achieving seamless management of smart contract security.

By combining the latest research findings and AI technology, MetaScan provides users with a comprehensive, intuitive, and user-friendly smart contract security assessment platform. It not only improves the efficiency and accuracy of security assessments but also, through AI assistance, makes the process smoother, offering users the most comprehensive security coverage. As technology continues to advance and innovate, MetaScan will continue to lead the trend in smart contract security assessments, contributing to the security of the blockchain ecosystem.


In summary, the systematic evaluation of SAST tools presented in the paper "Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We?" ( reveals the current status and challenges of smart contract security detection technologies, while the MetaScan platform represents the forefront of technological innovation in this field. By combining traditional static analysis techniques with the latest AI advancements, MetaScan not only enhances the precision and coverage of vulnerability detection but also enables efficient user interaction through its AI assistant, making smart contract security assessments more effective and comprehensive. As these technologies continue to evolve and improve, the security defenses of smart contracts will be strengthened unprecedentedly, laying a solid foundation for the healthy development of the digital economy.

Share this article