# Definition and Detection of Defects in NFT Smart Contracts

Source: [Definition and Detection of Defects in NFT Smart Contracts](<https://www.sota2.com/research/paper/68fa70371e209131cea4998a>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-26T01:36:15.259Z

Authors: Shuo Yang, Jiachi Chen, Zibin Zheng

Published: 2023-05-25T08:17:05.000Z

## Abstract

Recently, the birth of non-fungible tokens (NFTs) has attracted great attention. NFTs are capable of representing users' ownership on the blockchain and have experienced tremendous market sales due to their popularity. Unfortunately, the high value of NFTs also makes them a target for attackers. The defects in NFT smart contracts could be exploited by attackers to harm the security and reliability of the NFT ecosystem. Despite the significance of this issue, there is a lack of systematic work that focuses on analyzing NFT smart contracts, which may raise worries about the security of users' NFTs. To address this gap, in this paper, we introduce 5 defects in NFT smart contracts. Each defect is defined and illustrated with a code example highlighting its features and consequences, paired with possible solutions to fix it. Furthermore, we propose a tool named NFTGuard to detect our defined defects based on a symbolic execution framework. Specifically, NFTGuard extracts the information of the state variables from the contract abstract syntax tree (AST), which is critical for identifying variable-loading and storing operations during symbolic execution. Furthermore, NFTGuard recovers source-code-level features from the bytecode to effectively locate defects and report them based on predefined detection patterns. We run NFTGuard on 16,527 real-world smart contracts and perform an evaluation based on the manually labeled results. We find that 1,331 contracts contain at least one of the 5 defects, and the overall precision achieved by our tool is 92.6%.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [ERC Compliance Validation on ground-truth dataset](<https://www.sota2.com/research/sota/erc-compliance-validation-on-ground-truth-dataset.md>): ERC Compliance Validation; ground-truth dataset; True Positives (TP): 0.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2305.15829>)

[PDF](<https://arxiv.org/pdf/2305.15829.pdf>)
