Next Article in Journal
Pretreatments Applied to Wheat Straw to Obtain Bioethanol
Previous Article in Journal
Situational Awareness Assessment of Drivers Boosted by Eye-Tracking Metrics: A Literature Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Non-Fungible Token and Blockchain-Based Cotton Lint Traceability Solution

School of Mechanical Engineering, Xinjiang University, Urumqi 830047, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(4), 1610; https://doi.org/10.3390/app14041610
Submission received: 20 January 2024 / Revised: 11 February 2024 / Accepted: 16 February 2024 / Published: 17 February 2024
(This article belongs to the Section Applied Industrial Technologies)

Abstract

:
As a critical raw material for the textile industry, cotton lint provides various types of cotton yarns, fabrics and finished products. However, due to the complexity of the supply chain and its many links, information records are often missing, inaccurate or lagging, resulting in low transparency and traceability. In the traditional cotton lint supply chain, the data of each link are stored in isolation; due to the lack of an effective sharing mechanism and the formation of “information silos”, complete traceability is challenging to achieve. In addition, the completeness and authenticity of documents such as lint quality reports and certificates of origin must be rapidly strengthened. Otherwise, quality problems may arise. To solve the above problems, this study proposes a cotton lint supply chain traceability system based on blockchain and non-fungible tokens (NFTs), covering the whole cotton lint production process from harvesting to selling. We use an NFT as an asset token to digitise seed cotton, cotton lint and quality inspection reports and allow participants to store and manage these assets on the blockchain. The system design includes architecture diagrams, sequence diagrams and Ethernet smart contract development based on the ERC721 standard. In addition, the integration of Interplanetary File System (IPFS) technology solves the problem of storing large files on the chain and ensures that the data are permanently preserved and cannot be tampered with. We provide a diagram of the interactions between the system components and the four core algorithms’ design, testing and verification process. We present an in-depth analysis of the solution regarding the transaction costs and smart contract security. We confirm the solution’s security, reliability and applicability through a cost evaluation and security analysis.

1. Introduction

Cotton is one of the essential foundation crops for the global agricultural and textile industries [1]. In the textile industry, lint is the product of cotton fibres that are not further processed and whose quality has a decisive influence on textiles’ final quality and commercial value. Indicators for the measurement of the quality of cotton lint include the grade, colour grade, fibre length, macron level, moisture return and impurity content, which together reflect the commercial value of cotton lint and the range of market applications [2,3]. Despite the importance of cotton lint in the textile industry, its supply chain’s complexity allows unscrupulous merchants to tamper with information, posing a severe threat to the quality and safety of cotton lint. Therefore, ensuring the truthfulness and reliability of information on every aspect of cotton lint, from cultivation to consumption, is crucial. Integrating the entire distribution phase into a supply chain makes it possible to ensure the cotton lint’s quality and provide consumers with product traceability information [4,5]. This traceability helps to build public trust in the cotton lint’s safety and quality control [6]. However, establishing a reliable, efficient and stable traceability system to ensure the quality of cotton lint is still a great challenge [7].
Quality certification and the recognition of the value of cotton lint have traditionally relied on paper-based official inspection certificates. This approach introduces the problem of a reliance on the authority of a trusted third party. Although such certificates record critical parameters of cotton lint’s quality, such as the colour grading, fibre length, impurity content and other specific indicators, their information capacity is limited and they cannot fully reflect the state of cotton lint from the source of production to the final product [8]. Under the current, traditional model, consumers or buyers must unconditionally rely on a centralised system of organisations that issue inspection reports on cotton lint. However, this model of unconditional trust in platform data threatens organisations’ trust and data privacy [9]. This centralised system makes achieving transparency and traceability throughout the cotton lint supply chain difficult, resulting in missing or opaque information in the product flow chain [10]. Consumers in pursuit of quality cotton lint do not only seek high-quality lint but also a guarantee of the authenticity of its quality control and traceability records throughout its life cycle. Therefore, the trust mechanism constitutes a crucial cornerstone in the cotton lint trading ecosystem, directly affecting market participants’ decision-making confidence and the transaction efficiency [11].
To address the shortcomings of traditional traceability methods, blockchain has been introduced into the cotton lint supply chain to improve its transparency, traceability and quality control. Before delving into the benefits of blockchain technology for cotton lint supply chain management, it is necessary to provide the reader with a concise overview of the technology. Blockchain technology is a distributed ledger architecture that enables the decentralised recording and verification of the transactions occurring in a peer-to-peer network through consensus algorithms [12]. Its core feature is that the data stored on the blockchain are open and transparent, and cryptographic principles and encryption algorithms ensure the integrity and non-comparability of the data used. A blockchain can be analogised to a chain of data that can only grow unidirectionally, where each block contains a record of transactions within a specific window of time and is linked to the others in a chain in a strict hash-pointer order [13]. An NFT mechanism can be introduced to create digital assets and certifications corresponding to physical cotton lint to address the trust relationship between entities in the supply chain. As a token based on blockchain technology, an NFT can explicitly reflect the ownership of digital assets and allow holders to trade ownership interests in their underlying assets. The NFT is unique and irreplaceable; each token is a unique entity and is not interchangeable with any other token. Each NFT has a transparent ownership attribution that is corroborated and recorded through the underlying blockchain technology, thus enhancing the stability of the value of the corresponding digital assets and traceability throughout [14].
In the textile industry, NFTs can encode the quality parameters and characterisation information of cotton and are applied to track the complete data chain of lint from cultivation up to the end consumer [15]. Therefore, we innovatively propose a complete traceability solution for cotton lint quality that integrates blockchain technology and NFTs, aiming to solve the problems associated with order transactions and lint quality certificate authentication in the lint supply chain, to enhance the transparency and trust of the whole industry chain. In this solution, we transform seed cotton and cotton lint entities into unique assets in a digital form that are uniquely identified through NFTs. The main contributions of our solution are as follows:
  • We propose an integrated solution based on blockchain technology to efficiently manage the ownership of seed cotton and lint in the lint supply chain and digitise lint inspection and certification through NFTs.
  • In our solution, we innovatively integrate the distributed storage technology of IPFS to ensure the secure and permanent storage of NFT metadata. With this integrated design, we effectively avoid the inefficiency and high cost of storing large amounts of data directly on the blockchain.
  • In our work, we use a system architecture design methodology and a sequence diagram model to plan, describe and interpret our solution in detail. These graphical tools provide a comprehensive view of the participants’ and consumers’ behavioural patterns and process logic in critical interaction scenarios, especially for the core processes such as the seed cotton auction.
  • We use the Solidity programming language to design and implement critical functional modules of smart contracts to support our proposed blockchain-based supply chain management solution for cotton lint. These smart contracts have been carefully written and rigorously tested, covering functions such as ownership transfer, seed cotton auction mechanisms, lint inspection and certification NFT issuance, and they have been successfully deployed in the Ethernet test network environment.
