Blockchain Based Crop Insurance: A Decentralized Insurance System for Modernization of Indian Farmers

: Conventional crop insurance systems are complex and often not economically feasible. Farmers are often reluctant to be covered for their crops due to lack of trust in insurance ﬁrms and the fear of delayed or non-payment of claims. In this paper, a blockchain based crop insurance solution is suggested. The solution suggested in this paper is an affordable, efﬁcient, low cost crop insurance solution which will ensure many farmers are insured and beneﬁting from timely crop insurance. Currently the cost of administering insurance is an essential barrier to accessing this facility. With the proper use of blockchain based on ethereum this expense can be reduced dramatically. We have conducted various tests on platforms such as Google Cloud and found that the least throughput is 165 transactions. Upon analysis we have found that the time taken by the block formation is directly proportional to the timing of processing. The end-to-end average latency of the system was achieved as 31.2 s, which was quite effective for the infrastructure what we are using. Upon conducting acceptance testing, we found that the system suggested in the paper is effective and we are planning to release the application on open source platforms for future improvements.


Introduction
India is an agricultural nation where 60% of the population benefits directly or indirectly from agriculture, but the main causes of farm suicides in India are the agricultural crisis, including crop failures, followed by natural calamities such as droughts, hurricanes and floods [1,2]. Crop insurance is very important for developing countries such as India, Pakistan, etc., as they provide various advantages such as income stability, minimum debts, knowledge about use of new techniques in farming such as Internet-of-Things (IoT) and Blockchain which can protect the farmers from agricultural losses [3]. At present, blockchain technology is revolutionizing various sectors such healthcare, supply chain, insurance, etc. However the insurance sector is the sector which has not taken on new technology at the same rate as other industries so far. Blockchain and distributed ledger solutions are said to be capable of transforming the current financial system, especially the post-trade side, even though they are still very early [4]. The traditional insurance systems are centralized and farmers have to follow various terms and conditions to get insured. Since, a majority of farmers are not highly educated to understand the conditions and they are left uninsured and in case of occurrence of natural disasters, they suffer from losses and they commit suicide. Moreover, A farmer loses all his investments in the cultivation after a crop failure resulting in default of loan repayments. The only solution they can see is either suicide or loan exemption by the government. However, loan exemption is not only the solution. Moreover, it is going to be disastrous. The only solution can be crop insurance. Crop Insurance is purchased by the farmers and subsidized by the government to protect the farmers' investments. In the case of the crop failures, the farmers get the money he invested through the insurance. The crop insurance can solve the problem by establishing financial stability in marginal and small farmers by protecting the farmers' investments in crop production and improves the risk-bearing capacity i.e., the farmers can be assured that investments can be retained by either selling crops or through insurance. The other problem which can also be tackled through crop insurance is a reduction in debt stress. Crop insurance can help in the reduction of risks of becoming a defaulter of institutional credit. There is no need to seek a loan from private money lenders who charge high-interest rates. A farmer will not have to go from distress sale of his produce and ultimately his land to repay private debts. The third major issue is the increase in investment and the use of technology. An insured farmer is likely to allocate his resources in rational ways as he's assured that he will be compensated through insurance. He may adopt practices like growing profitable crops such as potatoes, use new improved technologies, devising methods to increase profitability. This will, in turn, increase the value-added from agriculture and subsequent income of the small families [3]. Blockchain and Smart city are new technologies that in recent years have gained considerable attention as a way of minimizing city managers' costs, automating city management activities, and supplying end-users with real-time services [4].
In this paper, a blockchain based crop insurance solution is suggested as a blockchain network provides a new infrastructure for storing, validating and transfer of data in a secure and reliable manner. Since blockchains are based on the concept of smart contracts, it provides a tamper-proof environment meaning a transaction is only executed only when it receives verified data and no malicious user can modify the system [5]. The system suggested in this paper will be an efficient and cost-effective solution for crop insurance which eliminates the need of a centralized party for transactions thereby eliminating middlemen and frauds.
The major aspects that are being covered in this paper are: • It provides a blockchain-based crop insurance solution based on smart contracts. • It also covers the aspects of the application that is developed for the farmers which can be hosted on the cloud environment. • Deployment of the proposed algorithms for the crop insurance system on the solidity and the analysis of the same.
Rest of the paper is structured as follows. Section 2 deals with the related work. Section 3 deals with the significance of the study. Section 4 deals with the suggested methodology and working of the system. Section 5 deals with the results and analysis. Section 6 deals with the discussion and future scope of study. The paper was concluded in Section 7.

