Definition and Detection of Defects in NFT Smart Contracts

05/25/2023
by   Shuo Yang, et al.
0

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

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/19/2019

The Art of The Scam: Demystifying Honeypots in Ethereum Smart Contracts

Modern blockchains, such as Ethereum, enable the execution of so-called ...
research
02/16/2019

Precise Attack Synthesis for Smart Contracts

Smart contracts are programs running on top of blockchain platforms. The...
research
05/04/2019

Domain Specific Code Smells in Smart Contracts

Smart contracts are programs running on a blockchain. They are immutable...
research
05/21/2021

SCSGuard: Deep Scam Detection for Ethereum Smart Contracts

Smart contract is the building block of blockchain systems that enables ...
research
07/08/2019

Annotary: A Concolic Execution System for Developing Secure Smart Contracts

Ethereum smart contracts are executable programs, deployed on a peer-to-...
research
03/12/2021

A Multi-Modal Transformer-based Code Summarization Approach for Smart Contracts

Code comment has been an important part of computer programs, greatly fa...
research
03/10/2023

Watch the Gap: Making code more intelligible to users without sacrificing decentralization?

The potential for blockchain technology to eliminate the middleman and r...

Please sign up or login with your details

Forgot password? Click here to reset