The rest of the paper is structured as follows: in Section 2, we review related work using blockchain and NFTs; in Section 3, we propose a solution based on blockchain and NFTs; in Section 4, we describe the details of the smart contract implementation of our solution; in Section 5, we test and validate the smart contract; in Section 6, we evaluate and analyse the deployment of our smart contract; and, finally, Section 7 summarises our contributions.

2. Related Works

2.1. Lint Quality Tracing in Supply Chain

The cotton lint supply chain includes the entire process from cotton picking, subsequent processing, storage management, logistics and transport up to sales. Supply chain quality traceability management aims to integrate all information on the source of cotton production, including, without limitation, the production records, details of the processing steps, real-time transport data, storage status updates and the sales of the final product, as well as other essential types of information, all within a unified and coherent traceability framework. It also aims to establish an effective information-sharing platform. Through the quality traceability system, we can ensure that the processing of cotton lint, from production to the hands of consumers, shows traceability, so as to achieve the seamless linkage of information in all aspects. This not only helps to improve the transparency of the operation of the whole industrial chain but also enhances the trust relationship between the participants, while improving the overall management level and efficiency of the supply chain [16].

2.2. Blockchain Solution

In past supply chain management models, the execution and control of the transaction process were usually based on a centralised structure and third-party intermediaries. This centralised approach must inevitably be revised regarding accountability tracking, audit verification and information transparency. In response to such problems in the cotton lint supply chain, a series of research projects have been conducted in academia and industry to improve the status quo, introducing blockchain technology into supply chain management in the textile industry. Therefore, in this section, we systematically review specific attempts at and practical cases of applying blockchain technology to optimise the supply chain within the textile industry.
Agrawal T. K. et al. [17] proposed a blockchain-based supply chain traceability framework for multi-level traceability in the textile and apparel supply chains. They also presented an example of an organic cotton supply chain using blockchain and customised smart contracts and trading rules; however, the critical quality data must be stored appropriately. Pal, K. et al. [18] discussed the application of intelligent manufacturing and blockchain technology for data management in the apparel manufacturing supply chain. The current textile and apparel manufacturing industry faces significant uncertainty and complexity associated with the dynamic operating environment. Their article proposed a hybrid enterprise information system architecture with IoT applications and a blockchain-based distributed ledger to support transactional services within a multi-party global apparel business network. Bullón Pérez, J. J. et al. [19] developed the application of blockchain technology for garment traceability. In addition, the authors outlined the process of adding information about ready-to-wear garments to the blockchain and described how the hash problem can be used to verify the validity of a new block; they also mentioned the difficulty of obtaining hashes with different numbers of leading zeros by calculating the nonce value in order to demonstrate the increase in difficulty. However, this study lacked a quality traceability process for the garment supply chain, and, in particular, the issue of tracing raw materials for garments was not well addressed. Bhuvaneshwarri. et al. [20] proposed an online sustainable logistics management system combining blockchain and IoT technologies to optimise logistics management practices in the textile industry. The system ensured the safe storage, transparent sharing and non-tampering of logistics data with the help of blockchain characteristics, real-time monitoring and the refined management of logistics links through IoT technology. However, the problem of high data storage costs for blockchain technology does not permit a solution. Ahmed, W. A. [21] and others suggested that different participants may have differentiated implementation strategies based on their positioning in the supply chain and their traceability goals. Blockchain initiatives are focused on the downstream supply chain with regard to retailer traceability. They have already achieved high traceability at crucial points in the downstream supply chain, with relatively high ease of adoption. However, poorer traceability currently exists in the upstream sector.

2.3. NFT Solutions

To further promote the integration of blockchain technology in supply chain management, researchers have begun to explore the application of NFTs in various areas of the supply chain for ownership confirmation and information traceability. Hawashin, D. et al. [22] proposed using combinable NFTs for the trading and management of expensive packaged products in the food industry. Based on blockchain technology, food products were tied to NFTs to achieve traceability and uniqueness verification, so as to guarantee product authenticity and security. At the same time, they provided implementation cases and methods that demonstrated the potential of combinable NFTs in the food industry. Gebreab, S. A. et al. [23] proposed a solution to the problem of medical device traceability and ownership management using NFTs, combining blockchain smart contracts, tokenisation protocols and distributed storage techniques. The authors also proposed using NFTs as a vehicle for medical device digital twins, to record device attributes and their associated metadata throughout manufacturing and distribution, up to their current use and ownership changes. Musamih, A. et al. [24] proposed an NFT-based solution for healthcare products that used the IPFS distributed storage system to ensure data ownership and the origin’s security, transparency and trustworthiness. This solution also provided a decentralised, secure and reliable database that enabled data analysis tools to access and verify the actual integrity of the data directly. The study by Dos Santos, R. B. et al. [25] explored the challenges of the agri-food supply chain. It proposed using smart contracts and blockchain tokens to improve the third-party certification (TPC) process therein. The authors built a prototype system on the Rinkeby test network by customising Ether Smart Contracts with the ERC-1155 standard NFT, aiming to achieve the traceability of the origins of agricultural products, increased transparency and food safety and security. Alnuaimi, N. et al. [26] proposed NFT certificates and proof of delivery based on blockchain technology. NFT certificates contain ownership history information, which allows consumers to verify the authenticity of the goods and trace their origins. At the same time, proof of delivery records the entire process, from logistics to signing for the delivery, which serves as proof of purchase to enhance consumers’ trust and satisfaction.
In summary, work within the current research area has yet to explicitly propose and successfully deploy a solution for product traceability in the cotton lint supply chain using decentralised technologies. This study proposes to combine blockchain technology and NFTs to transform physical assets in the lint and cotton supply chain into a trusted digital twin. At the same time, it seeks to establish a transparent and traceable system throughout the entire supply chain, to ensure that all relevant parties involved can access and validate the actual status and flow history of the products in real time and to improve the transparency, trust and compliance of the overall supply chain.

3. Proposed Solution

This section delves into the design details of a cotton lint supply chain traceability solution built on blockchain and NFTs. We exhaustively analyse the system architecture, the constituent parts and how stakeholders interact at various process steps through smart contracts, which are presented as sequence diagrams. Our solution is designed to create a secure, trustworthy and highly liquid traceability system using NFTs and blockchain technology. In addition, the solution integrates the IPFS as a distributed storage mechanism for the preservation of critical document information. It ensures that the record of each operation step is retained on the blockchain, thus empowering the platform to upload cotton lint traceability data with high availability and comparability [27].

