Definition and Detection of Defects in NFT Smart Contracts
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%.
Thu 20 JulDisplayed time zone: Pacific Time (US & Canada) change
13:30 - 15:00 | ISSTA 11: Testing 3Technical Papers at Amazon Auditorium (Gates G20) Chair(s): Marcelo d'Amorim North Carolina State University | ||
13:30 15mTalk | Dependency-Aware Metamorphic Testing of Datalog Engines Technical Papers DOI | ||
13:45 15mTalk | GDsmith: Detecting Bugs in Cypher Graph Database Engines Technical Papers Ziyue Hua Peking University, Wei Lin Peking University, Luyao Ren Peking University, Zongyang Li Peking University, Lu Zhang Peking University, Wenpin Jiao Peking University, Tao Xie Peking University DOI | ||
14:00 15mTalk | Testing Graph Database Engines via Query Partitioning Technical Papers Matteo Kamm ETH Zurich, Manuel Rigger National University of Singapore, Chengyu Zhang ETH Zurich, Zhendong Su ETH Zurich DOI | ||
14:15 15mTalk | Toward Automated Detecting Unanticipated Price Feed in Smart Contract Technical Papers Yifan Mo Sun Yat-sen University, Jiachi Chen Sun Yat-sen University, Yanlin Wang Sun Yat-sen University, Zibin Zheng Sun Yat-sen University DOI | ||
14:30 15mTalk | Definition and Detection of Defects in NFT Smart Contracts Technical Papers Shuo Yang Sun Yat-sen University, Jiachi Chen Sun Yat-sen University, Zibin Zheng Sun Yat-sen University DOI |