Skip to content

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

Jul 2026 · arXiv.org · Vol abs/2607.21983 · 0 citations · 61 references
Computer Science

TL;DR

Results indicate that focused code context and domain constraints materially affect the detector's reported output.

Abstract

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.

View source

Similar papers

Preprint Sep 2026

IntentFuzz: A Protocol-Aware Fuzzer for Automated Invariant Violation Detection in Intent-Based Cross-Chain Bridges

This work proposes IntentFuzz: a protocol-aware fuzzer that recovers a bridge's intent structure and deposit/fill function roles directly from unannotated Solidity source, then synthesizes multi-step fuzz sequences using an LLM-based fallback to help build call arguments.

André Augusto, Christof Ferreira Torres, André Vasconcelos et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Automated Vulnerability Injection in Smart Contracts Using Large Language Models

Results show that LLM-based vulnerability injection is feasible, while exposing key limitations in scalability and diversity, and practical challenges including LLMs' non-determinism and the difficulty of preserving contract semantics are reported.

Luca Migliaccio, Roberto Natella, N. Ivaki et al. · 0 citations
Preprint Aug 2026

Pre-Model Representation Failures in GNN-Based Smart Contract Vulnerability Detection

A failure analysis of the representation layer underlying GNN-based smart contract vulnerability detectors finds one confirmed case of misclassification caused directly by a representation-layer failure; the prevalence of such failures in real-world contract populations remains an open empirical question.

Birindwa Prisca Hondi, Chinoso Philip Nwishienyi, Charity Wanja Mwaura et al. · 0 citations
Review Open access 2026

SVACS: Smart Contract Vulnerability Analysis via Control Flow Semantics

This paper proposes SVACS, a bytecode-based analysis framework to identify multiple co-existing vulnerabilities based on SWC registry to align with industry-standard security guidelines and assist security reviewers to ensure smart contract security.

Ankur Jain, Abhishar Anand, S. Tripathy · 0 citations
Conference Aug 2026

LLM-powered Smart Contract Vulnerability Detection with RAG-based Knowledge Base and Corrective Quality Gating

Once deployed, smart contract bytecode is final and cannot be patched. Any vulnerability that ships with the contract becomes a permanent attack surface. Existing tools have clear gaps. Static analyzers such as Slither flag aggressively and tend to produce many false positives, while large language models (LLMs) reason...

S. Nguyen, Quang-Tien Tran, H. Vu et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.