3.1. System Components

Figure 1 presents the architecture of the traceability system designed for the cotton lint supply chain, which consists of five core components: participants, a decentralised application (DApp), an off-chain storage system, a blockchain platform and smart contracts. DApps allow stakeholders to interact with various system parts, including smart contracts, distributed storage and various on-chain resources. The smart contracts deployed on the blockchain empower stakeholders to interact with the blockchain ledger transparently.
  • Participants: In the proposed solution, the core participants include cotton-growing farms, producers, warehouse companies, the Market Supervision and Administration Bureau (MSAB) and textile companies, as well as the final customer. It is important to note that only authorised and qualified participants can initiate the NFT creation process. Any quality issues with the participant’s products can be quickly traced back to the source through the traceability information associated with the NFT [28]. This mechanism ensures supply chain transparency and effective accountability.
  • Ether blockchain: The Ether blockchain, a second-generation decentralised platform, supports users in executing custom code and operations in a distributed environment. Compared to Bitcoin, the Ether network not only has its cryptocurrency, Ether, but it can also interact with Externally Owned Accounts (EOA) and Contract Accounts (CA) [29]. In this case, the EOA is directly controlled by the entity holding the private key, while the smart contract code governs the CA. In the constructed system, the NFT in the cotton lint supply chain and all the related transaction information are permanently and securely recorded on the Ethereum blockchain, thus ensuring the security and transparency of the supply chain data.
  • Smart contract (SC): Smart contracts are self-executing protocols running on the blockchain whose terms are defined and enforced by code, ensuring the comparability and integrity of contract execution. We enable stakeholders to interact transparently with the blockchain ledger by deploying smart contracts. Smart contracts designed using the ERC-721 standard are embedded with identifiable information that gives each NFT a unique identity, thus allowing participants to trace the product flow by tracking the ownership history of their respective NFT [30]. Our solution has four core smart contract components: seed cotton NFT contracts, lint NFT contracts, inspection NFT contracts and a market management smart contract system. Among them, the ERC-721 standard-based smart contracts are responsible for generating, authorising and transferring different NFTs, while the marketplace SC focuses on managing and facilitating the trading activities of these NFTs.
  • Interplanetary file system: We use a distributed storage solution based on content addressing with version control and a peer-to-peer hypermedia architecture for the storage of NFT-associated metadata. In the NFT ecosystem, the IPFS ensures that each file possesses uniqueness within the global namespace by using content identifiers (CID) [31]. All files and directories uploaded to the IPFS are indexed and located based on their cryptographic hash values. This mechanism enables all relevant stakeholders to access the file resources stored on the IPFS. At the NFT application level, the IPFS hosts detailed metadata related to the cotton lint’s quality certification and transaction history, thus ensuring secure storage and transparent access to this crucial data.
  • Decentralised applications: In the cotton lint supply chain, stakeholders interact with smart contracts through DApps. With this platform, users can manage NFT assets on their personal account pages and buy or sell products on the marketplace homepage, thus enabling the flexible manipulation and circulation of NFT resources [32].

3.2. Solution Interaction

Figure 2 depicts how each system participant completes the trading process by interacting with the seed cotton NFT, inspecting the NFT and completing market smart contracts after harvesting the seed cotton. Firstly, to participate in the system, all users must register on the DApp and receive a unique Ether address as an identifier. In the seed cotton NFT generation phase, the seed cotton holder uploads the metadata associated with a batch of seed cotton lots (including details such as the cotton variety, weight, moisture retention and images) to the IPFS, thereby obtaining a unique CID hash link pointing to these data. Subsequently, the seed cotton holder converts their seed cotton rolls into NFT assets for authentication and issuance by calling the casting function on the seed cotton NFT smart contract. Once in the auction phase, producers initiate the bidding process for ownership of the seed cotton by sending an auction request containing the seed cotton NFT token ID and the Ether address of the original seed cotton owner to the market smart contract. The marketplace smart contract serves as a notification hub in this process, broadcasting auction information to all subscribing customers. Finally, the smart contract determines the highest bidder based on the received bidding requests and performs statistical calculations, thus completing a series of on-chain operations from the physical seed cotton to digital asset trading.
Figure 3 describes how the system participants work with the lint NFT, inspecting the NFT and market smart contracts during the lint production phase. Firstly, in the delivery of seed cotton, the producer receives the physical seed cotton through the transport service associated with the market smart contract. When the seed cotton is successfully delivered, the ownership of the NFT corresponding to the batch of seed cotton is transferred to the producer. Subsequently, after obtaining approval from the MSAB to proceed with the production operation, the producer initiates the lint production NFT process. Delivery interoperability is accomplished by scanning the QR code attached to the seed cotton rolls to enter information. Upon completion of production, the producer uploads specific metadata about the newly produced batch of lint, such as the net weight, gross weight, quality grade, production date and producer, to the IPFS and interacts with the lint NFT smart contract to perform casting functions to transform this physical batch of lint into a uniquely identified lint NFT asset. Finally, the lint is transported to a specialised warehouse for quality inspection. The quality inspection results are generated as physical certificates and uploaded to the IPFS, after which the quality inspection reports are digitally encapsulated with the help of inspection NFT smart contracts to develop an inspection NFT. This inspection NFT is then integrated into the original cotton lint NFT, enabling the recording and authentication of the entire chain, from the raw material to the finished product and quality assurance. Finally, stakeholders interact by scanning the QR code attached to the cotton lint to check the quality inspection certificate information.
Figure 4 reveals how the system participants complete transactions during the lint delivery phase by interacting with the lint NFT, the inspection NFT and the market smart contract. A lint producer first deploys and launches a market smart contract to organise the lint auction event. This operation triggers an announcement event to notify all potential buyers that the auction has begun. Consumers interested in such items participate in the bidding by sending a bid request to the marketplace smart contract, thus generating a bid event. The smart contract updates and publicises the highest valid bid and its corresponding bidder information in real time. Once the auction ends and the winning bid is confirmed, the cotton lint is physically transferred to the buyer. After successful delivery, the smart contract automatically executes the fund transfer procedure, transferring the bidding money from the buyer’s account to the producer’s account. At the same time, the ownership of the cotton lint is then formally transferred. Suppose that the physical quality of the purchased cotton lint does not match that in the inspection report certificate previously stored on the IPFS. In this case, the buyer has the right to invoke the withdrawal function via the dispute resolution mechanism embedded in the smart contract, recover the bid amount and give feedback on the quality issue to the appropriate market regulator for further processing.

4. Implementation Details