Related Work
Various studies have been done globally for resolving the challenges faced by farmers and development of the agricultural sector. In [6] the authors have suggested a blockchain based crop insurance framework based on NEO blockchain. The framework is based on oracle server and the drawback of this framework is that it only analyzes the losses incurred by the farmers during drought and fails to analyze the extreme conditions. In [7] the authors have developed a decentralized peer-to-peer crop insurance solution which is transparent and no information is hidden from the stakeholders. This solution supports trust in a trustless environment to help the farmers become self-sufficient. In [8] the authors have developed a system named 'Etherisc' to show the effect of decentralized smart contract systems on demand and supply along with principal-agent modelling with constrained optimization. In [9] the authors have suggested a blockchain based insurance system in smart cities (BIS). This system consists of the smart city managers, insurance companies, users, sensors and other devices. In this system, the users are recognized by their changeable public keys and provide a level of anonymity. The challenge of false claims and manipulation of claims were resolved in [10] by developing an insurance system through a consensus algorithm which ensures the integrity of the system. This paper represents confidence and decentralization among agricultural stakeholders such as farmers, supply companies, and markets. The authors in [11] have developed a system for noderecoginition using the blockchain in the IoT environment. The said sytem is able to maintain the security spects of the data that is stored. In [12] the authors have suggested usage based insurance (UBI) framework for storing the data of the transaction along with the calculation of premium amounts and new insurance schemes. The studies on blockchain based crop insurance systems are ongoing and currently are limited. However, other insurance applications such as vehicle insurance and healthcare insurance have been studied. In [13] the authors have suggested an algorithm for live video transmission using the blockchain technology. They have pointed that the concept can be used in other applications also. In [14] the authors have suggested a concept based on smart IoT and data analytics for cellular applications and networks for better efficiency. The sam can be used to built the good applications with blockchain technology. In [15] the authors have reviewed the application of blockchain technology for improving the food traceability systems. The goal of this review was not only to review the features of blockchain technology but also to highlight the benefits and limitations of blockchain technology in the food supply chain. In [16] suggested the wayout to deveop some commercial web applications based on intelligence. In [17] the authors have presented a blockchain based framework for the automotive insurance sector which is capable of regulating the insurance claims for automobiles and automate the process of payments of claims. The authors in [18] have suggested a blockchain based framework for resolving the challenges faced by the agricultural sector from natural disasters such as lightning, storms, etc.
The insurance systems in literature studied above are inefficient at large scale as most of the systems are either very simple or too complex to be implemented in rural areas where there is a lack of knowledge about technology. The solutions suggested in the literature are lacking in scalability and most of them do not obey the standard regulations as set up by regional organizations [19]. Moreover, the systems suggested in the literature claims to provide a tamper-proof environment for the execution of smart contracts and free from any external attacks. However this is proved to be wrong as in case of any attack, the target is not the ledger but the crypto wallets which can lead to misleading results [20]. Although there are pros and cons for every system, the system suggested in this paper tries to resolve these challenges, developed by following standard protocols and provide a simple yet effective system which requires less technical expertise to implement on a large scale.

