论文

Ethereum NFT 智能合约漏洞检测:结合代码切片和 DeepSeek 的知识引导方法

Ethereum NFT Smart Contracts: Knowledge-Guided Vulnerability Detection with LLM and Code Slicing

精选理由

研究了一套专门针对 NFT 合约的漏洞检测方法,用 DeepSeek 加代码切片把准确率干到了 97.1%,比纯分析完整合约高了 23 个百分点。做合约安全的可以看看。

该论文提出一种结合漏洞聚焦代码切片、ERC-721 知识库和约束 DeepSeek 的 NFT 智能合约漏洞检测方法。

正文

在 450 个 NFT 合约样本上,完整配置的检测器给出了 437 个正标签,正标签率达到 97.1%。

去除外部知识库后,正标签率降至 87.11%;

进一步去除代码切片,正标签率降至 73.78%。

结果表明,聚焦代码上下文和领域约束显著影响检测效果。

原文 · arXiv: DeepSeek

Ethereum NFT Smart Contracts: Knowledge-Guided Vulnerability Detection with LLM and Code Slicing

Ethereum non-fungible tokens (NFTs) implement ownership, transfer, authorization, and metadata operations through smart contracts, making contract vulnerabilities a direct risk to digital assets. Existing static analyzers provide efficient rule-based screening but can struggle with application-specific logic, whereas unconstrained large language model analysis may be distracted by irrelevant code or produce inconsistent outputs. We present a vulnerability-detection method that combines vulnerability-focused code slicing, an ERC-721-oriented knowledge base, and constrained DeepSeek analysis. Regular-expression patterns locate candidate statements for reentrancy, integer overflow or underflow, and timestamp dependence. A structure-aware context-window algorithm then extracts line-numbered code slices. DeepSeek analyzes each slice using explicit decision rules and a fixed output schema, and the resulting records support automated batch processing. On 450 NFT contract samples, the full configuration produced 437 positive labels, corresponding to a reported positive-label rate of 97.1%. Removing the external knowledge base reduced this rate to 87.11%, while analyzing complete contracts without the knowledge base reduced it to 73.78%. These results indicate that focused code context and domain constraints materially affect the detector's reported output.

产业坐标与信源核验

本条情报归属 AITOP「论文」核心栏目,重点聚焦中国 AI 产业与国产大模型生态。涉及核心实体与技术议题包括:智能合约、漏洞检测、DeepSeek、代码切片,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。

信源核验说明:本文原始信息发布自一手权威信源「arXiv: DeepSeek」(Tier-1 一手发布),具备高确定性参考价值。

发现摘要或翻译有误? 告诉我们