This section discusses the specific implementation details of the Ethereum-based blockchain smart contract solution. We used the online development environment Remix IDE to write the relevant code using the Solidity programming language. Next, we introduce and analyse the designed and developed smart contract.

4.1. Seed Cotton NFT Minting Process

Algorithm 1 depicts the seed cotton NFT digital twin casting process in detail. This process allows seed cotton owners to create a new NFT asset containing metadata related to the physical seed cotton. These metadata are uploaded to the IPFS as a javaScript object notation (JSON) format file covering key attributes such as the seed cotton variety name, product type and descriptive content. The IPFS then returns a CID as a unique index to access this stored information. Next, the CIDs generated by the IPFS are converted into ERC-721-compliant token URIs, thus establishing a clear association between the NFT record and the off-chain seed cotton digital twin on the blockchain. A unique token ID is assigned to the newly minted NFT and integrated within the NFT structure. Finally, upon successful casting, the smart contract triggers an event notification announcing critical details of the newly generated seed cotton NFT, including its token ID, ownership attribution address and a link to the metadata URI, ensuring that the transaction is transparent and traceable.
Algorithm 1: Mint seed cotton NFT
  Input: Seed cotton roll ID, metadata URI
  Output: Emit SeedCottonNFTminted Event
1  Upload metadata to the IPFS
2  if function caller = Seed cotton owners then
3    if metadata URI ∈ registeredUsers then
4      Increase TokenID;
5      Define the lint inspection certificate NFT by current TokenID;
6      Assign the inspection EA as the NFT owner;
7      Set the token URI of the minted NFT to metadataURI;
8      Notify stakeholders of NFT minting, token ID, NFT owner EA and token URI;
9    end
10   else
11     Seed cotton has been tagged.
12     Restore the contract to its original state.
13   end
14 end
15 else
16    Only the seed cotton owner can execute the function.
17    Restore the contract to its original state.
18 end

4.2. Seed Cotton Auction

Algorithm 2 is executed by calling the initialAuctionRequest function implemented within the seed cotton NFT smart contract when the seed cotton owner chooses to initiate the first auction. Under the terms of the contract, only authorised NFTs held by seed cotton owners are eligible to participate in the auction. During the initial auction process, the seed cotton owner’s ownership of the NFTs is transferred to the market smart contract in advance to ensure the security of the transaction. Before opening the auction, a precise auction end time and starting price are set, and the auction status of the NFT is updated to “In Progress”. Once the auction begins, the market smart contract publishes a real-time event report informing the seed cotton NFT of the current highest bid and providing the details of its bidder. The owner of the seed cotton confirms the validity of the results of the auction once the auction phase has ended and the highest bid has been received. Upon fulfilment of the delivery conditions, the ownership of the seed cotton NFTs is formally transferred to the winning bidder, and an event is triggered by the market smart contract to announce the winner’s details, completing the auction process and the transfer of ownership of the asset.
Algorithm 2: Seed cotton NFT auction
  Input: token ID, starting Bid, Bidding Time
  Output: Emit auctionStart Event, bidPlaced Event, auctionEnded Event
1  if function caller = Seed cotton owners then
2    if Customer Bid Amount > Maximum Bid Amount)(BidTime > 0) then
3      Update the Seed Cotton auction status to Unavailable;
4      Assign NFT ownership to the highest bidder;
5      Assigning NFT price to seed cotton owner sends an event announcing the end
       of the auction;
6      Notify stakeholders of the announcement of the closure of the auction and the
       details of the NFT and the winner;
7    end
8    else
9     Restore the contract to its original state.
10   end
11 end
12 else
13    Only the seed cotton owner can execute the function.
14    Restore the contract to its original state.
15 end

4.3. Delivery of Seed Cotton and Transfer of Title

Algorithm 3 details the delivery process and ownership transfer mechanism for seed cotton. At the end of the auction, the seed cotton owner executes the transportNFT function to initiate the delivery process, which requires the buyer’s Ether address and the token ID of the purchased seed cotton NFT as parameters. In the delivery process, the receiveRequest and rejectRequest functions are responsible for accepting seed cotton and handling rejections, where the rejectRequest function aims to ensure that the quality of the seed cotton delivered by the seller meets the agreed standards, to prevent the sale of poor-quality cotton. When the seller completes the physical delivery of the seed cotton and meets the preset conditions, the system will approve the formal transfer of ownership of the seed cotton NFT to the buyer via the approve-NFT transfer function. During this process, the ownership of the NFT associated with the current order is temporarily locked until the actual delivery to secure the transaction. After the buyer confirms the receipt of seed cotton of satisfactory quality, the receiveRequest function is called to unlock the transfer of ownership, thus completing the transfer of ownership of the seed cotton.
Algorithm 3: Transfer of ownership of seed cotton NFT
  Input: token ID, producers EA, Seed cotton owners EA
  Output: Emit SeedCottonNFTTransfer Event
  Require: Seed cotton token ∈ NFT token ID
1  if function caller = Seed cotton owners then
2    if Transfer amount = Seed cotton NFT Price then
3      Transfer of ownership of seed cotton NFT to the buyer;
4      Notify stakeholders of the new seed cotton ownership tokenID, buyerEA;
5      Announce the locking of the NFT transfer function until the seed cotton is
       delivered to the buyer;
6    end
7   else
8     Restore the contract to its original state.
9   end
10 end
11 else
13    Restore the contract to its original state.
14 end

4.4. Quality Certification

When the processing is completed, the lint is sent to the warehouse for inspection and the casting of the corresponding inspection certificate NFT; it needs to be associated with the corresponding cotton lint NFT binding. Algorithm 4 elaborates this process. First, the metadata of the cotton lint inspection certificate are uploaded to the IPFS. Then, the updateInspect function in the inspect NFT smart contract is called, which receives the NFT token ID of the inspection certificate to be updated, as well as the new CID of its stored content in the IPFS, as parameters. After the inspection certificate NFT is generated, the MSAB may execute the bindCertificate function to implement the binding between the two. This function requires the input of the lint NFT smart contract address, the token ID of the target lint NFT and the token ID of the newly minted inspection certificate NFT. It is worth noting that only the MSAB has the right to successfully call the inspect NFT function, ensuring that the integrity and traceability of the entire quality inspection and certification process are effectively maintained.
Algorithm 4: Cotton lint quality certification
  Input: token ID, lint NFT SC EA
  Output: Emit bindCertificate Event, CertificateNFT Event
1  if function caller = MSAB thena
2    if lintInspection)(metadataURI) then
3      Increase TokenID;
4      Define the lint inspection certificate NFT by current TokenID;
5      Assign the inspection EA as the NFT owner;
6      Set the token URI of the minted NFT to metadataURI;
7      Notify stakeholders of lint inspection NFT certificate casting, NFT owner EA
       and token URI;
