Abstract
The agricultural sector is a vital component of Bangladesh's economy, but its agri-food supply chain faces signifi-cant inefficiencies primarily due to the involvement of numerous intermediaries. This complexity not only reduces the profits for farmers but also affects the overall transparency and efficiency of the supply chain. This study aims to em-ploy blockchain technology to transform the traditional agri-food supply chain in Bangladesh, focusing on increasing transparency, enhancing efficiency, and improving profitability for farmers, thus potentially bolstering the entire agri-food ecosystem in the country. The research involves setting up a blockchain-based smart contract on the Ethereum Blockchain network. This approach guarantees that all transactions within the agri-food supply chain are transparent, traceable, and accountable. Additionally, the study develops a web application to facilitate user interaction with the smart contract, enhancing accessibility and usability. Performance analysis and testing of the implemented smart con-tract demonstrate its capability to handle a significant volume of transactions without compromising on performance. The solution effectively reduces the dependency on intermediaries, thereby increasing the profit margins for the farm-ers involved. The integration of blockchain technology in the agri-food supply chain has shown promising results in enhancing transparency and efficiency. It lays a solid foundation for future improvements and suggests a scalable model that could be applied to other sectors within the country to further enhance agricultural practices and economic growth.
Keywords: Agri-food value chain, Traceability, Blockchain, Ethereum, Smart contract, Dapps
1. Introduction
Bangladesh's economy is deeply rooted in agriculture, which occupies approximately 58.9 % of the land and employs about 50.28 % of the labor force, contributing 19.10 % of the GDP [1,3]. Despite agriculture's substantial role, supporting over half the population and contributing significantly to the national economy, the sector faces critical challenges. These include inefficiencies and opacity within the agri-food supply chain that adversely affect the livelihoods of smallholder farmers. The traditional supply chain is fraught with inefficiencies that disadvantage stakeholders, especially small-scale farmers who receive unfair prices and face significant losses due to a complex network of intermediaries. These intermediaries enforce price disparities—buying low from producers and selling high to consumers—leading to diminished returns for farmers and raising concerns about the quality and safety of food products [1,2].
Furthermore, the lack of transparency and traceability within the supply chain obscures profit flows and compro-mises food security. This opacity is exacerbated by the prevalence of unfair trade practices and the inefficiency in logistics and payment processes. Approximately 84 % of the rural population is dependent on agriculture, yet many farmers live below the poverty line, struggling with inadequate availability, distribution, and accessibility of agri-food products [1,3,8]. This study is motivated by the transformative potential of blockchain technology, known for ensur-ing transparency and security in transactional environments. Blockchain's capabilities in facilitating immutable and transparent record-keeping make it an ideal candidate to enhance supply chain operations, ensuring that stakeholders, particularly smallholder farmers, achieve better market access and fairer prices [5,10].
In this work a blockchain-based agri-food supply chain model [26] is introduced and a web application interface designed using solidity and smart contract, which will ensure transparency and traceability, accountability, and price control. The capacity of blockchain to achieve consensus among participants without relying on a central authority is one of its fundamental characteristics. This is accomplished through various consensus processes such as Proof of Work (PoW), Proof of Stake (PoS), or other consensus algorithms. Consensus ensures that all participants agree on the legitimacy and sequencing of transactions, hence avoiding fraudulent or harmful activity [6].
Additionally, we have analyzed and implemented a blockchain-based agri-food supply chain model, which would help minimize the price disparity and make the supply chain system transparent, ensuring traceability and account-ability. This solution for a blockchain-based supply chain model is implemented using an Ethereum smart contract [7] and a web application to ensure one-to-one communication, transparency, an autonomous transaction system, end-to- end supply chain distribution, and security for tracking the whole process of each transaction. The web application is decentralized, and every piece of information is highly secured because of the consensus algorithm. Following are the major contributions of this work:
-
•
Comprehensive Blockchain-Based Agri-Food Supply Chain Model: This research introduces a blockchain-based model that effectively addresses the inefficiencies and lack of transparency in traditional agri-food supply chains. By leveraging blockchain technology, the model enhances transparency, traceability, and accountability across the entire supply chain.
-
•
Inclusion of System Administrator and Inspection Team: The model introduces the roles of a system administra-tor and an inspection team, which are essential for maintaining operational integrity and product quality within the supply chain. The system administrator oversees the entire blockchain system, ensuring smooth operation and addressing any issues that arise. Meanwhile, the inspection team is responsible for verifying the quality and safety of products at various stages of the supply chain, further enhancing trust and accountability.
-
•
Government Oversight and Price Control: The proposed model includes government oversight mechanisms for regulating pricing and ensuring fairness in transactions across the supply chain. By incorporating government representatives and price control policies, the system promotes greater transparency and equitable pricing. This feature ensures that producers are fairly compensated, and consumers benefit from reasonable market prices, creating a more balanced and sustainable economic environment within the agri-food sector.
-
•
Implementation of Ethereum Smart Contract and Decentralized Web Application: The study thoroughly details the development and integration of an Ethereum smart contract with a decentralized web application. The smart contract ensures secure, transparent, and immutable transactions, while the web application provides user-friendly features such as real-time one-to-one communication, autonomous transaction execution, end-to- end supply chain distribution, and secure tracking of every transaction. This dual implementation demonstrates the model's practicality, scalability, and real-world applicability.
-
•
Comprehensive Performance Analysis and Scalability Testing: A rigorous performance analysis and testing of the smart contract were carried out to assess the system's efficiency, scalability, and overall performance. The evaluation focused on key aspects such as gas consumption, transaction time, and system reliability. The insights gained from these tests offer valuable guidance for replicating the proposed approach in similar agri-food contexts, ensuring that the system remains viable under various operational conditions.
The structure of this paper is organized as follows: Section 2 delves into the motivation behind our study, laying the groundwork for our research focus. In Section 3, we explore related work, providing a comprehensive overview of existing literature and studies pertinent to our topic. Section 4 details the Proposed Architecture of our system, explaining the foundational design and structural elements. The implementation of the smart contract and web ap-plication is thoroughly discussed in Section 5, where we describe the practical aspects of our model's deployment. Section 6 is dedicated to the performance analysis, where we assess the efficiency and effectiveness of our imple-mented system. In Section 7, we engage in a discussion about the limitations of our study and explore potential avenues for future research. Finally, Section 8 concludes the paper, summarizing key findings and underscoring the implications of our work for future developments in the field.
2. Motivation
Bangladesh's agricultural sector, integral to the national economy, is hampered by a complex and inefficient agri-food supply chain that significantly diminishes the economic benefits for farmers. As illustrated in Fig. 1, the traditional supply chain involves multiple layers of intermediaries—from processors to wholesalers—who often en-gage in practices that disadvantage the primary producers. These intermediaries negotiate aggressively to lower purchase prices while delaying sales to manipulate market prices, creating artificial shortages to maximize their prof-its at the expense of both producers and consumers [9,30]. The lack of transparency and traceability in the supply chain complicates the verification of product origins and quality, leading to significant challenges in maintaining food safety standards. The current system's documentation is often inconsistent and unreliable, with critical data frequently getting lost or misrepresented [30]. This inefficiency is exacerbated by the numerous intermediaries involved, each adding a markup that inflates prices and reduces the farmers' share of the final retail price, often forcing them to operate at a loss. Furthermore, the traditional method of tracing agri-food products is labor-intensive and prone to errors, making it difficult for retailers to guarantee the quality of the products they sell. This systemic opacity not only affects consumer trust but also undermines the economic stability of the entire supply chain [4,5].
Fig. 1.
Business process of traditional agri-food supply chain.
In response to these challenges, this work proposes a blockchain-based model for the agri-food supply chain in Bangladesh. By leveraging blockchain technology, the model aims to enhance transparency and efficiency, signif-icantly reducing the need for intermediaries. This system will ensure that all transactions are recorded immutably, providing a reliable and accessible digital ledger that enhances traceability from farm to table. This improvement is expected to stabilize prices, improve payouts to farmers, and ensure that consumers receive high-quality products at fair prices [5]. Its modular architecture allows for customization through smart contracts that can be tailored to fit the specific needs of various supply chains, from tracking rice production to managing dairy logistics. By incorporating diverse actors such as farmers, inspection teams, and logistics companies, the system can accommodate additional roles needed in different sectors, such as agricultural inspectors for rice or cold-chain monitors for milk. The system's decentralized nature ensures that new roles and processes can be integrated smoothly, allowing for seamless traceabil-ity and communication between stakeholders. For instance, the rice industry could use the system to track the quality and quantity of grain at each stage—from harvesting to processing—while ensuring transparency and reducing price manipulation by intermediaries. On the other hand, the dairy sector could use blockchain to ensure strict temperature control throughout the cold chain, monitoring freshness and compliance with food safety regulations.
3. Related works
In our research, we conducted a comprehensive review of existing literature in the field of blockchain technology applied to agri-food supply chains. We examined various research papers that specifically addressed crucial aspects within the agri-food value chain, focusing on transparency, traceability, security, and the integration of emerging technologies.
3.1. Challenges in traditional agricultural supply chains
Agricultural producers often encounter numerous challenges and difficulties in their occupation, as highlighted in Ref. [11]. One significant issue arises from the involvement of intermediaries, which can lead to the dissemination of mis-information and result in losses for producers. Traditional supply chains rely heavily on these intermediaries, leading to a lack of transparency, accountability, and auditability [12]. These conventional systems exhibit shortcomings that undermine trust among stakeholders and hinder efficient supply chain management.
3.2. Blockchain solutions for transparency and traceability
The implementation of blockchain technology presents a viable solution to address these problems. Blockchain, as an authentic and tamper-proof data ledger, offers transparency and decentralization in the transfer of data and information [11]. Incorporating blockchain technology into the agricultural sector offers significant advantages for enhancing the traceability of food products and aligning stakeholders—from producers to consumers—in a unified system for managing ownership data and ensuring scalability. This technological infusion is poised to revolutionize e-commerce and catalyze the emergence of startup companies, potentially expanding the availability of agri-food products significantly [15].
Baralla et al. [42] propose a blockchain-based traceability system using Hyperledger Sawtooth, focusing on the ”farm-to-fork” (F2F) model currently implemented in the European Union. The system allows consumers to trace product origins and verify quality via QR codes, while ensuring access is restricted to legitimate participants through permissioned blockchain membership. Cocco et al. [43] explored the use of Self-Sovereign Identity (SSI) with blockchain and Interplanetary File System (IPFS) for managing food certifications in a decentralized manner. By leveraging the Ethereum blockchain, the system provides transparency and traceability for certifications, ensuring compliance with technical standards and secure access to food supply chain data. Another case study by Cocco et al. [44] focuses on using blockchain and IoT to ensure the traceability of the Carasau bread supply chain in Italy. The system employs RFID tags and sensors to automate data collection, ensuring product quality and minimizing data tampering risks.
3.3. Smart contracts in agriculture
Smart contracts enhance the capabilities of blockchain by automating transactions and enforcing agreements with-out the need for intermediaries. The utilization of smart contracts within blockchains enables parties with no estab-lished trust to engage in transactions securely [11]. In the agricultural supply chain context, the author in Ref. [12] advo-cates for the utilization of the Ethereum blockchain network to develop blockchain-based systems and smart contracts. These technological advancements enable the recording of transactions on the blockchain and the uploading of data to an Interplanetary File System (IPFS).
A novel approach is introduced in Ref. [16] to expedite the creation and customization of Ethereum-based smart con-tracts for the agri-food industry. This method ensures that code and modules can be reused, reducing development time while upholding security and reliability standards. The objective is to establish a semi-automated system capable of generating user interfaces to interact with the smart contracts and manage the system. Prashar et al. [46] proposed a blockchain-based system that eliminates the need for intermediaries in agricultural supply chains, relying on smart contracts to manage transactions and ensuring a cost-effective, secure traceability process. The system achieved a throughput of 161 transactions per second, demonstrating its effectiveness in ensuring food safety in India.
3.4. Security concerns and solutions
While blockchain technology offers numerous benefits, it also introduces specific security concerns. The im-mutability of smart contracts makes them vulnerable to security risks since they cannot be altered once implemented [13]. Additionally, the open-source nature of smart contracts increases their susceptibility to vulnerabilities, thereby reducing the cost for potential hackers to launch attacks. The rapid growth of smart contracts introduces flaws, such as poor coding practices, which can lead to loopholes.
To tackle these challenges, the proposed framework in Ref. [13] utilizes consortiums and smart contracts to track and trace the workflow of agricultural food supply chains. The framework successfully incorporates disintermediation and QR codes to trace information about agricultural products. The authors of [13] also express their interest in integrating decentralized automated payment using a blockchain-based supply chain while ensuring the accuracy of data exchanges.
Zhang et al. [45] introduced a blockchain-based safety management system for the grain supply chain, addressing challenges like long life cycles, complex links, and information heterogeneity. Their system uses a multimode storage mechanism combining on-chain and off-chain storage, providing real-time tracking and efficient sharing of hazardous-material information. Lin et al. [47] proposed a blockchain system combined with EPC Information Services (EPCIS) to address food safety issues, enabling accurate data recording and preventing tampering throughout the supply chain. The system also uses an on-chain and off-chain data management approach, ensuring efficient traceability without overloading the blockchain.
3.5. Integration with AI and IoT
The integration of artificial intelligence (AI) and blockchain technologies across various sectors is exemplified in frameworks like Ai-Chain [39], which combines deep learning with blockchain to enable secure, distributed sharing of learning outcomes among network edges. Ai-Chain introduces a novel proof of learning (PoL) consensus protocol that treats training processes as puzzles, enhancing intelligence sharing despite challenges such as heterogeneity and lack of trust among network edges. Furthermore, these technologies are applied to electric vehicle (EV) charging infrastructures [40], optimizing charging schedules and addressing vulnerabilities for a more secure, efficient, and decentralized system. Advanced modeling techniques, such as the Takagi-Sugeno-Kang (TSK) fuzzy system [41], also benefit from this integration, employing IF-THEN fuzzy rules for effective modeling of complex dynamical systems. Tang et al. [49] reviewed the potential of blockchain and IoT technologies in African agricultural food supply chains, examining their role in preventing food fraud and contamination. While highlighting the transformative potential of these technologies, the study also identified challenges like scalability and cost-effectiveness that need to be addressed for widespread adoption.
3.6. Novel approaches and future directions
In the research outlined in Ref. [17], the authors introduce a novel algorithm designed to enhance the traceability and security of the agricultural supply chain through blockchain technology. This algorithm allows users to retrieve product information by searching a blockchain database where product data is securely stored. The primary advantage of this approach is the resistance of these records to tampering and manipulation, thus ensuring the integrity and reliability of the data. The farming and agriculture industries heavily rely on producers, who unfortunately often fail to achieve their expected profits. To address this issue, the authors in Ref. [10] introduced the Blockchain-based Producer- Consumer Model (BPCM). This model aims to enhance farmers’ profitability while reducing the cost of products for consumers. By leveraging smart contracts and eliminating intermediaries, the BPCM enables farmers to directly sell their products to consumers, thereby increasing their profits.
The conventional agri-food supply model faces challenges such as centralized management, data security con-cerns, and the risk of unauthorized data injection [21]. To address these issues, the authors propose a blockchain-based model for storing and querying agri-food product information. The researchers introduce a dual storage mechanism, where both the blockchain network and database are encrypted, ensuring a tamper-proof system and enhanced data security. Additionally, to facilitate data tracing, the researchers have developed a smart contract that incentivizes network nodes to upload traceability data.
Machine Learning Agricultural Supply Chain (ML-ASC) helps handle issues including low crop production, un-healthy soil, and disease management while boosting the industry's overall efficiency [37]. This is a data-driven approach, thus practitioners must handle technological issues like data security and standardization. However, this strategy has nothing to do with intermediaries and cannot promise farmers a better price gain. We also found an IoT-based agriculture supply chain model that incorporates software, hardware, and a central database for product pur-chasing and distribution, implementing RFID tags for commercial product management and vibrational spectroscopy for food quality and authenticity assessment [38]. However, this solution is unable to deliver system transparency, and the gap between producer and consumer remains, so the possibility of price disparity and security issues for the software and central databases such as Distributed Denial of Service (DDoS) and SQL Injection (SQLi) remain.
For these reasons, we have settled on developing a comprehensive solution based on blockchain technology, where all the possible problems can be addressed and improved outcomes can be attained. However, for improved quality, some characteristics of other systems, such as ML-ASC, could be added to the model we recommend in the future.
3.7. Summary of key focus areas
Given the complexity and breadth of challenges and innovations associated with implementing blockchain tech-nology in the agricultural sector, Table 1 provides a structured summary of key focus areas and research directions.
Table 1.
Summary of blockchain technology in agricultural supply chains.
| Key Focus | Summary | References | |
|---|---|---|---|
| Challenges in Traditional Supply Chains | Issues with intermediaries leading to misinformation and lack of transparency. | [11,12] | |
| Blockchain for Trans-parency and Traceability | Blockchain enhances transparency, traceability, and re-duces need for intermediaries, building trust among all parties. | [11],[22], [42], [44] |
[15], [43], |
| Smart Contracts in Agricul-ture | Utilization of smart contracts to secure transactions, au-tomate enforcement, and eliminate intermediaries in the agri-food supply chain. | [12,13], [16,46],[24] |
|
| Security Concerns and Solu-tions | Addressing security vulnerabilities associated with smart contracts and enhancing security in blockchain imple- mentations. | [13], [47],[25] |
[45], |
| Integration with AI and IoT | Combining blockchain with AI and IoT to improve trace-ability, efficiency, and productivity in agriculture. | [17],[23], [40],[48], [49] |
[39], [41], |
| Novel Approaches and Fu-ture Directions | Innovative blockchain applications and identification of areas for future research, such as enhancing security, in- tegrating decentralized payments, and addressing limita- tions in current systems. | [10], [18], [21], [38] |
[17], [20], [37], |
3.8. Our contribution
In our previous study [26], we introduced a conceptual blockchain-based agri-food supply chain model designed to eliminate intermediaries and ensure fair pricing mechanisms for producers. While this conceptual model laid the groundwork for improving transparency and profitability, the current paper expands significantly on that framework by incorporating a more comprehensive blockchain system, utilizing Ethereum smart contracts and a decentralized web application. This new system not only enhances traceability and accountability but also increases operational efficiency and profitability for all participants in the supply chain.
Our current research makes several key advancements over the original model. First, we have integrated a fully.
developed web application interface that allows users to interact with smart contracts directly, providing greater ac-cessibility and ease of use. Additionally, we conducted performance analysis and testing on the smart contracts, specifically focusing on gas consumption and transaction time, to ensure scalability and efficiency. Security has also been improved with the use of consensus algorithms such as Proof of Work (PoW) and Proof of Stake (PoS) to mit-igate fraudulent activities. Furthermore, new actors such as a system administrator and inspection team have been introduced to oversee product quality and system operations. The model also incorporates government oversight to regulate price control and ensure fairness, offering a robust solution for the modern agri-food supply chain.
4. Blockchain-based agri-food supply chain model
In this section, we aim to address the details of a blockchain-based agri-food supply chain model by comparing it to the traditional supply chain model. The methodology for implementing the proposed blockchain-based supply chain model is developed by incorporating insights from the traditional agri-food supply chain model. The primary objective is to overcome the significant drawbacks of the traditional model and establish an efficient and transparent system that ensures fair pricing across all segments of the value chain in Bangladesh. In the following sections we present an overview of the (a) analysis of the traditional Agri-food supply chain model, (b) details of the Blockchain-based Model, and (c) smart contracts for the proposed Model.
4.1. Analysis of traditional agri-food supply chain model
In the traditional agri-food supply chain model, the producer sells agri-food products directly to the intermedi-aries [26]. The intermediaries store them in their warehouses. Later, they sell those stored agri-food products to the retailers, and the consumer purchases them. These agri-food products are shipped with the help of any logistics com-pany. The traditional agri-food supply chain has several intermediaries who tend to increase the price of the products by creating an artificial crisis in the market. As a result, the producer does not get any profits but mostly the interme-diaries receive the highest profits. Our proposed model differs from the traditional agri-food supply chain model in several cases. In the traditional agri-food supply chain, there are numerous stakeholders available but in our proposed model, the number of stakeholders will be minimized to form a realistic and simple chain between the producers to consumers.
The traditional agri-food supply chain has been affected by a lack of transparency, leaving consumers in the dark when it comes to monitoring and getting updates on agri-food products. In this work, the proposed approach seeks to address this issue by empowering consumers with a seamless system that enables effortless tracking of any agri-food product. In the traditional system, consumers often find themselves with limited visibility into the entire process of tracking agri-food products, which inevitably gives rise to concerns regarding the quality and quantity of the items they purchase.
Another critical issue in the traditional agri-food supply chain is the lack of effective pricing control. This issue leads to frequent price disparities between producers and consumers. However, our model takes a different approach by introducing a comprehensive pricing control mechanism, overseen by our diligent system administrator. By im-plementing a monetized pricing system, we not only strive to foster fairness but also aim to minimize losses for both producers and consumers, thereby establishing a more equitable and controlled pricing structure.
Furthermore, the traditional agri-food supply chain system is marred by inherent vulnerabilities, especially when it comes to data security and integrity. The risk of corruption and data tampering remains large, posing significant challenges to the overall integrity of the system. In recognition of this, this model focuses the power of cutting-edge blockchain technology and employs the ECDSA algorithm [8] to fortify the system against such risks. Through this approach, we ensure that data and information remain untampered and secure, instilling confidence in consumers and stakeholders alike. By actively addressing the pressing concerns of transparency, quality assurance, pricing control, and data security, our model represents a substantial leap forward from the limitations inherent in the traditional agri-food supply chain.
4.2. Blockchain-based model
The blockchain-based agri-food supply chain model introduces a new structure that deviates from the traditional model. Fig. 3 shows the detailed architecture of the blockchain-based model. In Fig. 2 the system is illustrated in UML use case diagram. One key element of this model is the inclusion of an inspection team, which assumes the responsibility of assessing the quality of agri-food products before they proceed along the subsequent supply
Fig. 3.
Blockchain-based model.
Fig. 2.
Uml use case diagram of proposed model.
chain. The inspection team's pivotal role involves approving products that meet the predefined standards of quality and quantity, ensuring only the finest items progress further. Additionally, the system administrator is an essential component of this approach. The system administrator can actively monitor all transactions within the agri-food supply chain model. This includes monitoring the negotiation process of the purchase policy among the various stakeholders involved. Furthermore, the system administrator acts as a point of contact to address any specific issues that may arise during the supply chain process.
To ensure the know your customer(KYC) policies [28], a central database is employed to store stakeholders’ infor-mation and validate their identities. The decision to introduce a centralized database for managing the access control system is a strategic and practical choice, motivated by the need for efficiency, scalability, and cost-effectiveness. While blockchain offers increasing transparency, immutability, and security, its on-chain data storage costs are notori-ously high and can become prohibitive, especially as transaction volumes increase. In contrast, centralized databases are well-suited for handling large volumes of data efficiently and at a much lower cost.
By opting for a centralized database, we strike a balance between leveraging blockchain's strengths for critical, trust-dependent operations (like transaction records and smart contract execution) and utilizing an optimized solution for data management. This hybrid approach allows us to store essential data, such as user credentials and access controls, in a more traditional database that can be quickly accessed and easily updated without incurring the high costs of on-chain storage. Furthermore, this ensures that off-chain data remains secure and easily manageable while he blockchain handles the verification and transparency aspects that are vital for system integrity.
The proposed model encompasses six crucial stakeholders, each playing a significant role in the agri-food supply chain. Following are the stakeholders and their contributions:
-
•
Producers: Producers are responsible for manufacturing and providing the agri-food products. They initiate the process by creating requests, producing the goods, and obtaining necessary certifications for quality assurance.
-
•
Inspection Teams: The inspection teams play a vital role in assessing the quality of the agri-food products. They verify and examine the products based on predefined standards, ensuring that only high-quality goods proceed through the supply chain.
-
•
Logistics Companies: Logistics companies handle the transportation and delivery of the agri-food products. They facilitate the smooth movement of goods from producers to retailers, ensuring timely and secure delivery.
-
•
Retailers: Retailers are the intermediaries between producers and final consumers. They place orders for the desired agri-food products, manage inventory, and offer the products to consumers through physical or online stores.
-
•
Final Consumers: Final consumers are the end-users of the agri-food products. They purchase and consume the products for personal use or further distribution. Their satisfaction and trust in the quality and pricing of the products are crucial for the success of the supply chain.
-
•
System Administrator: The system administrator oversees the entire operation and ensures the smooth function-ing of the proposed model. They monitor transactions, handle authentication, manage the database, and resolve any potential issues that may arise.
An integral aspect of the model is the involvement of a government representative as inspection teams who over-sees and acknowledges the entire transaction process. This ensures that the pricing of agri-food products remains fair and regulated. The presence of a government representative adds an additional layer of accountability and trans-parency, mitigating the risk of price manipulation or unfair practices within the supply chain. This active supervision promotes trust among stakeholders and encourages equitable pricing practices throughout the system.
The blockchain-based approach follows a clear schema that outlines the flow of interactions between stakeholders within the agri-food supply chain. Following are the main steps involved in this schema:
-
•
Producer: The producer initiates the process by manufacturing products and submitting a request to the in-spection team for quality verification and examination. This step ensures that the products meet the required standards.
-
•
Inspection Team: The inspection team evaluates the product's quality and, if suitable, issues an inspection certificate to the producer. This certification serves as proof that the product has met the necessary quality criteria.
-
•
Producer Advertisement: Upon receiving the inspection certificate, the producer creates an advertisement de-tailing the quantity and price of the product. This advertisement acts as an offer to potential retailers.
-
•
Retailer Request: Retailers interested in purchasing the product can submit a request specifying the desired quantity. The retailer's request indicates their intention to buy a certain amount of the product.
-
•
Producer Approval: The producer reviews the retailer's request and, upon approval, confirms the order for the specified quantity of the product. This confirmation signals the agreement to sell the product to the retailer.
-
•
Retailer-Led Logistics: After the order confirmation, the retailer engages with the logistics company to arrange for the shipping of the purchased products. The logistics company ensures the products are delivered safely to the retailer.
-
•
Transaction Chain: Every successful transaction between the stakeholders creates a chain within the system, documenting the various steps and interactions involved in the supply chain process. This chain of transactions contributes to the overall transparency and traceability of the agri-food supply chain.
In summary, blockchain-based agri-food supply chain model brings forth a range of innovative features that con-tribute to its overall effectiveness. The incorporation of an inspection team and system administrator bolsters quality control measures and streamlines the transaction process. The utilization of a central database facilitates secure au-thentication and reduces fraudulent activities. Moreover, the involvement of government oversight ensures fairness and transparency in pricing. Together, these elements synergistically enhance the model's ability to deliver improved quality assurance, risk mitigation, stakeholder authentication, and equitable pricing throughout the entire agri-food supply chain.
4.3. Smart contracts for the proposed model
The system architecture deployed based on the blockchain-based model is incorporated by a smart contract-based architecture. It helps to manage permissions and interactions within the blockchain network. Smart contracts are used instead of traditional access control mechanisms because they offer a decentralized, transparent, and automated way to enforce rules without intermediaries. This eliminates the need for manual oversight and ensures that all actions, such as transactions or data access, are executed based on predefined conditions encoded within the contract. By using smart contracts, we ensure that the rules are automatically and securely enforced, reducing the potential for manipulation or unauthorized access.
Each stakeholder, whether a producer, logistics company, or retailer, is assigned distinct privileges within the smart contract. These permissions are hardcoded into the contract, ensuring that only authorized users, verified.
Algorithm 1
New Request From Producer
1: Procedure createRequest(… params) 2: params[0]←productName 3: params [1]←description 4: params [2]←price 5: params [3]←unit 6: struct Request 7: $productName: String 8: $description: String 9: $price: uint 10: $unit: String 11: $approved: bool 12: $sold: bool 13: $buyer: address 14: $distributor: address 15: $importerRequest: mapping(address = bool) 16: $logisticRequest: mapping(address = bool) 17: end struct 18: Request←newRequest 19: if msg.sender = = AuthorizedUser then 20: newRequest[$productName]←params[0] 21: newRequest[$descrption]←params [1] 22: newRequest[$price]←params [2] 23: newRequest[$uint]←params [3] 24: newRequest[$approved]←f alse 25: newRequest[$sold]←f alse 26: newRequest[$buyer]←0 × 0 27: newRequest[$distributor]←0 × 0 28: end if 29: requests.push(newRequest) 30: end Procedure
Algorithm 2
Approve Request By Inspector
1: Procedure approveRequest(… params) 2: params[0]←index 3: request = requests[params[0]] 4: Require: request.approved ≠ true 5: if msg.sender has administrative access then 6: request.approved = true 7: end if 8: end Procedure through their cryptographic signatures, can execute specific functions, such as submitting or approving transactions. Access is granted based on the user's private key, ensuring secure and authenticated interaction with the contract.
In this context, we present seven essential functions that play a crucial role in ensuring the successful completion of transactions. Function overview for smart contract is presented in Table 2.
The first function, createrequest(), facilitates the initiation of a new request from producers within the blockchain network. This function enables producers to submit their requests for further processing. Next, createInspection- Request() comes into play, enabling producers to initiate inspection requests to the dedicated inspection team. This function streamlines the process of quality control and ensures that products meet the necessary standards.
Upon inspection, the approveInspectionRequest() function comes into play. This function allows the administrator to review the inspection request and approve it if the product quality aligns with the established criteria. This step ensures that only products meeting the required quality are approved for further processing. The logisticrequest() function empowers logistics personnel to initiate shipping requests for the products. This function streamlines the process of arranging and tracking product shipments efficiently.
Similarly, the retailerrequest() function provides retailers with a seamless mechanism to order desired products.
This function simplifies the ordering process, enhancing convenience for retailers within the system.
Once retailers and logistics personnel have made their requests, the approveRetailerRequest() function comes into play. This function is exclusively accessible to the producer who initiated the contract. The agreement manager reviews and approves requests from retailers and logistics, streamlining the approval process.
Finally, the getDeployedRequest() function serves a vital role in retrieving all the deployed contracts established between the various stakeholders involved in the system. This function provides an overview of all active contracts, aiding in transparency and efficient management.
By leveraging these seven functions, our proposed smart contract fosters a seamless and secure transaction process, streamlining interactions between stakeholders in the system architecture. We have developed five algorithms to facilitate the implementation of the mentioned functions within the blockchain-based network and the storage of information in the smart contract. These algorithms outline the step-by-step procedures for each function, providing clarity and guidance for their implementation. Following we present overview of five algorithm in details.
- •
Algorithm (1) Placing a New Request (createRequest): This algorithm describes the process through which a producer can create a new request within the web application by providing relevant details such as product name, description, price, and unit. This initial step marks the beginning of the product's life cycle.
- •
Algorithm (2) Request Approval and Inspection (approveInspectionRequest): This algorithm outlines the steps
Algorithm 3
Request From Retailer
1: Procedure reatilerRequest(… params) 2: params[0]←ndex 3: request = requests[params[0]] 4: Require: request.sold ≠ true && 5: request.importerRequest[msg.sender] ≠ true 6: if msg.sender = = AuthorizedUser then 7: request.importerRequest[msg.sender] = true 8: end if 9: end Procedure
Algorithm 4
Request From Logistic
1:Procedure logisticRequest(… params) 2: params[0]←index 3: request = requests[params[0]] 4: Require: request.sold ≠ true && 5: request.logisticRequest[msg.sender] ≠ true 6: if msg.sender = = AuthorizedUser then 7: request.logisticRequest[msg.sender] = true 8: end if 9: end Procedure for the inspector or admin to review and approve requests from producers. The admin thoroughly inspects the quality and quantity of the agri-food product to ensure compliance with the established standards. This crucial step ensures consistent product quality throughout the supply chain.
- •
Algorithm (3) Retailer Request (retailerRequest): This algorithm describes the process by which retailers can submit requests to producers, indicating their interest in purchasing a specific quantity of products at an agreed-upon price. This streamlined communication and negotiation process enhances efficiency in the purchasing process.
- •
Algorithm (4) Shipping Request Verification (logisticsRequest): This algorithm enables the logistics company to verify the products' condition before initiating a shipping request. Through product verification, the logistics company guarantees the accuracy and quality of the items being transported, ensuring a reliable supply chain.
- •
Algorithm (5) Request Acceptance and Product Sale (approveRetailerRequest): This algorithm captures the final stage of the sell-purchase life cycle of the product, where the producer approves the retailer's request and concludes the transaction.
Table 2.
Function overview for smart contract.
| Function Name | Workflow |
|---|---|
| createRequest() | Create a new Contract in the Blockchain Network |
| createInspectionRequest() | Create a New Inspection Re-quest with parameters in- cludes product information |
| approveInspectionRequest() | Approves the request from a producer (Admin) |
| logisticReqest() | Create a logistic request for this contract |
| retailerRequest() | Create a reailer request for this contract |
| approveRetailerRequest() | Finalize the contract and sell the product (Manager of the Contract) |
| getDeployedRequest() | Return all the deployed con-tracts for this application |
5. Implementation of smart contract and web application
In this section, we provide an overview of the implementation process for both the smart contract and web appli-cation. We have included a workflow diagram in Fig. 4 to illustrate the integration of the smart contract and decen-tralized application. This diagram highlights the interconnectedness and interplay between the smart contract and the decentralized application, demonstrating how they work together harmoniously within the system. The application layer serves as the interface for stakeholders, allowing them to interact with the blockchain system. Stakeholders input relevant data and initiate actions within the system. In Fig. 5 illustrate the proposed system component diagram. The following are the key steps of the integrated system:
Algorithm 5
Finalize Request and Sell Product
1: Procedure approveRetailerRequest(… params) 2: params[0]←requestindex 3: params [1]←importerIndex 4: params [2]←logisticIndex 5: request = requests[params[0]] 6: Require: request.sold ≠ true 7: if msg.sender is creator of the request then 8: request.sold = true 9: request.buyer = importersparams [1] 10: request.distributor = logisticsparams [2] 11: end if 12: end Procedure
-
•
Data Input by Stakeholders: Stakeholders, such as producers, retailers, and logistics companies, provide rele-vant data to the application layer. This data includes information related to the agri-food products, transactions, and other necessary details.
-
•
Create Contract (Producer): The producer utilizes the application layer to create a contract using the smart con-tract functionality. The contract contains essential details about the agri-food product, such as its name, quantity, price, and additional information. The smart contract is deployed on the blockchain, ensuring immutability and transparency.
-
•
Purchase (Retailer) and Delivery (Logistics): Retailers access the application layer to browse available con-tracts and find desired products. Once a suitable contract is identified, the retailer initiates a purchase request through the application layer. The smart contract facilitates the purchase transaction, including payment pro-cessing and contract confirmation. After the purchase is confirmed, the logistics company is notified to handle the delivery of the purchased product.
-
•
Meta-Mask1Integration: The application layer integrates with MetaMask, a popular Ethereum wallet and browser extension. Stakeholders use MetaMask to connect their wallets, sign transactions, and verify their identities securely. MetaMask enhances security and authentication, ensuring reliable communication between the application layer and the blockchain.
-
•
Consensus Node and Central Database: The blockchain application layer is connected to a consensus node, which plays a role in the consensus mechanism. The consensus node stores data in a central database, ensuring efficient data management and accessibility.
Fig. 4.
Integration of smart contract and decentralized application workflow diagram.
Fig. 5.
Proposed application component diagram.
In summary, by integrating the smart contract functionality with a decentralized application, stakeholders can seamlessly interact with the blockchain system. They can create contracts, make purchases, and manage product deliveries while leveraging the security and transparency aspects of the blockchain model. In the following sections we present an overview of the (a) testing and synchronization of smart contracts, (b) details of the web application, and (c) performance analysis of the deployed model.
5.1. Solidity deployment and testing of smart contracts
We utilized remix2 to test our solidity code in smart contracts. Remix is an open-source tool that allows developers to write Solidity contracts directly in their web browsers [19]. In Fig. 6 the remix interface and contract deployment procedure were illustrated. The traceability chain illustrated in Fig. 7 demonstrates the interconnectedness and transparency achieved through the implementation of smart contracts. The traceability chain of the blockchain system involves various stakeholders and their interactions in the supply chain process. The class diagram is demonstrated in Fig. 8. The process begins with the producer, who provides a description of the product. The product then goes through an inspection by the inspection team to check its quality. Once approved, the producer hands over the products to a logistics or shipping company, which is responsible for delivering the products to the store. Retailers can request or purchase products from the producer. They initiate a request for a specific product, which is sent to the producer. The producer, upon receiving the request, can prepare the products for shipping. The logistics or shipping company is then notified to deliver the products to the store. This traceability chain ensures transparency and accountability throughout the supply chain, allowing stakeholders to track the movement of products and maintain a clear record of transactions and interactions. Following we present an overview of the traceability chain in detail. From Fig. 9 If we check the
Fig. 6.
Deployment of contract from remix IDE
Fig. 7.
Uml communication diagram of the integrated system.
Fig. 8.
Proposed system class diagram.
Fig. 9.
Create a new product request.
transaction input areas, there is a function createInspectionRequest for creating an inspection request, which accepts parameters for product name, description, price, and unit of the product. After initiating the contract, the producer will invoke this function and be expected to provide the necessary information. To access this function, it requires the same wallet address as the contract initiator. Initially, product-approved flags, sold flags, and other transactional information will remain negative. As the deployed contract is the only available contract, it can be accessed with an index number
of zero. To approve the product, the inspector can call the approveInspection function. For product requests and logistic requests, both stakeholders can call the retailerRequest and logisticRequest functions, respectively. All these functions only require the contract index as a parameter.
When the producer finds requests for his product and intends to sell it, he needs to call the approveRetailerRequest function, which requires three parameters: the contract index, the retailer request index, and the logistic request index. This is the last transaction of the contract, and after a successful transaction, all the required flags will be updated. The final outcomes of the contract are depicted in Fig. 10.
Fig. 10.
Finalize the request and end of transactions.
5.2. Web application
In order to facilitate communication and networking among the end users of our system, we have developed a front-end interface using React JS.3 (see Fig. 11) The communication protocol between Solidity and Javascript is shown in Figure.
Fig. 11.
Communication protocol between solidity and Javascript.
11. The client-side application is available in the GitHub link4 and server-side in the link.5 For the back-end and API, we have utilized Node JS.6 To simulate the blockchain functionality, we have leveraged the open-source Ethereum platform. The smart contract code was compiled using the Solidity compiler, resulting in two important components: byte codes and JavaScript ABI (Application Binary Interface).
The byte codes obtained from the compilation process were deployed to the Goerli test network7 on the Ethereum platform. This test network allows us to experiment and validate the functionality of our system without incurring real-world transaction costs. Users can access the test network through our React application, which interacts with the blockchain network using the web3 JS library. This enables users to modify and interact with the smart contract functions seamlessly.
To ensure smooth and secure transactions, we have employed Ganache,8 a personal blockchain for development
purposes, and integrated the MetaMask extension as a wallet. These tools facilitate the execution and authentication of transactions, enhancing the user experience and ensuring the security of their interactions with the blockchain system.
In our designed application, there are different dashboards for different users and the accessibility also differs from user to user. We have integrated a signing and signup interface for KYC and recorded details in a database. The producer can create a new product request from CreateRequest page and also producer can view all the requests he/she made so for sale on the MyRequest page. The interface of these pages is shown in Fig. 12, Fig. 13.
Fig. 12.
Producer interface for creating a new product request.
Fig. 13.
Producer interface for viewing available requests.
Producers also can find out if there are any retailer and logistic requests for a particular product. If a producer
is satisfied with the request, the producer can finalize the product to sell and end the transaction. The admin has a different role in the application where the admin can see all the products that request from the producers and wait for approvals when the inspector is satisfied with the product quality then the admin will approve the product request. Fig. 14 present the interface for admin approving the product request. After passed on the quality is checked, the product will appear for sale on the applicable product page. When the product is visible on the Available Product page, the importers and distributors who are also very essential stakeholders of the system can make a retail or logistic request through their application access. Fig. 15 shows the interface for retailers making purchase requests. Whenever they make any request for a product their information and address will be shared with the producer.
Fig. 14.
Admin interface for approving the producer's request.
Fig. 15.
Retailers interface for purchase Request.
6. Performance analysis
We evaluated the performance of our application by analyzing two key factors: gas consumption and transaction time. To conduct the performance analysis, we utilized Remix, a development environment, to deploy the smart contract and execute transactions. To thoroughly evaluate the performance of our blockchain application, we designed a realistic testing scenario that mimics typical user interactions with the smart contract across various conditions.
The scenario begins with the smart contract deployment on the Ethereum testnet through Remix, measuring initial gas usage and activation time. We then simulate multiple transaction types including data creation, querying, and modification to represent diverse user activities. Each transaction type is executed across 50 epochs, where each epoch consists of 100 transactions distributed among the different types, to assess scalability and robustness. We also perform stress testing by introducing high traffic loads and consistency checks post-data manipulation to ensure data integrity. The primary metrics monitored are gas consumption and transaction confirmation times, which provide insights into cost-efficiency and network throughput. This extensive testing, conducted over numerous epochs, aims to pinpoint potential bottlenecks and optimize the smart contract's performance in real-world conditions. The configuration of the machine used in testing are intel core i5 12400 (2.5 GHz processor), 8 GB 3200 Mhz RAM, 120 GB M.2 nvme SSD. The parameters we have used for testing are as follows:
-
•
Gas consumptions: It refers to the amount of computational effort required to execute a transaction on the blockchain. It is measured in gas units, which represent the cost of performing specific operations. We also measured the gas consumption against the input parameter size. We used gas consumption to understand the efficiency and cost-effectiveness of our application.
-
•
Transaction time measures:Transaction time measures the duration taken for a transaction to be processed and confirmed on the blockchain. It is an important metric as it directly impacts the user experience and overall system responsiveness. Analyzing the transaction time helps us understand the efficiency and speed of our application in handling various operations.
6.1. Gas consumptions
In Table 3, the gas prices for each transaction in the contract are provided. As anticipated, the gas price for creating new requests is higher compared to other transactions. This can be attributed to the complexity and computational resources required for initializing new requests. Additionally, it is worth mentioning that the cost of deploying the smart contract on the test network is 0.014521624 Ether, equivalent to 17.49 USD. This initial cost covers the setup and activation of the contract, ensuring its availability for subsequent transactions. The gas prices and deployment costs provide insights into the financial implications associated with executing different operations within the contract. Fig. 16 illustrates the gas price for each transaction.
Table 3.
Cost estimation of smart contract (gas price = 13Gwei, 1 ether = 1204.24 USD).
| Transaction name | deployed gas |
Cost in Ether | Cost in USD |
|---|---|---|---|
| New Request | 1867307 | 0.001867307 | $2.25 |
| Approve Re-quest | 599326 | 0.000599326 | $0.72 |
| Retail Request | 1210755 | 0.001210755 | $1.46 |
| Logistic Re-quest | 1209325 | 0.001209325 | $1.46 |
| Finalize Re-quest | 812942 | 0.000812942 | $0.98 |
Fig. 16.
Gas price for each transaction.
In Fig. 17, we conducted an analysis to observe the relationship between the length of inputs for generating new requests and the associated gas price. The results indicated that as the input size increased, the gas price also rose accordingly. This finding suggests that longer input sizes result in higher computational requirements, leading to increased gas consumption and ultimately higher costs. Therefore, it can be concluded that the cost of a transaction is directly influenced by the length of the input, with longer inputs incurring greater expenses compared to shorter ones.
Fig. 17.
Gas consumption against input size.
6.2. Transaction time measures
In our attempt to estimate the transaction time for different input sizes, we conducted an analysis as shown in Fig. 18. Surprisingly, the results revealed that the length of the input had no significant impact on the transaction time. Contrary to our initial assumption, there was no clear correlation between the input size and the time required to complete the transaction. In fact, in some cases, longer inputs even resulted in shorter transaction times compared to shorter inputs. It is worth noting that throughout the evaluation process, we maintained a stable and smooth network connection to ensure accurate results. However, it is important to acknowledge that an unstable network connection can potentially influence the transaction time and yield different outcomes.
Fig. 18.
Time efficiency against input size.
7. Discussion and limitation
The primary goal of our research was to develop an innovative approach aimed at reducing the reliance on inter-mediaries in the agricultural food supply chain. Our focus was to establish a direct connection between farmers and consumers through a specialized platform, diverging from traditional supply chain methods. To tackle this challenge, we crafted a blockchain-based structure, and we have made efforts to visually depict the communication protocol among all stakeholders involved. A key component of our system is the Solidity smart contract, which we developed and subsequently tested for functionality within the Remix environment. This solution offers significant benefits: it centralizes interactions between consumers and producers through a web application (built using a JavaScript frame-work that integrates the smart contract). This centralized approach effectively prevents middlemen from creating market disruptions and artificially inflating the prices of agricultural products.
In the performance analysis of our blockchain application, we focused on two key aspects: gas consumption and transaction time, using Remix for deployment and testing. The analysis revealed that gas consumption, indicative of the computational effort for transactions, varied with input size, with larger inputs requiring more gas and thus incurring higher costs. Notably, the cost of initiating new requests was higher due to their complexity. In terms of transaction time, contrary to expectations, the length of the input did not significantly influence the duration of transaction processing; longer inputs occasionally processed faster than shorter ones. This suggests that factors other than input length, such as network stability, play a crucial role in transaction efficiency. Overall, these findings provide essential insights into the efficiency and scalability of our blockchain application, highlighting areas for optimization to enhance user experience.
7.1. Comparative analysis
In our research, we've undertaken an extensive comparison of our newly developed model with existing blockchain models in the agricultural food supply chain sector. This comparative study focuses on seven key elements, each embodying a critical aspect of supply chain management. The elements we've evaluated include: the ability to trace products, ensuring accountability across the supply chain, ensuring product and service availability, employing varied rating systems, maintaining high product quality, optimizing the efficiency of delivery systems, controlling pricing, maintaining transparency, and utilizing decentralized applications for improved operations. Following we present a details of key aspects of the selected features.
-
•
Traceability: Enhanced ability to track and monitor the journey of agricultural products from farm to consumer, ensuring accurate origin and process documentation.
-
•
Accountability: Strengthened responsibility across all supply chain stakeholders, ensuring adherence to ethical practices and standards.
-
•
Multifarious Rating: Implementation of a comprehensive rating system that evaluates various parameters such as sustainability, ethical sourcing, and quality.
-
•
Quality of Products: Assurance of high product standards, with a focus on maintaining freshness, nutritional value, and safety of agricultural produce.
-
•
Automated Payment: Integration of automated payment systems to streamline financial transactions, ensuring timely and accurate compensation for stakeholders.
-
•
Delivery Mechanism: Optimization of the supply chain logistics to enhance the efficiency and reliability of product delivery.
-
•
Transparency: Increased openness and information sharing within the supply chain, providing visibility into operations and decision-making processes.
-
•
One-to-One Communication: Facilitation of direct communication channels between producers and con-sumers, enabling personalized interactions and feedback.
-
•
Price Control: Implementation of mechanisms to regulate pricing, ensuring fair market practices and equitable compensation for farmers.
-
•
Decentralized Application: Utilization of decentralized applications, typically on blockchain platforms, to secure data, enhance traceability, and improve overall supply chain integrity.
Table 4 shows a comparative analysis with other approaches based on key features. In our study, we provided end consumers with the ability to gain a comprehensive understanding of the entire cost cycle of a product. This includes detailed insights into all stages of its production and distribution, made possible through the transparent features of our system. Moreover, the adoption of consensus methods within our blockchain architecture ensures the security of information, safeguarding it against potential breaches. Our analysis, as detailed in the performance section, reveals that the average cost related to the deployment and execution of the transaction lifecycle, which considers the impact of input length on cost, ranges between 24 and 26 dollars. Interestingly, the presence of intermediaries within the system does not significantly affect this cost factor. However, it's important to note that purchasing smaller quantities of a product may lead to accumulating unnecessary costs. Looking ahead, we plan to integrate advanced technologies like Madmax and Gasper to mitigate excessive expenses. Madmax is designed to identify gas-related vulnerabilities by detecting specific control- and data-flow patterns, as referenced in Ref. [27]. Gasper, on the other hand, aims to pinpoint programming patterns that are gas-intensive by matching certain control-flow patterns, as discussed in Ref. [29]. These technologies will be instrumental in identifying and preventing potential gas inefficiencies in our blockchain system.
Table 4.
Comparative analysis with other approaches based on key features.
| Features | BPCM Analysis [10] |
Blockchain with IPFS storage Solution [12] | Hyperledger Smart Contract [13] | Blockchain for Sustainable E-agriculture [14] |
Tracebility of Agri-block IoT [21] |
Proposed Solution |
|---|---|---|---|---|---|---|
| Traceability | X | X | X | X | X | X |
| Accountability | X | X | X | X | X | X |
| Multifarious Rating |
– | X | – | X | X | X |
| Quality of Products | – | – | X | – | – | X |
| Automated Payment |
X | X | – | X | X | X |
| Delivery Mechanism |
X | X | X | – | – | X |
| Transparency | X | X | X | X | X | X |
| One to one communication | – | – | – | – | – | X |
| Price control | – | – | – | – | – | X |
| Decentralized Application |
– | – | X | – | X | X |
7.2. Feasibility
Implementing a blockchain-based supply chain in Bangladesh faces several challenges that must be addressed. Successful implementation hinges on a confluence of factors including government support, technological infrastruc-ture, education, clear identification of use cases, collaboration, funding, security, and public acceptance. Fortunately, the Bangladeshi government has shown encouraging support for blockchain technology, as evidenced by several sig-nificant initiatives influenced by government actions to explore optimal strategies for blockchain solutions [31], [32].
Achieving the strategic objectives of blockchain deployment necessitates a tailored industry-focused training pro-gram, segmented into various levels: beginner, intermediate, and advanced. Training for beginners should primarily concentrate on the fundamental aspects of blockchain technology, while an expert training program should cover a comprehensive range of topics. Local specialists and academics are crucial in developing the curriculum for these training programs. Another vital consideration is the level of blockchain awareness among high-level professionals and policymakers in both the public and private sectors. There's a gap in understanding about the potential opportu-nities and advantages that blockchain technology can offer. Addressing this knowledge gap is essential for fostering an environment conducive to the successful adoption and implementation of blockchain systems in Bangladesh.
7.3. Security aspects
One of the core strengths of Blockchain technology lies in its security, which is fundamentally underpinned by a distributed network of nodes. These nodes work collectively to validate and record transactions, creating a system that is inherently resistant to hacks and other forms of tampering. The security of data on the blockchain is further rein-forced by cryptographic techniques such as hashing and digital signatures, ensuring the data's integrity and protection against unauthorized alterations. Despite blockchain's well-established reputation for cyber resilience, it's important to acknowledge that it is not entirely impervious to digital attacks. A notable vulnerability in blockchain networks, particularly those employing Proof of Work (PoW) consensus algorithms, is the risk of a 51 % attack. This type of attack occurs when an individual or a group gains control over more than half of the network's mining power or com-putational resources, as noted in Ref. [33]. Such control can potentially allow them to manipulate the network, including double-spending transactions and hindering the confirmation of new transactions, which poses a significant security threat to the blockchain's integrity and reliability.
An eclipse attack represents a specific type of security threat in blockchain networks, targeting not the entire net-work but focusing on individual nodes or a group of nodes. During an eclipse attack, the targeted node is surrounded
by malicious nodes that effectively control all the information it receives and sends. The primary objectives of an eclipse attack are to isolate the node from the rest of the network, manipulate its view of the blockchain, control its transactions, or feed it false data. Such attacks can be particularly dangerous when used in conjunction with a 51 % attack, significantly compromising the security of the network [34]. In the context of blockchain, forking is a common phenomenon that can be divided into two main types: hard forks and soft forks. A hard fork entails a fundamental, irreversible change to the blockchain's protocol rules, effectively creating a new version of the blockchain that is not compatible with the old version. On the other hand, a soft fork involves a backward-compatible change, mean-ing that nodes running the updated software can still interact and validate transactions with nodes that are operating on the older version of the software [35]. This distinction is critical for understanding the dynamics of blockchain development and how changes in the protocol can impact the network.
To counteract the vulnerabilities associated with blockchain technologies, our application adopts several strategic approaches. For mitigating the risks of 51 % attacks, our methods include increasing the network's hash rate, which makes it more difficult for attackers to gain the majority control required for such attacks. We are also considering the adoption of alternative consensus mechanisms like Proof of Stake (PoS), which are less susceptible to 51 % attacks compared to Proof of Work (PoW) systems. Additionally, continuous monitoring of the network and raising commu-nity awareness are crucial steps in our strategy to prevent these attacks. In addressing the threat of eclipse attacks, our approach includes diversifying the connections to different nodes, thereby reducing the likelihood of a node be-ing completely surrounded by hostile ones. We're also focusing on establishing secure peer detection protocols and implementing peer avoidance measures to further safeguard individual nodes from being isolated and manipulated. Regarding the issue of blockchain forking, our strategy emphasizes the importance of robust oversight and transparent communication. Keeping users informed and involved in protocol changes is essential for managing and resolving potential forking issues. This proactive approach to user engagement helps ensure smooth transitions during both hard and soft forks, maintaining network stability and user trust [36].
8. Conclusion and future work
The advent of blockchain technology has revolutionized the supply chain system, particularly in agriculture, by offering a decentralized and secure record-keeping mechanism for transactions. The immutability of blockchain data ensures the integrity and reliability of stored information, making it extremely challenging to alter or replace any recorded data. In this paper, we propose a blockchain-based supply chain model that leverages smart contracts to provide a user-friendly platform for seamless transactions among stakeholders. By implementing this blockchain-based system, we aim to streamline the agri-food supply chain by minimizing the involvement of intermediaries. Our focus is on integrating a responsive web application with a user-friendly interface to simplify the process for all users. Additionally, we have developed and tested a smart contract, which serves as the backbone of our system. Through performance evaluations, we have identified the costs associated with completing transactions, considering the current ether rate in U.S. dollars.
The deployed blockchain-based model showcases promising results, it does have certain limitations. To address these, we plan to introduce a rating-based evaluation feature that incorporates user feedback. This will enable cus-tomers to assess not only the product's quality but also the overall customer experience. Additionally, we aim to evaluate the system's performance by exploring factors such as gas consumption, time efficiency, system throughput, and network latency using established blockchain benchmark tools like Hyperledger Caliper. By continuously refining and enhancing our system, we strive to create a robust and efficient blockchain-based supply chain solution that rev-olutionizes the agri-food industry. Through transparency, traceability, and improved user experiences, we anticipate making a significant positive impact in the field of agricultural supply chains.
Additionally, our future plans involve implementing an automated payment system to facilitate online payments and mobile banking within our blockchain-based agri-food supply chain model. This will create convenience and ef-ficiency for users by enabling seamless transactions through various payment methods. To further enhance customer satisfaction and address any potential quality concerns, we will introduce a refund policy. If a customer finds the received product to be unsatisfactory, they will have the option to request a refund, thus providing a mechanism for damage control and ensuring customer trust and confidence in the system. This refund policy will also contribute to maintaining quality assurance throughout the supply chain. Recognizing the importance of accessibility and durabil-ity, we have plans to develop a mobile application specifically designed for producers. This mobile application will
provide an additional platform for producers to access and interact with the blockchain-based agri-food supply chain model. The mobile application will enhance convenience and enable producers to stay connected and manage their operations on-the-go. By implementing these additional features and expanding our reach through a mobile applica-tion, we aim to continually improve the accessibility, functionality, and resilience of our blockchain-based agri-food supply chain model. These advancements will empower stakeholders, promote transparency, and further strengthen the overall effectiveness of the system.
CRediT authorship contribution statement
Mohammad Rifat Ahmmad Rashid: Project administration, Methodology, Investigation, Funding acquisition, Formal analysis, Data curation, Conceptualization. Mahamudul Hasan: Funding acquisition, Formal analysis, Data curation. Md Ariful Islam: Methodology, Investigation, Formal analysis, Conceptualization. Syeda Tasfia Tasnim: Funding acquisition, Data curation. Rawnak Jahan Taifa: Methodology, Investigation, Conceptualization. Sraboni Mahbub: Methodology, Investigation, Formal analysis, Conceptualization. Nafees Mansoor: Conceptualization. Md Sawkat Ali: Conceptualization. Taskeed Jabid: Formal analysis, Conceptualization. Maheen Islam: Data curation. Mohammad Manzurul Islam: Conceptualization.
Code availability statement
-
•
Github Client: https://github.com/ArifulIslam99/FoodChain
-
•
Github Server: https://github.com/ArifulIslam99/FoodChain sever
Data availability
Data will be available on request.
Funding information
This research received no external funding.
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
References
- 1.Rahman M.T. Role of agriculture in Bangladesh economy: uncovering the problems and challenges. Int. J. Bus. Manag. Invent. ISSN. 2017;6(July 2017):36–46. www.ijbmi.org [Online]. Available: [Google Scholar]
- 2.Moyen Uddin M.M. 2015. “Causal Relationship between Agriculture, Industry and Services Sector for GDP Growth in Bangladesh: an Econo- Metric Investigation,”. [Google Scholar]
- 3.Mondal M.H. Crop agriculture of Bangladesh: challenges and opportunities. Bangladesh J. Agric. Res. Aug. 2010;35(2):235–245. [Google Scholar]
- 4.Das S., Munshi M.N., Kabir W. The impact of ICTs on agricultural production in Bangladesh: a study with food crops. SAARC J. Agric. 2017;14(2):78–89. doi: 10.3329/sja.v14i2.31247. [DOI] [Google Scholar]
- 5.Zhao G., et al. Blockchain technology in agri-food value chain management: a synthesis of applications, challenges and future research directions. Comput. Ind. 2019;109:83–99. doi: 10.1016/j.compind.2019.04.002. [DOI] [Google Scholar]
- 6.Vujicic D., Jagodic D., Randic S. 2018 17th International Symposium INFOTEH-JAHORINA (INFOTEH), East Sarajevo, Bosnia and Herzegovina. 2018. ”Blockchain technology, bitcoin, and Ethereum: a brief overview,”; pp. 1–6. [DOI] [Google Scholar]
- 7.Dannen C. Introducing Ethereum and Solidity: Foundations of Cryptocurrency and Blockchain Programming for Beginners. Jan. 2017. Introducing ethereum and solidity: foundations of cryptocurrency and blockchain programming for beginners; pp. 1–185. [DOI] [Google Scholar]
- 8.Bishwajit G., Barmon R., Ghosh S. Reviewing the status of agricultural production in Bangladesh from a food security perspective. Russ. J. Agric. Socio-Economic Sci. 2014;25(1):19–27. doi: 10.18551/rjoas.2014-01.04. [DOI] [Google Scholar]
- 9.Curto J.P., Gaspar P.D. Traceability in food supply chains: review and SME focused analysis. AIMS Agriculture and Food. 2021;6(2):679–707. [Google Scholar]
- 10.Revathy S., Sathya Priya S. 4th Int. Conf. Comput. Commun. Signal Process. ICCCSP 2020. 2020. “Blockchain based producer-consumer model for farmers,”. [DOI] [Google Scholar]
- 11.Hegde B., Ravishankar B., Appaiah M. “Agricultural supply chain management using blockchain technology,”. 2020 Int. Conf. Main- streaming Block Chain Implementation, ICOMBI 2020. 2020:6–9. doi: 10.23919/ICOMBI48604.2020.9203259. [DOI] [Google Scholar]
- 12.Shahid A., Almogren A., Javaid N., Al-Zahrani F.A., Zuair M., Alam M. Blockchain-based agri-food supply chain: a complete solution. IEEE Access. 2020;8:69230–69243. doi: 10.1109/ACCESS.2020.2986257. [DOI] [Google Scholar]
- 13.Wang L., et al. Smart contract-based agricultural food supply chain traceability. IEEE Access. 2021;9:9296–9307. doi: 10.1109/ACCESS.2021.3050112. [DOI] [Google Scholar]
- 14.Song L., Wang X., Merveille N. ”Research on blockchain for sustainable E-agriculture,”. 2020 IEEE Technology and Engineering Management Conference (TEMSCON),IEEE. 2020;15:1–5. [Google Scholar]
- 15.Demestichas K., Peppes N., Alexakis T., Adamopoulou E. Blockchain in agriculture traceability systems: a review. Appl. Sci. Jun. 2020;10(12):4113. doi: 10.3390/app10124113. [DOI] [Google Scholar]
- 16.Marchesi L., Mannaro K., Marchesi M., Tonelli R. Automatic generation of ethereum-based smart contracts for agri-food trace- ability system. IEEE Access. 2022;10:50363–50383. doi: 10.1109/ACCESS.2022.3171045. [DOI] [Google Scholar]
- 17.Abdulhussein A.B., Hadi A.K., Ilyas M. “Design a tracing system for a seed supply chain based on blockchain,”. 2020 3rd Int. Conf. Eng. Technol. its Appl. IICETA 2020. 2020:209–214. doi: 10.1109/IICETA50496.2020.9318792. [DOI] [Google Scholar]
- 18.Shivendra K. Chiranjeevi, Tripathi M.K., Maktedar D.D. International Conference on Artificial Intelligence and Smart Systems (ICAIS) 2021. Block chain technology in agriculture product supply chain; pp. 1325–1329. [Google Scholar]
- 19.Jain S.M. A Brief Introduction to Web3. 2023. Introduction to remix IDE. [DOI] [Google Scholar]
- 20.Caro M.P., Ali M.S., Vecchio M., Giaffreda R. 2018 IoT Vert. Top. Summit Agric. - Tuscany, IOT Tuscany 2018. 2018. Blockchain-based traceability in Agri-Food supply chain; pp. 1–4. [Google Scholar]
- 21.Kuzlu M., Pipattanasomporn M., Gurses L., Rahman S. “Performance analysis of a hyperledger fabric blockchain framework: throughput, latency and scalability,”. Proc. - 2019 2nd IEEE Int. Conf. Blockchain, Blockchain 2019. 2019:536–540. doi: 10.1109/Blockchain.2019.00003. [DOI] [Google Scholar]
- 22.Rouhani S., Deters R. 2017 8th IEEE International Conference on Software Engineering and Service Science (ICSESS) 2017. ”Performance analysis of ethereum transactions in private blockchain,”; pp. 70–74. Beijing, China. [DOI] [Google Scholar]
- 23.Chen H., Chen Z., Lin F., Zhuang P. ”Effective management for blockchain-based agri-food supply chains using deep reinforcement learning,”. IEEE Access. 2021;9:36008–36018. doi: 10.1109/ACCESS.2021.3062410. [DOI] [Google Scholar]
- 24.Yang X., Li M., Yu H., Wang M., Xu D., Sun C. ”A trusted blockchain-based traceability system for fruit and vegetable agricultural products,”. IEEE Access. 2021;9:36282–36293. doi: 10.1109/ACCESS.2021.3062845. [DOI] [Google Scholar]
- 25.Kaid D., Eljazzar M.M. 2018 14th International Computer Engineering Conference (ICENCO) 2018. ”Applying blockchain to automate installments payment between supply chain parties,”; pp. 231–235. Cairo, Egypt. [DOI] [Google Scholar]
- 26.Tasnim S.T., Islam M.A., Taifa R.J., Mahbub S., Ahmmad Rashid M.R. ”Agri-food traceability using blockchain technology to ensure value chain management and fair pricing in Bangladesh,”. 2022 IEEE 8th World Forum on Internet of Things (WF-IoT) 2022:1–6. doi: 10.1109/WF-IoT54382.2022.10152086. Yokohama, Japan. [DOI] [Google Scholar]
- 27.Grech N., Kong M., Jurisevic A., Brent L., Scholz B., Smaragdakis Y. MadMax: surviving out-of-Gas conditions in ethereum smart contracts. Proc. ACM Program. Lang. Oct. 2018;2(OOPSLA) doi: 10.1145/3276486. [DOI] [Google Scholar]
- 28.Ferdous Md Sadek, et al. 2020. ”National Blockchain Strategy: Bangladesh.”. [Google Scholar]
- 29.Chen T., Li X., Luo X., Zhang X. 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER) Klagenfurt; Austria: 2017. ”Under-optimized smart contracts devour your money,”; pp. 442–446. [DOI] [Google Scholar]
- 30.Qian J., Dai B., Wang B., Zha Y., Song Q. Traceability in food processing: problems, methods, and performance evaluations—a review. Crit. Rev. Food Sci. Nutr. 2022;62(3):679–692. doi: 10.1080/10408398.2020.1825925. [DOI] [PubMed] [Google Scholar]
- 31."Bangladesh, India see first blockchain-enabled trade," The Business Standard. Available: https://www.tbsnews.net/economy/bangladesh-india-see-first-blockchain-enabled-trade-334369 (accessed Sep. 5, 2023).
- 32.“First Blockchain-based cross-border remittance service launched in Bangladesh,” Prothomalo, https://en.prothomalo.com/corporate/local/standard-chartered-bkash-and-valyou-launch-bangladeshs-first-cross-border-remittance-service (accessed Sep. 5, 2023).
- 33.Oksiiuk O., Dmyrieva I. 2020 IEEE 15th International Conference on Advanced Trends in Radioelectronics, Telecommunications and Computer Engineering (TCSET) 2020. ”Security and privacy issues of blockchain technology,”; pp. 1–5. [Google Scholar]
- 34.Heilman E., Kendler A., Zohar A., Goldberg S. 2015. Eclipse Attacks on Bitcoin’speer-To-Peer Network. [Google Scholar]
- 35.Hasanova H., et al. A survey on blockchain cybersecurity vulnerabilities and possible countermeasures. Int. J. Netw. Manag. 2019;29(2) [Google Scholar]
- 36.Yıldız A.K., Atmaca A., Solak A.O., Tursun Y.C., Bahtiyar S. 2022 15th International Conference on Security of Information and Networks (SIN) 2022. ”A trust based DNS system to prevent eclipse attack on blockchain networks,”; pp. 1–8. Sousse, Tunisia. [DOI] [Google Scholar]
- 37.Sharma R., Kamble S.S., Gunasekaran A., Kumar V., Kumar A. A systematic literature review on machine learning applications for sustainable agriculture supply chain performance. Comput. Oper. Res. 2020;119 [Google Scholar]
- 38.Luthra S., Mangla S.K., Garg D., Kumar A. ‘Internet of things (IoT) in agriculture supply chain management: a developing country perspective’, Emerging Markets from a Multidisciplinary Perspective: challenges. Opportunities and Research Agenda. 2018:209–220. [Google Scholar]
- 39.Qiu C., Yao H., Wang X., Zhang N., Yu F.R., Niyato D. ”AI-Chain: blockchain energized edge intelligence for beyond 5G networks,”. IEEE Network. November/December 2020;34(6):62–69. doi: 10.1109/MNET.021.1900617. [DOI] [Google Scholar]
- 40.ElHusseini H., Assi C., Moussa B., Attallah R., Ghrayeb A. ”Blockchain, AI and smart grids: the three musketeers to a decentralized EV charging infrastructure,”. IEEE Internet of Things Magazine. June 2020;3(2):24–29. doi: 10.1109/IOTM.0001.1900081. [DOI] [Google Scholar]
- 41.Zhang Yuanpeng, Wang Guanjin, Huang Xiuyu, Ding Weiping. ”TSK fuzzy system fusion at sensitivity-ensemble-level for imbalanced data classification,”. Inf. Fusion. 2023;92:350–362. ISSN 1566-2535. [Google Scholar]
- 42.Baralla Gavina, Pinna Andrea, Corrias Giacomo. 2019 IEEE/ACM 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB) IEEE; 2019. ”Ensure traceability in European food supply chain by using a blockchain system.”; pp. 40–47. [Google Scholar]
- 43.Cocco Luisanna, Tonelli Roberto, Marchesi Michele. ”Blockchain and self sovereign identity to support quality in the food supply chain.”. Future Internet. 2021;13(12):301. [Google Scholar]
- 44.Cocco Luisanna, Mannaro Katiuscia, Tonelli Roberto, Mariani Lorena, Lodi Matteo B., Melis Andrea, Simone Marco, Fanti Alessandro. ”A blockchain-based traceability system in agri-food SME: case study of a traditional bakery.”. IEEE Access. 2021;9:62899–62915. [Google Scholar]
- 45.Zhang Xin, Sun Pengcheng, Xu Jiping, Wang Xiaoyi, Yu Jiabin, Zhao Zhiyao, Dong Yunfeng. ”Blockchain-based safety management system for the grain supply chain.”. IEEE Access. 2020;8:36398–36410. [Google Scholar]
- 46.Prashar Deepak, Jha Nishant, Jha Sudan, Lee Yongju, Prasad Joshi Gyanendra. ”Blockchain-based traceability and visibility for agricul- tural products: a decentralized way of ensuring food safety in India.”. Sustainability. 2020;12(8):3497. [Google Scholar]
- 47.Lin Qijun, Wang Huaizhen, Pei Xiaofu, Wang Junyu. ”Food safety traceability system based on blockchain and EPCIS.”. IEEE Access. 2019;7:20698–20707. [Google Scholar]
- 48.Tang Andrews, Tchao Eric Tutu, Agbemenu Andrew Selasi, Keelson Eliel, Klogo Griffith Selorm, Kponyo Jerry John. Assessing blockchain and IoT technologies for agricultural food supply chains in Africa: A feasibility analysis. Heliyon. 2024;10:e34584. doi: 10.1016/j.heliyon.2024.e34584. ISSN 2405-8440. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 49.Sayma Maksuda Haider, Hasan Md Rakib, Khatun Mahmuda, Rajee Alimul, Begum Amena. “Detecting the provenance of price hike in agri-food supply chain using private Ethereum blockchain network.”. Heliyon. 2024;10(11) doi: 10.1016/j.heliyon.2024.e30972. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
Data will be available on request.


