Significance of Study
One of Blockchain Technology can revolutionize the insurance sector and change the way things are done today [21]. Properties such as distributed ledger will provide storage of both static and dynamic transactions without the need for a centralized authority, along with a consensus mechanism which helps in validation of the transactions [21]. Current insurance applications face the challenges [9,[20][21][22] such as:

•
Fraud identification: Both insurance providers and consumers have financial benefits in committing fraud that render identification of fraud important but difficult and expensive. • Insurance experience providers: People tend to buy several insurances to protect a range of properties that usually come from various insurance firms. Thus, the past of consumer policy is dispersed among various firms that make establishing the policy background time-consuming and costly.
• Delay in identifying the perpetrator: The period required to compensate the consumers for their negligence is attributable to the difficulty in locating the party responsible. The collecting of data mainly helps the insurance agency to send specialists to assess the loss. It is therefore risky for the insurance company and inevitably impacts insurance rates. • Transparency: Consumers do not necessarily have access to the details collected by the insurance company so that they cannot check the authenticity of the details and, thus, the judgment of the insurance insurer. Therefore there is no certainty that the proof gathered is right which restricts the integrity of the mechanism of liability.
The system suggested in this paper is simple and offers transparency and resolves the challenges such as non-payment or delay in payment of insurance claims, delay in conducting crop evaluation and high premiums. In our system, the entities are assured that the smart contract will be implemented correctly, because it will be implementing a consensus process in the public blockchain [4,22]. The architecture of a blockchain also removes the involvement of middlemen and brokers. That will increase the capabilities of the entities. For conventional insurance models, shifting the cost of insurance coverage to another party is complicated or even impossible for the insurers. Nevertheless, by implementing the smart contract, insurers are issued tokens for their commitments (i.e., ERC20 tokens for the Etherium) [4,22,23]. The tokens are issued upon the requirement by the insurers and its value is dependent on market fluctuations [24]. These tokens acts as a standard and the insurers can in this case sell their tokens to other insurers. The transactions is done by mutual agreement with issuance of certain tokens. The tokens are fixed but the values might get affected by the market fluctuations but not that much which can affect the insurance companies and other users. With progress in further studies and technologies, high transaction costs may occur but with development of advanced protocols this cost can be lowered. When the deal is over, the insurers should be reimbursed for their obligations. Moreover, our system continuously monitors any damage or attack to the system which enables the insurers to measure the performance of the system in a straightforward way.

Suggested Architecture and Working of System
The major idea of the system suggested is the placement of contracts in a decentralized platform for execution purposes and to store the results and implement the traditional insurance processes using smart contracts. Blockchain based Insurance system will help insurance companies in detection of frauds, and easy processing and settlements of claims. An additional assessment of claims will be triggered by the smart contracts if it is approved by the insurer. According to a study [25], the total cost of insurance frauds is greater than 50 billion USD in the United States. Existing insurance systems are complex and have limitations which can be exploited easily. This becomes an opportunity for the criminals to make duplicate or multiple claims across various insurers. Blockchain technology can enable a secure coordination between the insurers for combating frauds. The records are stored on a cryptographically secured distributed ledger and any malicious activity will break or stop the transaction, thereby preventing frauds. The main benefit of using smart contracts is it eliminates the need of reviewing the claims again and again and makes the submission of claims simpler [18,21]. The major stakeholders of the system are: • Farmer-The insurance service is requested by the farmer from the insurers. The farmer should gather his personal data, crop information; land coordinates so that quality services should be available for them. The already insured farmers should make sure that they should upload their insurance policies for better service. • Smart Contracts-Upon updation of the insurance policy, the important details such as Unique ID (UID) of the policy, beginning date of the policy, expiration date of the policy, insured amount, and the geological coordinates of the land as the vertices of a polygon. The details extracted get verified by the farmers and it should be written on the blockchain as a service that is hosted on a Cloud Platform such as Azure, AWS, Google Cloud etc., as a smart contract with a document of insurance policy. Once the details are updated and smart contract is created, it will consult an expert and if the insurance policy is valid i.e., if it is in between the beginning date and expiration date, then the geo-coordinates are verified whether these coordinates are within the location which is marked as the location of a natural calamity (such as, drought, heavy rainfall) by the insurers (the insurers will return a set of polygon vertices of the locations under a natural calamity). With the help of machine learning, the users can analyze the weather conditions for the land coordinates. It is of basic use in our system as mostly the weather analysis and predictions are provided by the local weather departments. • Insurance Providers-They will verify the weather conditions from the weather department of the state at the land coordinates where any natural calamity has occurred in a given period of time. Once the verification is done, they determine the amount that has to be paid to the farmer on the basis of several factors including, insurance policy, type of crop, weather conditions and the location of land. Based on these factors, the illustrative evaluation of crop insurance is as follows: Let in the period of twelve months, if the heavy rainfall condition at the land location is greater than 10 days and the crop (e.g., Rice) is in seed sowing season then this situation may result in full 100% payment of the insured amount. If the heavy rainfall condition is less than 6 days, then the farmer is liable to get 30% of the total insured amount. The land will be classified under heavy rainfall if it lies into the area of heavy rainfall as decided by the insurers [26]. If the land of the farmer is under heavy rainfall or any other natural calamity, then the payment should be released by the smart contracts to the farmers. This will allow a direct participation of all insurers and other entities through blockchain. The methodology suggested in this paper is inspired from [23,26] with improvements. Insurance companies hold the information pertinent to the applicable policies on the chain inside the documentation region of a deal or off-chain, e.g., on the business website. The former method lets customers uncover all qualifying insurance firms by looking for the blockchain which in effect provides the smaller insurance companies with a desirable environment by supplying them with high visibility [23]. The insurance firms store main words in the ledger, e.g., insurance forms, thus holding off-the-chain details to reduce the related overheads. Customers pick a proposal and sign a contract in the context of a smart contract which is held in the blockchain. The smart contract serves as the transaction of the inception, i.e., the first in a ledger process, and all such contract-related transactions are connected to the process of creation [21]. The general workflow [26] of the system is given as Figure 1. To improve the efficiency of the services provided by the insurance industry and to eliminate abuse, the records of the numerous involved agencies are maintained in the database network and exchanged with specific insurance firms [20][21][22]. Sharing such details will thus jeopardize the privacy of consumers. The user should store the data locally and distribute only on demand to address those limitations. To guarantee data confidentiality, the hash of the data is kept in the blockchain [20][21][22]. The suggested system helps the clients to manage their money through a secure blockchain system. Ethereum or some other cryptocurrency handles the transfers. Blockchain crop insurance helps consumers to exchange and check their insurance history by inserting new tokens issued by insurance providers either at the time of policy completion or at customer request [20][21][22]. To sum up, a Blockchain-based insurance scheme encourages transparency and reliability in the insurance market, significantly cuts costs and time, and prevents forgery in the method of determining harm and identifying the suspect at the moment of the incident, which protects both the customer and the insurance company [23,26]. Different components used in the system are summarized in Table 1. The architecture of our system is given by Figure 2. The system will enable any asset of the farmer having any monetary value, to be exchanged over the blockchain network. This transaction will be governed by smart contracts. A consensus will be run by a peer node validator over a transaction which creates a new block [23]. The execution scenarios are decided by each smart contract through a verification logic. This logic is executed by a set of endorsers which are related to a specific smart contract [27]. Our system generates simple transactions, from user registration, policy registration, premium payment, claim processing and refunds. The results of the transactions are maintained and stored on the blockchain network. This makes it impossible for any false transactions and also makes the insurance provider accountable [28]. This can be better understood by the Algorithms 1-4 [21,27,29] respectively.

Algorithm 2 Registration Process
Process User Register 1. User structure created//client structure contains details like age, id, gender, contact etc.) 2. D ← structure stored in a database 3. K ← f(uid1, uid2)//uid1, uid2 are insurance agent id's created by agent key K 4. B ←f (D)//Client object B created by client object key D 5. Info stored in a database So first of all the registration process is defined and executed where the information of the farmer is stored in the form of a database as defined in the steps as mentioned in the Algorithms 1 and 2. After this the issue of policy is being initiated following some basic checks as mentioned in Algorithm 3. Once the policy is issued then later on if someone claims it on account of any reason then the procedure as mentioned in the Algorithm 4 will be executed. Search UID of purchased policy in database 2.
If UID belongs to Database 3.
If client is registered with agent X with UID y 7.
Info stored in a database 10. Else 11. return no policy issued Algorithm 4 Claiming of Policy do Account open ← B 5.
if Account = TRUE then 6.
if amount + claim ≤ Premium paid then 7.
Update account ← B 12. end

End
For understanding the working of algorithms, consider the following. Let "Q" denote the insurer's maximum premium which the vendor will pay. In other words, The higher premium than Q is unprofitable for the vendor. Let "L" stands for the least premium benefits that the insurer will profit from. Therefore, we can represent A (L, Q) as a collection of potential value for a premium resulting in an insurer's positive utility V(a A) -> Z + . Let X represents the total number of insurers and Z represents the total number of farmers (X ≥ Z). Considering the equal benefits of insurers and farmers, We can consider the following, Let the insurer offers "B", uniformly random from A, formally for all a 1 , a 2 A, a 1 not equal to a 2 , P(B = a 1 ) = P(B = a 2 ), then insurer's estimated utility is given as [30][31][32] Here, the insurer's estimated utility is the amount of its premium multiplied by the likelihood of the claim of insurance by farmers [30][31][32]. The best offer given by the insurer as [30][31][32], With an increase in the premium value Q, the number of farmers Z, an insurer's offer also increases, whereas, with an increase in the number of offers X, the insurer decreases their offer for maximum benefits. To show the usage, practical implementation has also been done. The modules are simpler. First the farmers registers themselves to avail the facility of crop insurance. There are various insurance providers and farmers can choose accordingly. The farmer will upload the basic details (name, contact, etc.) along with specific details such as which crops are cultivated on the field, address of the fields and on how much area the crop is cultivated. Weather details are provided by the weather monitoring centres for prediction of future weather and to plan the cultivation according to that. Sometimes the predictions are directly available to the farmers through various sources such as media, weather prediction apps, etc. After all analysis, the farmers choses the most suitable insurance providers, choose their premium plans, time period (monthly, yearly or half-yearly). All these information is linked to the user through a unique hash id or Ethereum blockchain address of the farmer which he has entered during the registration process. All the data over the blockchain network gets stored and becomes accessible for other nodes in the transaction through this hash id. The front end of the web app is given by Figures 3-5 respectively. There are some validation cheks are imposed to safeguard the farmer interest like loss of key. Although each farmer has its own unique hash id as mentioned above and on a blockchain network every another transaction will have the previously used hash id which would help in retrieving the lost keys if happens.   In backend, the working of the blockchain in shown by Figure 6a,b respectively. Each time a transaction is executed, it gets stored on a blockchain network. Everytime a new transaction happens a block is created and added to the blockchain network as depicted above in Figure 6a. New blocks have been allocated a new block number in the sequential manner. Similarly from Figure 6b it is depicted that the data here is in secure form and it is not public. It is only shown to the owner of the contract. For reading or writing the data on a blockchain, some amount of fee, called gas fee is required to be spent. This can be done with the use of a wallent provider, Metamask. We have used MacOS as operating systems and ganache as personal blockchain platform. Metamask is being used as a cryptocurrency wallet provider for interacting with the blockchain network. The system developed here is a basic system which has been used to get an idea aboout how the system works. It contains minor bugs which are required to be resolved. Once resolved we will release full application on open source platforms such as github for further research and improvements in the system. As soon as the data is written on the blockchain network, various parameters were obtained when the first contract is created. The ledgers can be made public, if required to check the trustworthiness of the transaction. By default, this ledger cannot be made public as this may increase the risk for cyber attacks and data leaks. However, for wide use, the system can be implemented on public blockchain networks. This is summarized in Table 2.

Results, Analysis and Testing
To test the effectiveness of the system, we have performed certain simulations by creating a virtual testing environment which is as similar as the real environment. We have used Google Cloud (GCP) platform for testing purposes. The system used for testing is i-mac consisting of MAC OS Sierra with 32 GB of RAM with 8 GB Radeon Pro Vega 56 GPU. Ethereum Blockchain with Node.js as controllers. Since the output of any system executed is affected by the controllers, following were the modifications done in order to get the best results. The throughput was increased to 220 when the instances were upgraded. RAM usage reached 80% with CPU load 70%. The processing powers are shown in Table 3. The controller was set to the best possible version of the instances. F1-micro was found to be least performing and has yielded an efficiency of 165 throughputs per second. The efficiency of 165 throughputs per second as shown in Figure 7. We found that the RAM was used 100% as the testing started and the load on the CPU was found to be steady. The throughput increased to 215 upon up-gradation of the instances. This up-gradation is due to the high clock speeds. RAM usage decreased as the amount of memory has been increased at significant steps. No extra Outputs based on the vCPUs were found but the load is maintained at 75%. The controllers play a major role in influencing the overall performance of the system. The main reason behind this is that the throughput is not affected by the number of users and the processing speed of the transaction of each user. The transaction timings are affected by the clock speed. In this testing, the clock speed remains the constant for all cases. The only variations were done in vCPU.
Another factor that affects the performance of the system is the block timings. Two users and two controllers were used for testing purposes and executed on the default settings on the cloud. Here, we found that the resultant decreases upon increasing the block size. The time taken by the block formation is directly proportional to the timing of processing as depicted from Figure 8. Since our ultimate goal is to maximize the throughput, the block timings are kept 1 s.  Figure 9 shows the time consumption with respect to transaction. As shown in Figure 9, the memory is increasing significantly, which is necessary as it makes the system stable. The end-to-end latency of the system was also tested by the calculation of time taken for conducting a valid transaction. The latency was calculated for first 20 valid transactions, called as experiments, happens due to throughput of the network long with the time required by every node in a network to perform a transaction. The latency achieved of 31.2 s is quite effective because of the limited infrastructure available at the time of experiment. It was also found that the system was not time sensitive. This is shown by Figure 10. We have also conducted a survey for acceptance testing to see whether the system is accepted by the farmers for use or not. Because of time constraints and limited infrastructure, we have conducted a survey of 50 people including farmers and local insurance providers. Some people suggested improvements in the system but overall results show that the system is effective and with some improvements it would be ready for use globally. The result is shown in Figure 11. The questions asked were as follows: 1.
Does the system resolves the challenges faced by conventional insurance systems? 2.
Is the system easy to operate and will the insurance providers and farmers will use the system, if improved based upon their suggestions? 3.
Does the system create a revolution in agricultural and insurance sector?   Blockchain can also be integrated with many applications to make them secure which are based on IoT (Internet of Things) for the WSN (Wireless Sensor Networks) [14,[33][34][35][36]. Also there is a possibility of using the blockchain in already develpoed system and applications for the healthcare [36][37][38] and in computational based techniques [39,40] in the future.

Discussion and Future Scope of the Study
In majority of countries, only a few percentage of farmers have access to agricultural insurance. Affordable crop insurance solution is a necessity for farmers to increase their resilience to the effects of climate change [41]. Traditional insurance solutions are not cost effective and have no trust between the insurers and beneficiary due to history of delayed payouts [41]. The blockchain based insurance system suggested in this paper affordable to small farmers at scale. In our system, the insurance policies are hosted on smart contracts which can act according to the weather conditions. In case of natural disasteers or extreme weather conditions, the smart contracts are executed which facilitates a timely payout in a transparent manner.
The insurance service provider along with the weather data providers facilitates the premium payments along with the collection and management of weather data. The insurance policies are registered as a smart contract on a blockchain network which will provide a secure environment for fast payment processing. Once the smart contract is executed upon extreme weather conditions, the payouts are made via mobile money or tokens issued to the users.
This system however does not use any cryptocurrency such as bitcoin directly which could increase the potential risk of system failure under crypto market fluctuations. This can be treated as a limitation of the system as it doesnot directly involves the transactions with cryptocurrencies. Furthermore, due to COVID lockdown restrictions, other domains such as aerial remote sensing image technology in crop cultivation are remained unexplored and this is the motivation for our future work. Our future work will be based on increasing the capabilities of the system as integration of our system with a food traceability system for ensuring food safety and tracking of food products from farm to our homes along with using Unmanned Aerial Vehicles (UAVs) and remote sensing technology to enhance the current system.

Conclusions
Agricultural sector is one of the major sectors responsible for the growth of the economy of any nation. Most of the developing countries are directly or indirectly dependent on agriculture and a large group of people are employed in this sector. However, in case of any natural disaster such as floods, earthquake, etc., this sector is affected the most and the farmers suffer from great losses. So, governments are always initiating some schemes related to crop insurance but the major challenge is whether the farmers are getting the benefit of the same or not. In this paper, we proposed and developed a decentralized mechanism of crop insurance based on the emerging technique of blockchain. The system proposed and developed will eliminate the need for middlemen and ensure transparency in the agro finance system. It utilizes the concept of smart contracts while implementing the insurance system. Upon analysis of the results, we found that the suggested system is effective which is supported by the acceptance testing and thus it can be said that the proposed system can be applied to a larger scale for the benefit of the agro industry.

Data Availability Statement:
The data that support the findings of this study are available from the corresponding author upon reasonable request.