8    end
9   else
10     Restore the contract to its original state.
11   end
12 end
13 else
14   Only the SAMS can execute the function.
15    Restore the contract to its original state.
16 end

5. Implementation Details

In this section, we present the exhaustive testing and validation of the proposed solution. The debugging and functional verification of the smart contract are designed and implemented in the Ethernet blockchain environment using the Remix IDE development tool and the Solidity programming language. All system participants and smart contracts are identified through uniquely assigned Ether addresses, and the specific mapping relationships are as shown in Table 1. The experiment covers four key phases: the NFT minting process; the auction mechanism; the ownership transfer operation; and the quality certification session.
Seed cotton harvesters pre-register and obtain a unique roll code for each batch of seed cotton through the MSAB system before harvesting. This coding system is the basis for the construction of a full chain traceability mechanism for seed cotton and is a requisite for the generation of the associated NFTs. Figure 5 shows the log of seed cotton owners successfully casting seed cotton NFTs through seed cotton rolls. In the smart contract design, the standard ERC721 contract inheritance mechanism from the OpenZeppelin library is used to implement the core functionality of the NFT. The logs also contain information about the triggering of the transfer event and the related parameters, an event that occurs during the creation of a new token and its transfer to a designated account. This is a key record for the confirmation of the generation of tokens and the change of ownership.
The seed cotton buyer can only send a request to participate in the auction through the market SC. The buyer can notify the stakeholders by entering the EA of the seed cotton owner and the seed cotton token ID to execute the BuySeedCotton function to successfully issue an event, as shown in Figure 6, which shows the log of the buyer’s successful bids on this batch of seed cotton. The end of the seed cotton auction is determined by whether or not the auction amount is higher than the preset amount, and the auction time must be reached within a specified period; see Figure 7 for the auction final winner log. After the end of the normal auction, the seed cotton owner executes the EndAuction function to announce the final winner and will wait to transfer the NFT ownership to the winner. The seed cotton owner ships the seed cotton by executing the SeedCottonShip function, waits for the buyer to confirm receipt of the shipment and then initiates the success shipment event, which changes the ownership of the digital twin seed cotton NFT to the buyer and notifies all participants of the transfer of ownership of the seed cotton, as shown in Figure 8.
The process used by the MSAB to cast NFT inspection certificates for cotton lint is similar to the process used to cast NFTs for seed cotton. The lint inspection certificate includes a quality inspection and weight inspection. Each bale of cotton lint obtains its own unique quality certification certificate. The certificate is uploaded to the IPFS. Then, the return of the metadata address is required for the generation of the cotton lint inspection certificate twin NFT. Upon executing the CertificateBound function, the lint NFT and lint inspection certificate NFT binding process begins, as shown in Figure 9. Once the binding is complete, a complete cotton lint quality traceability chain is formed to ensure the quality of the cotton lint with reliability certification.

6. Discussion

This section provides an in-depth analysis of the smart contract’s cost-effectiveness and the security performance of the designed solution, as well as a comparative study with existing solutions. In addition, we explore the solution’s generalisability and potential range of applications in different scenarios. Finally, it is shown how the approach can be generalised and applied to other related areas.

6.1. Cost Analysis

In this study, we perform a cost–benefit analysis of the gas consumption required to implement and deploy Ethernet smart contracts for the proposed solution. The focus is on evaluating the amount of GAS required by the different algorithms involved in the scenario to execute transactions and run the code on the Ethernet blockchain. Gas serves as a metric to measure the amount of work required to perform any operation on the blockchain—not as real money but as a unit of cost that users must pay when executing a smart contract or making a transaction. Through the gas mechanism, the Ethereum network can accurately calculate and quantify the costs of various operations, ensuring that users pay for the network resources that they occupy, including the execution cost of directly executing an operation and the transaction cost of confirming a transaction. The value of the gas cost is closely related to the execution time complexity and space complexity of the algorithm in the Ethernet Virtual Machine (EVM). In order to accurately estimate the actual gas usage limit of the smart contract, we conduct a series of simulation experiments using the Remix IDE. By repeatedly simulating the execution of Ether transactions and accumulating the transaction costs and execution costs during each transaction, we obtain comprehensive gas consumption estimations.
As of 19 January 2024, based on the ETH Gas Station (2024) data, the Gwei-priced gas fees on the Ether network were 20Gwei for slow execution, 20Gwei for average execution and 35Gwei for fast execution. When converted at the then prevailing exchange rate of 1 ETH = USD 2483.33, the unit prices corresponding to these three types of execution speeds would be approximately USD 0.000597, USD 0.000597 and USD 0.000869. Table 2 summarises the execution and transaction costs of the various functions within our solution, with the highest costs mainly arising from the smart contract deployment phase. This cost input is justified because smart contracts are deployed in the system on a one-off basis. Among them, the function mintNFT has the highest relative cost charges among the corresponding smart contracts, which are USD 11.17, USD 10.26 and USD 13.05, respectively. This is because they need to process the string information input provided by the user, thus incurring higher execution costs, in line with expectations. In contrast, the auctionStart function, which is the least expensive to implement and whose primary function is to announce the start of the auction to the stakeholders, is relatively simple and therefore requires a smaller cost.
When performing functions in an Ethereum blockchain environment, the gas costs are high and are associated with the high price volatility of Ethereum, which not only creates high cost pressures but also introduces the possibility of fee uncertainty and price instability. In contrast, private blockchains enable faster transactions and lower expenditures due to the high trust relationship between nodes and the fact that the transaction verification process does not need to involve all nodes. Compared to public chains that require consensus verification by most nodes, private chains show certain advantages in terms of economy and controllability, thus providing an alternative path to obtain relevant solutions. However, there are differences between private and public blockchains in terms of transparency, decentralisation and security. Therefore, in a practical application, the choice has to be carefully analysed and weighed according to the specific scenario.

6.2. Smart Contract Security Analysis

