Agricultural trade in developing countries continues to depend on informal agreements, multi-tier intermediary networks, and centralized payment mechanisms, resulting in payment delays of 30–90 days, information asymmetry, and weakened bargaining power for smallholder farmers. This paper presents AgriHandshake, a blockchain-based smart contract platform enabling direct crop trading between farmers and vendors through an automated escrow payment mechanism deployed on the Ethereum network. The system employs a hybrid architecture that stores cryptographic state hashes and escrow logic on-chain while offloading trade metadata and delivery documentation to the InterPlanetary File System (IPFS), reducing average transaction gas costs to approximately 85,000–210,000 gas units per operation. A Solidity-based escrow contract enforces a structured four-state machine
(CREATED?FUNDED?DELIVERED?COMPLETED/DISPUTED) with a 72-hour automatic payment-release timer implemented via block.timestamp. Experimental evaluation on the Ethereum Sepolia testnet demonstrates average smart contract function execution latency under 15 seconds, end-to-end trade confirmation within 3–8 minutes including IPFS upload, and strong resistance to reentrancy and front-running attacks. Comparative analysis against eNAM, FarMarket, and AgriOnBlock confirms that AgriHandshake is the first platform to combine a dedicated escrow payment guarantee, decentralized off-chain storage, and a farmer-centric usability model within a single deployable framework.
Introduction
AgriHandshake is a blockchain-based solution designed to solve major inefficiencies in India’s agricultural trade system, where smallholder farmers often lose 40–50% of income to middlemen and face delayed payments of 30–90 days. Existing platforms like eNAM improve digitization but do not guarantee secure or timely payments, leaving farmers financially vulnerable.
The proposed system introduces a Solidity-based smart contract escrow on Ethereum that automatically locks vendor funds at the time of trade and releases payment only after verified delivery or a 72-hour timer. This ensures farmers receive guaranteed, timely payments without intermediaries. Delivery proof is stored using IPFS, creating tamper-proof evidence, while a dispute mechanism allows temporary freezing of funds if issues arise.
Key contributions include a hybrid on-chain/off-chain architecture that reduces gas costs, secure smart contract design with protections against common blockchain attacks, and a comparative analysis showing it offers a more complete solution than existing agricultural blockchain systems.
The literature review highlights that while blockchain has improved traceability and supply chain transparency in agriculture, most existing systems fail to address the financial transaction layer. AgriHandshake fills this gap by focusing on programmable, automated payment enforcement.
Conclusion
This paper presented AgriHandshake, a blockchain-based smart contract platform for direct, intermediary-free agricultural trade. The system introduces a Solidity escrow contract with a four-state machine, a 72-hour automatic payment-release mechanism based on block.timestamp, and a hybrid on-chain/IPFS architecture that reduces gas costs by approximately 65-70% vs. fully on-chain alternatives. Evaluation on the Ethereum Sepolia testnet demonstrated average transaction latency under 15 seconds, full trade cycle completion within 3-8 minutes, and a complete trade cycle gas cost of approximately 420,000 gas units. Security analysis confirmed effective mitigation of reentrancy, front-running, integer overflow, and data availability threats.
Comparative analysis against eNAM, FarMarket, AgriOnBlock, and AgroBLF confirmed that AgriHandshake is, to the best of the authors\' knowledge, the first platform to combine a dedicated escrow payment guarantee, decentralized IPFS storage, automated settlement, and farmer-centric usability within a single deployable framework.
References
[1] Ministry of Agriculture, Govt. of India, Economic Survey of Agriculture, New Delhi, 2023.
[2] Food and Agriculture Organization (FAO), Improving Market Systems for Smallholder Farmers, Rome, 2022.
[3] National Agriculture Market (eNAM), Ministry of Agriculture and Farmers Welfare, www.enam.gov.in, accessed 2024.
[4] G. Zhao, S. Liu, C. Lopez et al., Blockchain technology in agri-food value chain management, Computers in Industry, vol. 109, pp. 83-99, 2019.
[5] C. Bartoli, L. Orero, and F. Brunetta, The role of blockchain technology in agrifood systems, Palgrave Handbook of Blockchain Technology for Business, Springer Nature, 2025.
[6] Y. Cao, C. Yi, G. Wan et al., Role of blockchain-base platforms in agricultural supply chains, Transportation Research Part E, vol. 163, 102731, 2022.
[7] A. Shahid et al., Blockchain-based agri-food supply chain: A complete solution, IEEE Access, vol. 8, pp. 6923069243, 2020.
[8] A. Marchese and O. Tomarchio, A blockchain-based system for agri-food supply chain traceability, SN Computer Science, vol. 3, no. 4, p. 279, 2022.
[9] S. Wang, D. Li, Y. Zhang et al., Smart contract-based product traceability in supply chains, IEEE Access, vol. 7, pp. 115122-115133, 2019.
[10] H. R. Hasan et al., Smart agriculture assurance: IoT and blockchain for trusted produce, Computers and Electronics in Agriculture, vol. 224, 109184, 2024.
[11] G. Leduc, S. Kubler, J.-P. Georges, Innovative blockchain-based farming marketplace, J. Cleaner Production, vol. 306, 127055, 2021.
[12] A. El Mane, K. Tatane, Y. Chihab, Blockchain-enabled smartcontracts for agricultural supply chains, ICT Express, vol. 10, no. 3, pp. 650-672, 2024.
[13] F. Mokgomola et al., Blockchain and smart contracts based agricultural supply chain, Procedia Computer Science, vol. 237, pp. 637-644, 2024.
[14] H. Patel and B. Shrimali, AgriOnBlock: Secured data harvesting using blockchain, ICT Express, vol. 9, no. 2, pp. 150-159, 2023.
[15] N. R. Puthenveettil and P. K. Sappati, Smart contract adoption in agriculture and food industry, Computers and Electronics in Agriculture, vol. 223, 109061, 2024.
[16] X. Peng, Z. Zhao et al., Blockchain smart contracts in agri-food industry, Computers and Electronics in Agriculture, vol. 208, 107776, 2023.
[17] C. Mambile et al., Evaluating blockchain for contract farming in Tanzania, Sustainable Futures, vol. 10, 100905, 2025.
[18] T. Kassanuk and K. Phasinam, Blockchain-based smart agriculture framework for safety and security, Materials Today: Proceedings, vol. 51, pp. 2313-2316, 2022.
[19] O. Bhadra, S. Sahoo, R. Halder, C. M. Kumar, AgroBLF: Blockchain-based framework for smart agriculture, Innovations in Systems and Software Engineering, 2022.