1 Introduction

The United Nations Population Division expects the world population, currently 7.8 billion (2020), to reach 10.9 billion after the end of the twenty-first century [1]. Due to rapid population growth, there is a high pressure on agriculture to increase food production in a sustainable manner. Food distribution and consumption simultaneously promote human well-being and preserves scarce natural resources. As a result, policymakers, development agencies, civil society organizations, and private enterprises have shown interest in investigating the role of the food and farm markets in supporting sustainable development for people and the world [2]. Agriculture is experiencing drastic changes and is facing numerous environmental and social problems. Many farmers are still depending on traditional farming practices and having no direct access to the market and it has proven difficult to balance the demands on limited natural resources such as land and water. Both changes in diets and consumer preferences and the fact of climate change contributes to the complexity of providing high-quality food to the end-user [3]. Sustainable food and agricultural production cannot be accomplished by the conventional agriculture systems that have led to substantial deforestation, water scarcity, or soil erosion. Thus, advanced systems must be used which conserve and reinforce the basis of natural resources and increase production. A phase of transition to 'holistic' methods like smart Agriculture [4].

Smart agriculture is a management concept focused on providing the agriculture sector with the infrastructure to leverage advanced technology such as cloud computing, big data, satellite technology, robotics, autonomous vehicles, remote sensing, machine learning, the Internet of Things (IoT) for tracking, monitoring, automating and analyzing farm operation and blockchain to connect producers with the market [5]. Because of these technologies real-time information about soil condition, crop growth, crop diseases, and weather conditions, and other related services like a supply chain for vegetables and fruits and food safety information can be processed and accessed [6, 7]. Four key components of smart agriculture contribute to GDP. These include (i) agricultural raw materials, (ii) processing and manufacturing industries, (iii) retail sales of food and beverage products, and (iv) sales of food products as shown in Fig. 1.

Fig. 1
figure 1

Agricultural food system

1.1 Internet of Things (IoT)

The Internet of Things (IoT) provides open services as a new global network model. IoT systems are widely used these days. The IoT devices are linked and communicate with each other via a wireless sensor network. Every device is connected to the internet without human intervention and can transmit data at all times. IoT-based systems in all areas of life play an important role. There are different types of IoT-based systems in which IoT plays an important role. IoT-based systems include smart homes, smart energy, smart city, military. vehicle area network, health care, connected buildings, smart agriculture, and food supply chain, and other domains as shown in Fig. 2. IoT devices in smart agriculture recognize the diseases of crops and insects that harm crops. The IoT-based agriculture system informs farmers about crop diseases and also provides an effective solution. The IoT smart devices are used to collect data and store it on servers for analytical purposes. After data analysis, these systems provide useful results to better manage crops. Smart IoT devices allow the farmer to make the right decision on the crop, its environment, and self-analysis. To maximize crop yield, farmers are now practicing qualitative agriculture [8].

Fig. 2
figure 2

An example of IoT applications

IoT also offers well-organized scheduling of limited resources that ensure that efficiency is improved by the best use of IoT. A schematic diagram showing agricultural trends that provide simple and cost-effective connections through healthy and flawless communication is shown in Fig. 3. It can be seen in the Figure that two smart agriculture Xtreme IoT Vertical Kit and Crop Monitoring Sensor Kit that monitor soil moisture, leaf wetness, temperature, humidity, efficiency, and airflow have been introduced. When tracking animal health, reproduction, feeding, and sleeping, the MooMonitor sensor kit is used to track information. In order to store agricultural records and provide on-demand agricultural services to registered users, agricultural servers, gateways, and agricultural databases play an important role [9].

Fig. 3
figure 3

Agricultural trends

In agriculture, there is a wide range of technologies that are applicable which makes it difficult to discuss all of them. Therefore, our discussion focused on a few keys and relevant IoT technologies that have played a vital role in modernizing the agriculture system.

1.2 Block Chain Technology