In this study, we explore the security analysis process of the proposed solution. Ensuring the security of the smart contract code is crucial, given that smart contracts written by Solidity can be at risk of potential attacks, flaws and vulnerabilities when executed on the blockchain and cannot be changed once deployed. Relying on the Remix IDE for essential syntax error detection is insufficient to secure smart contracts. For this purpose, we employ a specialised smart contract vulnerability detection tool called Oyente, which operates directly against the EVM bytecode and can identify and report potential security issues, such as DAO attack-like vulnerabilities. To ensure the supply chain’s (SC) security, we use Oyente to perform several security checks on the smart contracts, including checks for re-entry attacks, integer underflow, integer overflow and timestamp dependency. Figure 10 shows the results of the smart contract security analysis. All the security check results of the inspection NFT smart contract indicate the absence of a security risk, and its code coverage is 92.6%; higher coverage means that more code is scanned and verified. These smart contracts successfully avoid the effects of known attack methods and vulnerabilities through multiple security analyses and corresponding code revisions.
Our solution is built around the blockchain technology and is designed to provide a decentralised, tamper-proof and transparent means of managing information and data. Data integrity, as one of the vital security attributes of this scheme, provides a solid foundation for the trust mechanism between participants. All participants involved in the system, including the seed cotton owners, manufacturers, lint inspectors and end customers, interact through the Ethernet network. Whether for a small-scale auction transaction of seed cotton or a large-scale record of the flow of cotton lint, all transactional activity is stored in hash form on the blockchain ledger.

6.3. Comparison with Existing Programs

We compare our proposed solution with existing solutions based on blockchain and other areas of NFTs; see Table 3. The comparison criteria are the type of blockchain platform used, proof of ownership, auction and bidding, product delivery, non-fungible tokens, quality certification and off-chain storage systems.
In this study, we adopt the Ethernet blockchain platform as the technological foundation. This choice aligns with previous research practices in the literature [18,21,22,25]. Unlike previous solutions, we design an NFT that enables the effective management and control of product ownership by casting seed cotton, cotton lint and their corresponding quality inspection certificates. This design not only helps to improve the efficiency of the procurement and production processes throughout the cotton lint supply chain but also ensures that every step of the operation is accurately recorded and traced, an area that has yet to be addressed in other cases. In addition, our proposed system draws on the findings of [21,25] by allowing product owners to conduct auctions on their platforms and instantly publish the identifying information of the final highest bidder, thereby enhancing the transaction transparency and market liquidity. In contrast, some existing solutions do not provide such functionality to support users in similar asset flow activities. Moreover, our solution uniquely embeds the functionality of the quality inspection certificate NFT into the system architecture, using tokenisation to ensure the authenticity and non-tampering of the quality inspection data. Although the application of TPC certificates has been explored in the literature, such as in [24], our approach moves one step further by successfully realising the binding association between the physical lint and its corresponding lint NFT and inspection certificate NFT, constructing a complete [31] and authoritative chain of full product traceability and improving the transparency of the supply chain and the product quality level. Finally, addressing the problem of sufficient file storage, we refer to the research ideas of [21,22,25] and innovatively integrate off-chain storage technology into the system design, which effectively solves the problem of large-capacity data storage due to the characteristics of the blockchain itself and guarantees the efficient and stable operation of the system.

7. Conclusions

This study proposes a quality traceability system for the cotton lint supply chain that combines NFT technology and the blockchain architecture. The system is built on the Ethernet public blockchain foundation and employs the ERC721 standard smart contract mechanism. The design includes four key smart contract modules: NFT generation for seed cotton and processed cotton lint, quality control certificate NFT management, the automated execution of market transactions, the secure transfer of funds and the confirmation of asset delivery and the change of ownership. At the same time, we integrate an IPFS decentralised storage system to store large volumes of data efficiently and securely, ensuring information integrity and reducing on-chain storage costs. The feasibility and fine-grained operation of the programme are demonstrated by outlining the algorithmic processes of NFT casting, auction transactions, the transfer of ownership and quality certification. After a cost–benefit analysis, considering factors such as gas fees, it is found that adopting a private blockchain environment may be more economically efficient. In addition, a security assessment reveals the solution’s ability to withstand cyber-attacks and protect against potential security breaches. Compared to existing industry practices, our solution demonstrates significant advantages in terms of reliability, security, full traceability and information validation.
Our proposed blockchain-based solution demonstrates how blockchain and NFT technology can be used to trace cotton lint from the harvesting to the marketing stage. The designed smart contracts represent the different stages of the traceability system. By presetting the smart contracts, the system can automatically execute and validate each stage’s operations, ensuring the process’s correctness and the internal operations’ effectiveness. The non-comparability of blockchain technology ensures that, at every step of the operation, the data recorded by the system are accurate and reliable, and the effectiveness of the internal traceability process is high. As a digital voucher representing the unique identity and quality of cotton lint, the NFT can record all the key attributes and flow processes of the cotton lint and ensure the integrity of the information.
The traceability system is not only applicable to cotton lint. It may also be applied to other types of agricultural or manufacturing supply chain management. This could be achieved by adapting the specifications and terminology of smart contracts to the needs of new supply chains. The solution’s system architecture is versatile and scalable. It can be used as an essential reference for the construction of a new supply chain management system, in which the participant configurations, as well as the design of the NFT smart contracts, can be adapted to the specific needs of the new system.
Although applying blockchain and NFT technologies to the cotton lint supply chain meets the real-world needs, the actual implementation still needs to be improved. The primary technical conditions of enterprises, local policy attitudes, technological threats and legal regulation are yet to be addressed. In the future, we will develop front-end DApps. We plan to deploy this smart contract to a private blockchain, thus enabling complete translation and implementation from theory to practical application. At the same time, we will reflect on the policy recommendations and potential impacts of blockchain and NFTs as a disruptive technology applied to the cotton lint supply chain [33].

Author Contributions

