# A Non-Fungible Token and Blockchain-Based Cotton Lint Traceability Solution
## 3 Proposed Solution
### 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. Figure 2: The timing diagram depicting the interaction between the participants and the smart contract during the seed cotton harvesting phase. 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.