Blockchain is an obvious and tamper-resistant digital ledger that works in a distributed manner. This technology works without the help of a trusted third party or central authority such as a bank or government. At their basic level, it allows a user group to record transactions within that community in a shared ledger. In this scenario, no transaction can be modified once published under the blockchain network. In 2008, the blockchain was integrated with numerous other technologies and computer principles to establish modern cryptocurrencies in order to secure electronic cash and to defend it through cryptographic mechanisms. Bitcoin was the first such cryptocurrency. The data on electronic cash is connected to a digital address within the Bitcoin blockchain. This transmission can also be digitally signed and transferred to another user by Bitcoin users, and Bitcoin blockchain documents the transaction publicly, enabling all network members to independently check that the transactions are true. A distributed group of participants stores and manage the Bitcoin blockchain collaboratively. This, along with certain cryptographic mechanisms, renders the blockchain immune to subsequent modifications to the ledger [10]. The Key Characteristics of BlockChain are shown in Fig. 4 [11].

Fig. 4
figure 4

Key characteristics of blockchain

1.2.1 How Blockchain Works

To clarify the working procedure of the Blockchain, It is important first to explain the working mechanisms of Bitcoin. In Cryptographic Primitives, Bitcoin uses some kind of evidence instead of relying entirely on third parties. To meet this objective the concept of digital signature has therefore been introduced. The sender uses his private key, the recipient gets his public key and if the person is interested in spending the money the person must know the private key and the digital signature. The peer nodes in the Bitcoin network are conscious of.

the transactions. The transaction must be submitted and verified before appeared in a public ledger [12]. The validator must first realize that the sender is entitled to spend it. Second, the validator must know that the sender has a sufficient amount in his account to make a transaction. In Bitcoin, network transactions are not well-organized. Thus, dual expenses are probable. Blockchain can be used to tackle this problem. The transactions in Blockchain are ordered in the form of linear chain blocks that are linked to each other. The hash of the block before it is contained in every block by implementing the concept of Proof of Work. The node task in this is to locate the random string. With the transactions and hashes of the previous blocks, this random string must be hashed, and then it produces a hash with a certain number of leading zeroes. The complete process of the blockchain working mechanism is shown in Fig. 5 [13].

Fig. 5
figure 5

Key characteristics of block chain

1.3 Internet of Things (IoT) and Blockchain Integration

Industry 4.4 has shown that the Internet of Things (IoT) is a fundamental technology and an important player in digital transformation. IoT is expected to rely more on sensing devices, a wide range of data, and more connected devices in different network topologies. It must, therefore, call the Internet of Things 2.0. Currently, the Internet of Things 2.0 is shifting from devices and data technology to actionable intelligence technology. The integration of IoT with cloud computing, artificial intelligence, machine learning makes the IoT more powerful. Another important contribution to the digital transformation of different domains is the integration of blockchain technology with IoT. Blockchain can be tracked and used in a variety of heterogeneous IoT networks as a distributed ledger. Blockchain is expected to contribute $176 billion to the world economy by 2025, and $3 trillion by 2030 by integrating with IoT [14, 15].

2 Related Literature

Researchers provided, the architecture of the Internet of Things (IoT) based on LoRa communications. The sensor node is fitted by the LoRa transmitter to give the information of sensing measurement. Sensor data is transferred via Half-Duplex communication from the sensor node to LoRa Gateway. Data is then acquired by the server through the cloud. Farmers will ultimately track their field environment and use the data record to perform an action based on the field observation [16]. Authors in their research suggested an agricultural environmental monitoring IoT-based framework. The modern agricultural IoT control system is divided into six components: Smart Gateway, monitoring equipment, agriculture product management, information on data, big data analysis, and decision making, and user center, system's functional structural design. In that system, sensors are linked through wireless sensor networks such as the Zigbee and the Internet of Things smart gateway, and the data collected by the sensors is transferred to the gateway. The Gateway transmits these data after processing via a large network, such as a mobile phone network or the Internet to the IoT system platform [17].

Researchers presented an Agricultural IoT Stick that, depending on the sensors incorporated with it, is considered to be an IoT gadget focusing on live monitoring of environmental data in terms of temperature, humidity, and other forms. Agricultural IoT stick offers the idea of "Plug & Sense" in which farmers can directly implement smart farming by placing the stick on the field and receiving real-time data feeds on multiple devices such as smartphones, tablets, etc. As such, farming consultants can easily share and display the data generated by sensors remotely anywhere through Cloud Computing [18].

Researchers proposed a food traceability model based on information technology which uses all the logistics information to increase the supply planning and overall logistics processes. Tracking is very essential in the food supply chain to guarantee the consumers' food safety. Recently, numerous solutions with several emerging blockchain and Io T technology have been proposed to improve the tracking system of animals, plants, and food products [19]. Authors have developed (MCIN) model Material Conscious and Information network, the architecture is composed of three members which are enterprises, individuals and commodity, the enterprises and individuals personalized portals are used as the carriers which are linked with each other through a peer-to-peer network called six degrees-of-separation block-chain [20].

Researchers developed a Blockchain built-in solution for LoRaWAN network servers to make an open, reliable, decentralized, and secure system that provides the reliable mechanism to verify that the data of a transaction has existed at a precise time in the network. In my opinion, it is the first work that mixes both IoT technologies, Blockchain, and utilizes the advantages of both [16]. Researchers examined the combination of the Blockchain with the IoT with featuring the reconciliation advantages and difficulties. They believe that moving the IoT framework into a decentralized way might be the correct choice. The Blockchain is an amazing innovation that can decentralize the computation and management process resolves many IoT issues, especially security [21].

The authors designed a lightweight Blockchain-based model for smart greenhouse farms to provide security and secrecy. In the greenhouse, IoT devices act as a Blockchain managed centrally to optimize energy consumption have the benefit of private immutable ledgers. Secondly, they offered a security framework that combines blockchain technology with IoT devices to provide a secure communication platform in Smart Greenhouse farming [22]. Authors developed a novel framework that provides reliable cooperative applications and services within the agro-food chains. To enhance transparency, information flow, and management capacity they used Blockchain technology allowing better interaction of farmers, customers, and other stakeholders in the supply chain. According to the authors, the research work is based on quality standards that will provide better performing value chains by proposing a new food-on-demand business model, linking the gap between subjective experience and objective metrics based on quality standards [23].

The implementation of IoT in agriculture has been strongly supported by existing literature. However, IoT research remains at an early stage. Most studies and implementations are limited, dispersed, and work as a single system and IoT has not been fully investigated in its integrated functionality. Furthermore, agricultural production is vulnerable to the expense of implementing IoT technology. Both of these variables impede IoT technology usage and promotion. Operation execution and control. Thus, to meet the demands of modern society for.

large-scale, intensive, transparent, and specialized agricultural production, the realization of the operations and management of the entire agricultural production by IoT is required.

3 Motivation

The related literature indicates that a lot of IoT-based agriculture systems are available for the agriculture sector, however merely in few downstream stages vertically integrated. The information regarding the product is also stored in databases which makes it more challenging to make end-to-end traceability. Only limited research work is available on the use of blockchain and IoT in agriculture. Yet, an evaluation among current data systems and an innovative blockchain and IoT model is lacking which motivated us to propose an optimized model based on blockchain with IoT to overcome these challenges and to provide a fair and smooth communication channel to all stakeholders. Hence, we have presented a Combo smart model which is a novel model in this domain for the transformation of traditional agriculture to smart agriculture and food tracking system, taking into consideration both blockchain and IoT characteristics.

4 Combo Smart Model Architecture

The proposed Combo Smart model for an agricultural food supply chain with a blockchain.

Infrastructure is shown in Fig. 6. The smart model has three parts IoT, blockchain, and retail market. IoT part is related to data generated through the use of sensors arranged on the farm. data will be generated through IoT devices and will be recorded in the system, for instance, production information will be recorded during the production stage including essential information and production log information such as product name, origin, etc., and later product growing information will also be recorded at multiple times and all stakeholders will have access to see this information. The second part is related to the data storage, consensus, encryption, decryption, and verification function which will be performed by blockchain. It will run smart contracts to execute the corresponding logic at specific points in time which will increase scalability, simplify the process, and reduce cost. The third part is related to the retail market; after completion of the production, process goods will be delivered to successful bidders (distributors, retailers) (Fig. 7).

Fig. 6
figure 6

Blockchain and IoT prediction by 2030

Fig. 7
figure 7

Combo smart model architecture

4.1 Stepwise description of Combo smart model

4.1.1 IoT Function

Step 1: IoT devices will monitor crop health and generate information to provide support to farmers for making a timely decision related to crop growth and collected information will be saved on the blockchain.

Step 2: To get more insight information machine learning is used it will provide more depth information like crop yield prediction, crop growth factor, demand forecasting, and recommendation to improve crop quality. Farmers will also get help from machine learning algorithms to make improvements in the irrigation system. The data collected through machine learning will be saved on the blockchain to empower stakeholders like farmers, investors, innovators, and retailers to get access fairly.

Step 3: The high valued data collected by applying machine learning will be stored by IPFS (Interplanetary.

File System) on the blockchain in decentralized server to avoid single authority control and to reduce the risk of data hacking whereas the available systems are storing information in the centralized server which can be hacked or failed after those smart contracts will be generated by blockchain to define rules.

The function of Smart contracts is to facilitate specific stakeholders to exchange data stored on the blockchain and at the same time information will be shown to each agriculture market member this will provide a unified platform to improve efficiency.

4.1.2 Food Supply Chain Process

Step 1: In a Smart model IoT device are used to provide important information related to the crop. Then taken data will be kept in the blockchain by IPFS.

Step 2: When the crops will full-grown, companies dealing with food processing will get access to the bidding platform to start bidding. After completion of the bidding process crops will be delivered to the plants through vehicles enabled by IoT to keep maintain the desired temperature. It will be necessary to validate the bid through smart contracts, and then the crops will be put into process and companies will store all information on the blockchain that were recorded at each step during the whole process and this information will be accessible to all stakeholders to confirm that food which has supplied from plants have good or low quality. Blockchain will make sure that the desired criteria have met at each step.

Step 3: After processing of food items wholesalers and retailers will access the bidding platform to offer a bid for the product they want, after completion of the bidding process the food products will be dispersed to successful bidders through vehicles enabled by IoT to keep maintain the desired temperature again. Blockchain will track the whole process throughout the supply chain, which will help food businessmen to conduct food recollections or inquiries rapidly.

Step 4: Blockchain will keep maintained all data, from initial stage to distribution stage for current or future check of all related information like consignment numbers, food handling, date of expiration temperature at which food was kept, and other relevant information.

4.1.3 Controlling Weather Crisis

While growing different types of crops farmers often face unpredictable weather conditions. Therefore, for the survival of crops predicting and monitoring weather conditions are important.

Step 1: Agricultural weather stations will be placed within the farms which will provide important information such as the temperature of the soil, air temperature, rain prediction, breeze speed, etc. This information will be kept in the blockchain to help farmers to make timely decisions.

Step 2: In case of crop damage during a weather disaster, Farmers will rapidly place a request to get the crop insurance claim through the blockchain and after the approval of the claim request farmers will automatically get the requested amount.

4.1.4 Managing Agricultural Finance

In managing agricultural finance farmers often faces problems like lack of transparency, previous credit record, and implementation of the contract, these are challenging issues between formal financial authorities and farmers. Limited access to financial services may impact the performance of agricultural value chains and farmers cannot improve the yields, as well as buyers, may also be impacted.

Blockchain will provide help to farmers will bring transparency in procedures of agricultural finance through mutual control access.

Step 1: Every transaction will be recorded in the blockchain and access will be provided to all parties to bring transparency to the system.

Step 2: Blockchain has the ability to record information on a permanent basis where it can be a good source for verification of transactions and audit can be conducted easily through blockchain ledgers without getting information from relevant parties. Automation is the process of conducting an audit that will bring more transparency and the cost will also be reduced.

4.2 Main Features of Combo Smart Model

4.2.1 Provide Support to Farmers

Crop failure is a common problem faced by farmers around the world, it always occurs because of critical climatic circumstances, such as unpredicted rainfall and unreliable weather condition secondly farmers also need to monitor factors like soil quality, pesticides, crop diseases, water requirements which can impact their crops. To solve these problems we have connected IoT devices with the smart model which will help farmers to monitor all these factors to initiate timely action, Another problem that needs much attention is the safety of food, Safety of food denotes the supervision of all food production process to ensure the delivery of quality food and reduce the risk of individuals becoming sick from foodborne illnesses. Our proposed model will monitor the whole food production process start from farmer to consumer.

4.2.2 Improve Food Traceability

No one in the world can surely say that he has bought a good food to eat; here our smart model with blockchain infrastructure can solve the problem of consumers by providing them access to know where and how their food initially originated and how it reached them. Traceability is another fabulous feature of our smart model which will allow farmers to record the status of their crops and track the whole process, planting, harvesting, storage, and delivery. In this way, food frauds will be reduced, and farmers will be paid fairly secondly through a tracking system another stakeholder in the supply chain will also able to track the whole process and trust will be developed among all parties.

4.2.3 Improved Farmer Productivity

Presently, the majority of the farmers depend on different agriculture-related software to record their data and they have no common platform due to which they need a lot of effort and bear cost. Our smart model will permit farmers to record all information on a single platform and everyone can easily access it according to his need.

4.2.4 Fair Mode of Payment

Numbers of problems currently exist that make it hard for the farmers to acquire payment for their crops like payment through wire transfer which often takes a substantial amount to transfer money due to which farmers' profitability may decrease.

In our proposed smart model smart contracts based on blockchain will ensure payment to farmers in a fast and automatic way without being charged. Farmers will able to get paid for their produce immediately after delivery. Another feature of this model is smart contracts through which the role of middlemen has been eliminated; farmers often face issues to sell their good in the market at fair worth and they often need helps from middlemen for which they have to pay extra amount or they can be cheated by mediators. Through smart contracts, farmers will interact straight away with retailers and they will be able to get a fair price for their products.

5 Validation of Proposed Combo-Scheme

The proposed Combo-Scheme is shown in Fig. 8. As we do not find such a combo scheme in the literature, hence we have validated our combo scheme with our won scheme as presented with the blue plot in both figures. The blue plot indicates throughput in regard to the implementation of IoT in the agriculture sector with the deployment of various nodes in the field under monitoring. The results themselves proved to be quite promising. The red plots indicate an improvement of our initial scheme with the utility of blockchain along with IoT. The results show a tremendous raise from the single IoT-based scheme which validates the performance of our combo scheme in contrast to the various nodes deployed and tested in the agriculture field.

Fig. 8
figure 8

a Throughput versus node deployed. b Throughput versus node deployed

6 Conclusions

Nowadays food supply chain companies are concentrating to find the actual food source and track the whole process of food production from food origin to end consumer which is one of the most challenging tasks for them. In this research work, we made an attempt to address this issue by providing a solution to this problem by creating a smart model based on blockchain and IoT technologies with our own understanding grounded on background literature. We have proved in our research work that blockchain in combination with the IoT can be more beneficial to track the whole process of food lifespan, avoiding a large amount of food wastage, detect and eliminate the cause of foodborne disease within moments whereas the current systems are taking weeks. In addition to that proposed system will offer better consumer self-assurance which will reveal sales and customer pleasure.