Conceptualisation, L.W. and J.Z.; methodology, L.W.; software, L.W. and X.Z.; validation, W.S., C.L. and H.L.; formal analysis, W.S.; investigation, L.W. and C.L.; resources, H.L.; data curation, W.S.; writing—original draft preparation, L.W.; writing—review and editing, X.Z.; visualisation, J.Z.; supervision, W.S.; project administration, L.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Quality Tracing and Detection of Machine-Picked Cotton Based on Industrial Internet Logo Resolution (Natural Science Foundation of Xinjiang Province, Grant No. 2022A01009) and the Research and Development of Key Technology for Integration of All Elements of Industrial Internet of Things Identity Resolution (Natural Science Foundation of Xinjiang Province, Grant No. 2022B01049).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available upon request from the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Khan, M.A.; Wahid, A.; Ahmad, M.; Tahir, M.T.; Ahmed, M.; Ahmad, S.; Hasanuzzaman, M. World Cotton Production and Consumption: An Overview. In Cotton Production and Uses: Agronomy, Crop Protection, and Postharvest Technologies; Springer: Singapore, 2020; pp. 1–7. [Google Scholar]
  2. Tian, J.; Zhang, X.; Zhang, W.; Li, J.; Yang, Y.; Dong, H.; Jiu, X.; Yu, Y.; Zhan, Z.; Xu, S. Fiber Damage of Machine-Harvested Cotton before Ginning and after Lint Cleaning. J. Integr. Agric. 2018, 17, 1120–1127. [Google Scholar] [CrossRef]
  3. Delhom, C.D.; Indest, M.O.; Wanjura, J.D.; Armijo, C.B.; Boman, R.K.; Faulkner, W.B.; Holt, G.A.; Pelletier, M.G. Effects of Harvesting and Ginning Practices on Southern High Plains Cotton: Textile Quality. Text. Res. J. 2020, 90, 537–546. [Google Scholar] [CrossRef]
  4. Keung Kwok, S.; Wu, K.K.W. RFID-based Intra-supply Chain in Textile Industry. Ind. Manag. Data Syst. 2009, 109, 1166–1178. [Google Scholar] [CrossRef]
  5. Riemens, J.; Lemieux, A.-A.; Lassagne, M.; Lamouri, S. Apprehending Traceability Implementation in Support of Sustainable Value Chains: A Novel Analysis Framework for the Fashion Industry. J. Clean. Prod. 2023, 414, 137501. [Google Scholar] [CrossRef]
  6. Mejías, A.M.; Bellas, R.; Pardo, J.E.; Paz, E. Traceability Management Systems and Capacity Building as New Approaches for Improving Sustainability in the Fashion Multi-Tier Supply Chain. Int. J. Prod. Econ. 2019, 217, 143–158. [Google Scholar] [CrossRef]
  7. Kumar, V.; Koehl, L.; Zeng, X. A Fully Yarn Integrated Tag for Tracking the International Textile Supply Chain. J. Manuf. Syst. 2016, 40, 76–86. [Google Scholar] [CrossRef]
  8. Lai, R.S.Q.; Hsu, L.-L.; Chen, J.C.H. Green Supply Chain Management Systems: A Case Study in the Textile Industry. Hum. Syst. Manag. 2012, 31, 111–121. [Google Scholar] [CrossRef]
  9. Calzada, I. Blockchain-Driven Digital Nomadism in the Basque e-Diaspora. Globalizations 2023, 1–26. [Google Scholar] [CrossRef]
  10. Alves, B.; Schumacher, M.; Cretton, F.; Le Calvé, A.; Cherix, G.; Werlen, D.; Gapany, C.; Baeryswil, B.; Gerber, D.; Cloux, P. A Semantic-Web Oriented Traceability Solution Applied To The Textile Traceability. In Proceedings of the 15th International Conference on Enterprise information Systems (ICEIS 2013), Angers, France, 4–7 July 2013. [Google Scholar]
  11. Kazancoglu, I.; Kazancoglu, Y.; Kahraman, A.; Yarimoglu, E.; Soni, G. Investigating Barriers to Circular Supply Chain in the Textile Industry from Stakeholders’ Perspective. Int. J. Logist. Res. Appl. 2022, 25, 521–548. [Google Scholar] [CrossRef]
  12. Mitani, T.; Otsuka, A. Traceability in Permissioned Blockchain. IEEE Access 2020, 8, 21573–21588. [Google Scholar] [CrossRef]
  13. Lu, Y. The Blockchain: State-of-the-Art and Research Challenges. J. Ind. Inf. Integr. 2019, 15, 80–90. [Google Scholar] [CrossRef]
  14. Guidi, B.; Michienzi, A. From NFT 1.0 to NFT 2.0: A Review of the Evolution of Non-Fungible Tokens. Future Internet 2023, 15, 189. [Google Scholar] [CrossRef]
  15. Sunny, J.; Undralla, N.; Pillai, V.M. Supply Chain Transparency through Blockchain-Based Traceability: An Overview with Demonstration. Comput. Ind. Eng. 2020, 150, 106895. [Google Scholar] [CrossRef]
  16. Roth, M.; Lindskog, L. Controlling Sustainability in the Cotton Supply Chain. Bachelor’s Thesis, University of Gothenburg, Gothenburg, Sweden, 2012. [Google Scholar]
  17. Agrawal, T.K.; Kumar, V.; Pal, R.; Wang, L.; Chen, Y. Blockchain-Based Framework for Supply Chain Traceability: A Case Example of Textile and Clothing Industry. Comput. Ind. Eng. 2021, 154, 107130. [Google Scholar] [CrossRef]
  18. Pal, K. Internet of Things and Blockchain Technology in Apparel Manufacturing Supply Chain Data Management. Procedia Comput. Sci. 2020, 170, 450–457. [Google Scholar] [CrossRef]
  19. Bullón Pérez, J.J.; Queiruga-Dios, A.; Gayoso Martínez, V.; Martín del Rey, Á. Traceability of Ready-to-Wear Clothing through Blockchain Technology. Sustainability 2020, 12, 7491. [Google Scholar] [CrossRef]
  20. Bhuvaneshwarri, I.; Ilango, V. An Online Blockchain Based Sustainable Logistics Management System (OBSLMS) Enabled by the Internet of Things for the Textile Industry. Ind. Textila 2023, 74, 660–666. [Google Scholar] [CrossRef]
  21. Ahmed, W.A.H.; MacCarthy, B.L. Blockchain-Enabled Supply Chain Traceability in the Textile and Apparel Supply Chain: A Case Study of the Fiber Producer, Lenzing. Sustainability 2021, 13, 10496. [Google Scholar] [CrossRef]
  22. Hawashin, D.; Salah, K.; Jayaraman, R.; Musamih, A. Using Composable NFTs for Trading and Managing Expensive Packaged Products in the Food Industry. IEEE Access 2023, 11, 10587–10603. [Google Scholar] [CrossRef]
  23. Gebreab, S.A.; Hasan, H.R.; Salah, K.; Jayaraman, R. NFT-Based Traceability and Ownership Management of Medical Devices. IEEE Access 2022, 10, 126394–126411. [Google Scholar] [CrossRef]
  24. Musamih, A.; Yaqoob, I.; Salah, K.; Jayaraman, R.; Omar, M.; Ellahham, S. Using NFTs for Product Management, Digital Certification, Trading, and Delivery in the Healthcare Supply Chain. IEEE Trans. Eng. Manag. 2022. [Google Scholar] [CrossRef]
  25. Dos Santos, R.B.; Torrisi, N.M.; Pantoni, R.P. Third Party Certification of Agri-Food Supply Chain Using Smart Contracts and Blockchain Tokens. Sensors 2021, 21, 5307. [Google Scholar] [CrossRef] [PubMed]
  26. Alnuaimi, N.; Almemari, A.; Madine, M.; Salah, K.; Al Breiki, H.; Jayaraman, R. NFT Certificates and Proof of Delivery for Fine Jewelry and Gemstones. IEEE Access 2022, 10, 101263–101275. [Google Scholar] [CrossRef]
  27. Trautwein, D.; Raman, A.; Tyson, G.; Castro, I.; Scott, W.; Schubotz, M.; Gipp, B.; Psaras, Y. Design and Evaluation of IPFS: A Storage Layer for the Decentralized Web. In Proceedings of the ACM SIGCOMM 2022 Conference, Amsterdam, The Netherlands, 22–26 August 2022; pp. 739–752. [Google Scholar]
  28. Ko, K.; Jeong, T.; Woo, J.; Hong, J.W. Survey on Blockchain-based Non-fungible Tokens: History, Technologies, Standards, and Open Challenges. Int. J. Netw. Manag. 2024, 34, e2245. [Google Scholar] [CrossRef]
  29. Hu, T.; Liu, X.; Chen, T.; Zhang, X.; Huang, X.; Niu, W.; Lu, J.; Zhou, K.; Liu, Y. Transaction-Based Classification and Detection Approach for Ethereum Smart Contract. Inf. Process. Manag. 2021, 58, 102462. [Google Scholar] [CrossRef]
  30. Hasan, M.; Starly, B. Decentralized Cloud Manufacturing-as-a-Service (CMaaS) Platform Architecture with Configurable Digital Assets. J. Manuf. Syst. 2020, 56, 157–174. [Google Scholar] [CrossRef]
  31. Daniel, E.; Tschorsch, F. IPFS and Friends: A Qualitative Comparison of next Generation Peer-to-Peer Data Networks. IEEE Commun. Surv. Tutor. 2022, 24, 31–52. [Google Scholar] [CrossRef]
  32. Wu, K.; Ma, Y.; Huang, G.; Liu, X. A First Look at Blockchain-based Decentralized Applications. Softw. Pract. Exp. 2021, 51, 2033–2050. [Google Scholar] [CrossRef]
  33. Calzada, I. Disruptive Technologies for E-Diasporas: Blockchain, DAOs, Data Cooperatives, Metaverse, and ChatGPT. Futures 2023, 154, 103258. [Google Scholar] [CrossRef]
Figure 1. Proposed blockchain and NFT-based traceability architecture for cotton supply chain.
Figure 1. Proposed blockchain and NFT-based traceability architecture for cotton supply chain.
Applsci 14 01610 g001
Figure 2. The timing diagram depicting the interaction between the participants and the smart contract during the seed cotton harvesting phase.
Figure 2. The timing diagram depicting the interaction between the participants and the smart contract during the seed cotton harvesting phase.
Applsci 14 01610 g002
Figure 3. The timing diagram depicting the interaction between the participants and the smart contract during the cotton lint production phase.
Figure 3. The timing diagram depicting the interaction between the participants and the smart contract during the cotton lint production phase.
Applsci 14 01610 g003
Figure 4. The timing diagram depicting the interaction between the participants and the smart contract during the lint delivery phase.
Figure 4. The timing diagram depicting the interaction between the participants and the smart contract during the lint delivery phase.
Applsci 14 01610 g004
Figure 5. A demonstration of seed cotton owners successfully casting seed cotton NFT logs through seed cotton rolls.
Figure 5. A demonstration of seed cotton owners successfully casting seed cotton NFT logs through seed cotton rolls.
Applsci 14 01610 g005
Figure 6. The purchaser’s success in bidding on this batch of seed cotton logs.
Figure 6. The purchaser’s success in bidding on this batch of seed cotton logs.
Applsci 14 01610 g006
Figure 7. The log of the highest bidder at the end of the auction.
Figure 7. The log of the highest bidder at the end of the auction.
Applsci 14 01610 g007
Figure 8. The successful transfer of the seed cotton by the seed cotton owner.
Figure 8. The successful transfer of the seed cotton by the seed cotton owner.
Applsci 14 01610 g008
Figure 9. The successful binding of the lint NFT to the lint inspection certificate NFT.
Figure 9. The successful binding of the lint NFT to the lint inspection certificate NFT.
Applsci 14 01610 g009
Figure 10. Smart contract security analysis report using Oyente.
Figure 10. Smart contract security analysis report using Oyente.
Applsci 14 01610 g010
Table 1. Participants’ Ether addresses.
Table 1. Participants’ Ether addresses.
NameEthernet Addresses
cotton farmer0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2
producer0x5B38Da6a701c568545dCfcB03FcB875f56beddC4
warehouse 0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db
MSAB0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB
Table 2. Gas cost analysis of smart contract execution functions.
Table 2. Gas cost analysis of smart contract execution functions.
ContractFunctionCost (Gas)Cost (ETH)Cost (USD)
SeedCottonNFTdeployment523,4400.010525.99
mintNFT224,9710.004511.17
approvalTransfer51,8290.00102.57
setBuyer53,7510.00112.67
LintNFTdeployment638,7570.012831.72
mintNFT206,4810.004110.26
approvalTransfer54,9250.00112.73
setBuyer51,6680.00102.57
Marketdeployment433,1170.008721.51
auctionStart43,5630.00092.16
bidPlaced155,5810.00317.73
auctionEnded87,2350.00174.32
shipment64,9200.00133.22
InspectionNFTdeployment412,0050.008220.46
bindCertificate54,3640.00112.70
mintNFT262,8470.005313.05
approvalEnquiry112,5820.00235.59
Table 3. Comparison of our solution with existing solutions in other fields.
Table 3. Comparison of our solution with existing solutions in other fields.
Our Work1821222425
Blockchain platformEthereumEthereumEthereumEthereumN/SEthereum
Proof of ownershipYesNoNoYesNoYes
Auction and biddingYesNoYesNoNoYes
Product deliveryYesYesYesYesNoYes
Non-fungible tokensYesNoYesYesYesNo
Quality certificationYesNoNoNoYesNo
Off-chain storage YesNoYesYesNoYes
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, L.; Sun, W.; Zhao, J.; Zhang, X.; Lu, C.; Luo, H. A Non-Fungible Token and Blockchain-Based Cotton Lint Traceability Solution. Appl. Sci. 2024, 14, 1610. https://doi.org/10.3390/app14041610

AMA Style

Wang L, Sun W, Zhao J, Zhang X, Lu C, Luo H. A Non-Fungible Token and Blockchain-Based Cotton Lint Traceability Solution. Applied Sciences. 2024; 14(4):1610. https://doi.org/10.3390/app14041610

Chicago/Turabian Style

Wang, Lixin, Wenlei Sun, Jintao Zhao, Xuedong Zhang, Cheng Lu, and Hao Luo. 2024. "A Non-Fungible Token and Blockchain-Based Cotton Lint Traceability Solution" Applied Sciences 14, no. 4: 1610. https://doi.org/10.3390/app14041610

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop