Smart Contracts as a Tool to Support the Challenges of Buying and Selling Coffee Futures Contracts in Colombia

.


Introduction
Throughout the 20th century, coffee was Colombia's main export product, driving its economic development.The sector's success between the 1960s and 1980s was partly attributed to international agreements that stabilized coffee prices through production quotas.The dissolution of these agreements in 1989 marked a crucial moment, leading the country into a free-market environment with high price volatility and catching industrial associations off guard [1,2].
In response to these decisions, the National Federation of Coffee Growers (FNC) implemented mechanisms such as Price Protection and Futures Delivery Contracts to ensure a minimum price and stabilize the value of coffee nationwide [3].However, these strategies transferred price risk to the FNC, cooperatives, and traders, leading to using derivatives such as coffee futures contracts in international markets.
Coffee futures contracts are agreements between parties that set the price and time of trading a specific quantity of coffee on a future date.Futures contracts are traded on stock exchanges and standardized in terms of quantity, quality, and delivery date, where both parties are obligated to fulfill the contract terms at the expiration date, either by delivering or receiving the specified asset or settling the difference in cash [4].These contracts are used by both investors and producers to hedge against price fluctuations or to speculate on future market movements [5].
The "Coffee KC" contracts on Intercontinental Exchange (ICE) are crucial for Colombian coffee; they involve the future delivery of green beans to warehouses in the United States or Europe [6] The contracts are linked to international market volatility, mainly influenced by Brazil's production, standardized with expiration dates and adjustments based on origin and quality [7] While futures contracts ensure minimum income and reduce risks in the sector, recent events such as post-pandemic inflation and climatic phenomena like El Niño led to a sharp increase in prices in 2021, resulting in sudden losses in futures positions, driven by various factors [8,9].In response, some producers defaulted on delivery agreements, selling directly in the physical market at higher prices.This default affected approximately one million contracted sacks in September 2021.While the FNC allows a year to fulfill obligations, it faces negative global repercussions, including the possible withdrawal of the "Single Origin Colombia" brand [10].
In developing these practices, different challenges are identified, such as the lack of transparency in the supply chain, abrupt price fluctuations, and adverse conditions that disadvantage the sustainability of this practice [11].Intermediaries and distributors leverage their positions, creating an inequitable distribution of benefits at each chain stage [12].As technological support for these issues, smart contracts emerge.These selfexecuting computer programs on a blockchain are designed to automate, verify, and efficiently enforce contractual agreements [13].They automatically execute when predefined conditions are met, offering various benefits that can positively transform the supply chain and commercial transactions, eliminating the need for intermediaries and providing transparency, security, and reliability to the parties involved [14].
Smart contracts offer the possibility to verify every process step, from harvest to final sale.Works like that of [15] propose the implementation of smart contracts to improve traceability and sustainability in social sales, validate data, and provide recommendations for product management.Additionally, smart contracts are used in a case study in the coffee supply chain to assess the blockchain's potential for ensuring product authenticity in the agricultural supply chain [13,14].
Based on this context, the following research question (RQ1) is posed: RQ1: "How do different actors in the Colombian coffee supply chain perceive the introduction of smart contracts to mitigate price fluctuations in the practice of futures contracts?" In response to these considerations, the research has developed a smart contract to support Colombian coffee producers and promote sustainable processes in the practice of futures contracts for price tracking.Additionally, an instrument has been created to determine user satisfaction when conducting such practices using blockchain technology.
The methods used to design the contract proposal are based on the Harvest TPC methodology [16], where each phase involves the participation of various chain actors, from identifying requirements to testing the contract.As a result, a smart contract has been designed using the Solidity programming language and deployed on a testnet blockchain based on Ganache, Truffle, and MetaMask.The central contribution of the proposal lies in developing the platform that manages the smart contract, allowing the registration of future contractual clauses for price tracking and coffee transactions.At the end of this process, a user satisfaction test is conducted with different chain members using a Likert scale.As a result of the proposal validation, it is identified that over 78% of chain participants support the implementation of technology in sale price tracking processes.Similarly, almost 74% believe the proposal improves transparency and sustainability in agreement execution.This document presents an organizational structure that facilitates the reader's understanding.Section 2 is dedicated to providing the key concepts to conceptualize the research topic and a brief review of the literature.Subsequently, Section 3 explains the methods used to develop the research and reveals and exemplifies the supply chain used for future contracts.As a result, Section 4 presents the design of the smart contract, a discussion of the results of the research topic and a comparison with other studies is also presented.Finally, Section 5 describes the conclusions that summarize the results of the research and future work, providing a logical and coherent structure for the presentation of the content.

Coffee Future Contract
The future contract, commonly known as "futures", represents a commitment between two parties to exchange an asset at a predetermined future date and an agreed price.According to John Hull, this definition describes an agreement where both parties commit to buy or sell an asset in the future at a fixed price, with standardized specifications regarding quality, quantity, and place of delivery, among others [17].
These futures contracts, belonging to the category of "Financial Derivatives", are tools that allow higher returns on investments while minimizing exchange risk.Their complexity lies in their susceptibility to the supply and demand forces of the underlying asset to which they are linked [17].
In the Colombian context, the direct sale of coffee was implemented in 2019 through the "Coseche y Venda a la Fija" program.This approach revolutionizes how farmers market their harvests by ensuring sales without intermediaries.This program establishes market criteria, mainly stock market quotations, to determine the purchase price, providing farmers with a clear view of the quality characteristics and expected volume for the delivery of their products [18].This method has provided security to the producer.It enables them to plan and manage their production more effectively, emphasizing the importance of direct sales without intermediaries in the coffee sector.Producers who participate in this practice commit to meeting the capacity and quality requirements of the product to fulfill the acquired orders.

Characteristics of the Coffee Future Contract
The commercialization of coffee in future markets is commonly divided into two types of beans: arabica and robusta.In Colombia, Arabica coffee dominates, representing 70% of total production.This predominance is attributed to its specific characteristics, such as cultivation at high altitudes, ranging between 600 and 2000 m.Departments such as Nariño, Cauca, Caldas, Risaralda, and Quindío are recognized as the country's leading producers of Arabica coffee.
Colombian Arabica coffee is traded on the international stock exchange.In the Arabica coffee contract on the New York Mercantile Exchange (NYMEX), "KC" prices are quoted in terms of cents per pound of green coffee.The quotation reflects the value in cents an investor pays or receives for each pound of raw Arabica coffee (unroasted) traded in the futures market.In this environment, coffee prices are established per load or pound based on various variables.Coffee futures contracts are traded on exchanges such as ICE futures, US ICE futures Europe, and the B3 exchange (formerly BM&F/BOVESPA).Trading also occurs on the Johannesburg Stock Exchange (JSE) (Holmes and Otero 2020) [12].
Figure 1 illustrates and exemplifies a coffee futures contract, highlighting the complexity and structure of this financial instrument in international markets.This trading process in future markets will provide participants with tools to manage risks and take advantage of opportunities in a highly dynamic environment.In selling a futures contract, the farmer or seller triggers the sequence, as illustrated in Figure 1.To participate in this type of contract, the farmer must commit to producing a specific coffee, which commonly uses dry parchment in this modality.Before reaching this stage, the farmer undertakes the exercise of determining an approximate price that reflects the costs associated with the production of each load, defining a load as 125 kg of coffee.In the example provided, the seller commits to supply four loads of coffee at a selling price of around USD 179 each.This commitment implies that delivery must occur within six months, clearly stating the time terms of each delivery [19].When the coffee is ready to be delivered, the coffee grower proceeds to provide the product to the intermediaries, which in this case are the Colombian coffee cooperatives.These cooperatives assume the responsibility of examining and certifying the state of the coffee before its delivery to the destination, assuring quality and conformity with the terms of the contract [12].
In addition, for the buyer, there are additional relevant data, such as the specific place where the coffee was harvested or its origin.These data allow the buyer to make informed decisions enabling them to seek opportunities that maximize its profits in the subsequent sale of the coffee.

Smart Contract
A smart contract represents software that operates autonomously once deployed on the blockchain network [20], activating when the network participants meet predetermined conditions.The initial concept of the smart contract was introduced by Nick Szabo in 2008 [21], although its practical implementation materialized with the introduction of blockchain technology.
Several prominent blockchain organizations, such as Hyperledger and Ethereum, have proposed standards for developing smart contracts.These standards aim to facilitate the creation and reuse of contracts and establish norms throughout building the blockchain network [21].
Essentially, a smart contract is a computer program that evaluates all conditions the parties agree upon.Its functionality is deployed on the blockchain network, allowing users with the appropriate permissions to invoke it.It enables the verification and tracking of contract compliance, providing a transparent and accessible tool for identifying its execution and traceability within the network [22].

Centralized and Decentralized Traceability Systems in Agri-Food Processes
In agri-food processes, the implementation of decentralized systems for traceability has generated a positive impact on crop sustainability.The information stored in the decentralized network using blockchain remains immutable, thus providing safer and more reliable traceability processes.This impact is primarily manifested in aspects such as transparency, accountability, and fraud prevention.Blockchain-based traceability processes are increasingly used and have emerged as an attractive technology to track product information from its origin to the final consumer [23].
This type of technology is not yet used in developing countries, as is the case in Colombia.In this country, centralized traceability systems are currently employed, allowing all participants in the chain to produce and demand information related to one or several stages of the supply chain.However, these data, usually stored in private servers like the National Federation of Coffee Growers (FNC), pose significant challenges [24].
Centralizing all information facilitates access, resulting in manipulations and alterations, and leading to low-quality control and transparency.Its centralized approach highlights deficiencies, especially for small producers lacking the technology and resources to use these platforms.It affects the ability to apply an adequate level of traceability to the products monitored by the platform, resulting in increased production costs, the loss of information, and the non-certification of their production, among other disadvantages [25].These problems can be addressed by the decentralized traceability scheme based on blockchain, where data transmission to all network nodes ensures immutability.It facilitates data exchange, improves real-time access, and promotes continuous improvement in the supply chain.Transactions and all operational information are transparent and accessible to any traceability partner on the blockchain network, allowing for the audit of all stored data.Using multiple servers simultaneously increases the availability, security, and reliability of data in various processes of the supply chain [25].
Figure 2 shows an adaptation of the architecture proposed by [26] for a blockchainbased food traceability system.This architecture consists of four layers, where the business layer encompasses all activities related to each traceability partner at any stage of the supply chain.Any actor can query, control, and manage traceable information.The information layer processes all data produced by traceability partners, including quality information, purchase and sale data, logistics information, and other types of data, which can be recorded using IoT sensors, non-IoT sensors, or manually.
The blockchain layer facilitates transparency and data security through smart contracts that monitor the quality, sale prices, and product purchase prices at each stage.It provides retailers and consumers with a real-time record of the product's journey through the supply chain, using the information accumulated in each transaction already stored in the Blockchain network.Finally, the application layer enables interaction among traceability partners, offering a comprehensive activity record throughout the process [28].

Current Knowledge Status
We conducted an extensive literature review to meet the research objective and establish the foundation for the previously discussed concepts.It has not only enhanced our understanding and contribution to the topic, but also helped us assess the current state of smart contract applications aiming to enhance transparency in various processes of coffee cultivation traceability at each stage.Specifically, we examined their application in validating clauses of future contracts and ensuring the equitable distribution of income derived from coffee sales.
Works such as the one carried out by [15] propose the implementation of smart contracts to improve traceability in social sales, validate data, and provide recommendations for product management.Similarly, the authors [27] suggest implementing a data monitoring and traceability system in the coffee supply chain to enhance the security and reliability of data management.To this, an IoT device and a smart contract have been added; these tools are used to assess the state of coffee beans and ensure the integrity of information, considering two critical variables, humidity and temperature, during the transportation and storage stages in the supply chain.The implementation of this system is carried out on the blockchain through Hyperledger Fabric.Based on the sensors used and the management of these two variables, the evaluation with Hyperledger Caliper indicates an average performance fast enough for its application in natural environments.It considers the current control conditions of coffee beans, specifying the required quality values regarding humidity and temperature.
In [29], a framework based on consortia and smart contracts is introduced for monitoring workflow in agricultural food supply chains.This approach requires farmers to record their crops' environmental details and growth data in a centralized system that stores this information.Subsequently, these data are sent through the Interplanetary File System (IPFS), stored in cryptographic hash codes in smart contracts for each stage of the supply chain.This method not only enhances data security, but also addresses the issue of storage explosion on the blockchain.Although implemented at Shanwei Lvfengyuan Modern Agricultural Development Co., Ltd., it has deficiencies that require attention, despite succeeding in functions such as disintermediation and tracking information through QR codes.
Similarly, Ref. [30] designed smart contracts with their primary function focused on pricing in recycled products and the control of CO2 emissions.These data are managed through oracles that supply information to the contracts to assign a value associated with CO2 emissions.When activated at specific and disorderly times, these contracts iteratively optimize the prices and demand for each facility until reaching a final solution.Their implementation significantly contributes to the efficiency and sustainability of the supply chain, especially in the context of the circular economy and responsible resource management.
On the other hand, Ref. [31] uses smart contracts for the fruit juice production process, aiming to securely and transparently record production data on a blockchain.Based on the assessment results, these contracts interacted with each other along with quality assessment models to decide whether it was appropriate to execute, stop, or resume the production process.This approach ensured efficient and secure automation in a decentralized environment supported by blockchain technology.Now, speaking of coffee futures contracts, Ref. [12] proposed to evaluate the information efficiency of Arabica and Robusta coffee futures markets to predict future coffee prices.The adopted methodology involved using unit root tests on daily data of differences between futures and spot prices.A recursive approach was applied, considering various variables to address temporal variation in futures market efficiency.The results indicate that both varieties' futures prices act as unbiased predictors of their respective spot prices, and an increase in futures market efficiency is observed.
To conclude the study conducted by [32], the challenges faced by Hernán Arosamena, CFO of The Specialty Coffee Trading Co. (TSCT), in developing a price risk hedging strategy due to the growing demand for Fair Trade coffee are presented.The work explores the application of futures and commodity options in Fair Trade, highlighting implications for traders and commodity producers.

Methods
The methodology selected to systematically address the research question posed in RQ1 is the summary of HARVEST TPC [16], which involves the conception, implementation, and testing of a proof-of-concept smart contract (PoC), followed by the evaluation of design requirements, and finally, the assessment of the research question.The detailed procedure is presented in Figure 3, providing a step-by-step description of the employed methodology.This approach allows for a thorough and structured understanding of the process, ensuring the results' reliability.The development of the methodology is described in Figure 3, based on the following steps:

•
Obtain and define user requirements, both functional and non-functional, to establish the users' needs and expectations for system use and contracting; • Contract traceability-Defining and identifying traceable units of contract variables involves establishing clear criteria on how different stages of the harvest will be tracked, including data collection necessary during the contract development process; • Design and implement a prototype (PoC)-This phase involves the concrete implementation of smart contracts designed to assess their feasibility and effectiveness in futures contracts and asset management; • Analyze the capacity of the smart contract certification service-Providing and validating contract data, features, and prices in an application accessible through URI aims to integrate an element that contributes to the quality and accessibility of information, as well as the asset buying and selling process; • Evaluate the prototype with the participation of experts and critical actors in the chain.This process aims to obtain valuable feedback and answers to the research question (RQ1), ensuring the relevance and effectiveness of the implemented proposal.
The proposal is part of a transdisciplinary research project based on case studies involving collaboration between a university team and a private company.The project aims to evaluate the potential of smart contracts and blockchain technology to contribute to the sustainability of future coffee contracts, identifying significant sustainability challenges that could threaten their long-term viability.In the development of this research, the process begins by defining the requirements, using semi-structured interviews based on the methodological process, and employing a Likert scale for relevant analysis [33].It helps understand the current behavior of supply chain actors and their approach to digital innovation.Fifty-four individuals participated in the application of the instrument, with 40.7% being women and 59.3% men, occupying various roles in the coffee supply chain, including farmers, producers, exporters, importers and agronomists, and others such as researchers and coffee field auditors, as shown in Figure 4.

MALE FEMALE
During the definition and design of the research, transparency and traceability were identified as central issues, and dimensions and indicators were selected as prerequisites for the smart contract model.The participants chose all smart contract indicators and variables.The indicators of ecological and social/economic sustainability, fair-trade coffee certification, and purchase and sale payments of future contracts according to the spot selling price are priorities for farmers.For a summary of the indicators used, see Table 1.Reliable and transparent payment systems

Positioning and Contribution
After reviewing the previous sections, we can determine the following: Despite the abundance of studies dedicated to designing and developing traceability systems for agricultural products, there is a notable lack of exploration of the relationship between these systems and futures contracts.
Current platforms, designed primarily for trading, do not adequately address the specific needs of farmers, underscoring the importance of researching solutions tailored to the agricultural sector.
The lack of information on the relationship between smart contracts and futures contracts represents a significant gap, providing a valuable opportunity to carry out this work and generate new knowledge in this area.
Thus, in this article, we propose a smart contract that registers and validates future contract clauses, generating a more transparent and fairer environment.Its successful implementation will allow farmers to access reliable information on prices, conditions, and income distribution, providing greater control over their participation in the market, accessing better premiums, and improving fair trade.

Smart Coffee Supply Chain
The empirical study unfolds across the coffee supply chain, involving a summary of activities and methods that begins with considering farmers interested in participating in futures contracts processes, with full knowledge of the necessary conditions for their involvement.Secondly, the participation of the "Cooperative of Coffee Growers of Cauca" in Colombia is highlighted, referred to as the "cooperative" throughout the work, as well as the FNC and "futures operators" or "futures traders" (FT), these being participants along the supply chain presented in this study.The coffee supply chain encompasses different processes, each with various actors, from producing coffee cherries to final consumption.This supply chain is one of several different coffee supply chains.A model was developed to manage a generic coffee supply chain, adapting this specific case as presented in [34].
Thus, Figure 5 illustrates and describes the seven nodes of the coffee supply chain, involving various stages: cultivation, where planting and harvesting take place; producer, covering cultivation, harvesting, and wet processing of coffee beans; futures contract, focusing on the coffee purchase and quality control based on cooperative terms; processing, including activities such as husking, milling, and grading; exportation, covering customs and international transport; importation, comprising customs and local transport; secondary processing, focused on roasting, blending, and packaging; sale of futures contracts, retail sale, and consumption, which can be business-to-business (B2B) or business-to-consumer (B2C), or through trading.Each column details the different actors commonly present in each node.The black line represents the specific supply chain composition for this case study from step A to step G.
The black line in Figure 5 exposes the processes involved in a future contract, from its acquisition to its delivery, and different detailed steps, from letter a to letter g, have been identified.This process highlights the roles and actions carried out by the participants in the chain, providing a step-by-step view of the activities executed by the futures contract, both within and outside the country of origin.Below, we describe the specific processes of the futures contract identified in the coffee supply chain, detailed in Table 2.This detailed representation offers a better understanding of how the different phases of the futures contract unfold and coordinate in the context of the coffee supply chain.
Table 2. Description of the future coffee contract process in the supply chain.

FARMER PRODUCER
In step A, it is established that the farmer must meet specific requirements to participate in a future coffee contract: Know the costs of his production.Define the month of delivery and the quantity and quality of the coffee.Establish the price at which he will sell his load of coffee.Agree on the delivery, quantity, quality conditions, and price with the cooperative.
Once the contract has been defined and the farmer has accepted the terms with the cooperative, the coffee load is delivered to the cooperative.This process ensures a clear understanding of the expectations and conditions between the farmer and the cooperative in the context of the future coffee contract [35].

FARMER, COOPERATIVE, MULTINATIONAL TRADERS BUYING AGENTS (FT)
In step B, the negotiation of the coffee cargo is initiated between the cooperative and several futures buyers (FT) worldwide.Once the futures buyers reach an agreement, the cooperative becomes the intermediary in charge of setting and guaranteeing the compliance and quality of the coffee committed in the futures contract, according to the terms of time, quantity, and quality stipulated.The processes are: The cooperative defines the characteristics of the coffee and establishes a future contract with a farmer.Once accepted, based on step A, the farmer delivers the committed coffee load, complying with the defined quality variables and the established time.In this process, the cooperative controls the quality using a sample to determine the price and quality, ensuring its integrity, after which it makes the corresponding payment to the farmer.
Then, the cooperative uploads price, quality, quantity data, information related to storage, and other details.
The futures buyer (FT), based on the initial loading value data, can begin to set new prices based on the quality of the coffee, all backed by the margin from the day's spot trades.This step demonstrates how the cooperative manages the transition from future contracts to physical delivery, determines prices, and maintains transparency in the supply chain [35].

COOPERATIVE AND FNC
In step C, coffee processing is carried out by performing various functions within the coffee supply chain: Controls coffee quality, manages storage and supervises packaging.In quality evaluation, defects, size, and organoleptic characteristics are examined through cupping and assigning a cup score.These activities are carried out before transportation.Dry-milling of the coffee is carried out in facilities operated by Alma Café, a subsidiary of the National Federation of Coffee Growers (FNC).

FNC
For step D, transportation and storage for subsequent export are carried out.
Transportation is organized on an ad hoc basis, with the coordination of individual purchase points through independent logistics being the property of the FNC.These services guarantee efficiency and security in the transportation of coffee from the place of origin to its destination.

FNC
In step E, the import process is detailed, defining the procedures established by FNC.
The importer specifies the quality criteria and the desired characteristics of the coffee.Subsequently, the importer receives a sample for roasting tests to evaluate the product's final quality.
The shipment of the coffee by rail and truck is arranged for storage once it arrives at its destination.The importer is responsible for storing the coffee, preparing the bags for transport, and shipping it to the roaster.

FT, ROASTER
In step F, the product transformation process in which the future contract plays an essential role is described in detail.
At this stage, the future contract may involve sales of the product before its completion, allowing for pricing based on the quotation on the day of delivery and considering aspects such as the roasting process, cup qualification, and other procedures linked to the transformation of the raw material.Once this process completed, the transformed product is ready for sale, either wholesale or retail.This step represents a critical phase that adds value to the product and prepares it for its final distribution in the market, where the contract price may vary in the face of price speculation.

FT, COFFEE SHOP, DELIVERY, CONSUMER
Step G details the delivery process in which the conditions established in the future contract are fulfilled.The coffee is delivered during this phase according to the parameters previously established in the future contract.The product, which has been transformed and packaged, is ready for commercialization, either at the wholesale or retail level.At this point, the owner of the future contract can adjust the product's price according to its quality and value, considering the value and estimate of the spot price of the coffee.This process concludes with the distribution of the product in the market, thus fulfilling the terms of the future contract and closing the cycle in the coffee supply chain.
After characterizing the processes of a futures contract, several characteristics have been identified that support the research design.Initially, it is noted that the farmer disengages from the chain once the product is delivered.On the other hand, it is observed that future contracts may experience changes in value at various points in the supply chain, with purchase, delivery, and consumption being key points.This variability is evidence of the high speculative activity of these contracts, making them attractive for specific operations.
The importance of the phases carried out by the cooperative is also highlighted, as these are fundamental for the logistics and traceability of the product.These activities impact the value paid by the buyers of the contracts, underlining the impact of the commissions associated with the development of these functions.Based on these terms and after understanding the processes and activities involved in the coffee supply chain, the design of a smart contract and an ecosystem for its implementation is proposed.

Future Smart Contract
As a result of the proposal, the SmartBeanFutures platform is defined as one that manages the variables of future contracts through a smart contract.For the development of this proposal, a specific architecture has been created based on the efficient operation of the clauses of the futures contract, ensuring coherence with the established objectives.
This step is crucial for practical implementation, representing conceptual and theoretical planning materialization.The goal is to guarantee the viability and effectiveness of the smart contract by emphasizing alignment with the global vision.Coffee futures contracts face challenges such as farmer defaults and excessive intermediary participation, limiting options and benefits.Although definitive solutions are lacking, smart contracts can improve sustainable agricultural practices.The proposal aims to optimize this practice's efficiency, reliability, and sustainability, promoting fair and equitable practices and prices for farmers.The smart contract will manage future purchases and sales during the product's delivery to the final recipient, validating transactions based on the owner's contract status, using IERC721 smart contract standards [10].
Several key elements have been defined to implement the smart contract, covering technological and data management aspects.These include the programming languages, data management platforms, the testing and deployment of the blockchain network that will store the information, and the framework for designing an interface to visualize the data and movements validated by the smart contracts.The proposed architecture for the implementation is detailed in Figure 6, where the interconnection and function of each component above can be observed.This proposal is designed to guarantee efficiency, security, and transparency in the execution and validation of smart contracts associated with coffee futures contracts.Users interact with the interface dedicated to managing futures contracts in the application and data layer.The activity involves supplying information about the type of contract, its characteristics, and its price.The JavaScript-based framework, React, is used to develop the web interface, along with the JavaScript runtime environment, Node.A blockchain network called FUTURE_CONTRACT is created.To participate in the system, users must have a digital wallet.In this case, MetaMask is used.This registration allows the system to interact with and access user verification, as shown in the red boxes in Figure 7. Once the contract is created, the smart contract layer generates a non-fungible token (NFT) based on the IERC721 framework, allowing actions with unique and nonrepeatable identifiers.This layer enables the generation of additional profits through the post-sale of the contract and facilitates the visualization and tracking of operations.Truffle and Hardhat tools were employed in its development.The smart contract is programmed to examine and validate future contract sales, recording the sale date and the identity of the new owner, as identified in the red boxes in Figure 7. Ethereum digital currency is adopted for post-sale payments, as it facilitates efficient and secure transactions in the context of payments, improving the overall functionality of the web application [16].
In the Oracle layer, an external service provides independent data, offering price traceability and transparency to participants.The platform allows for the verification of the contract's commercial operations and storage using the IPFS protocol.The blockchain layer used is Ganache, a test network used to validate the proposal.The associated with deploying the system are under study, as all tools used are linked to the Ethereum network.Each participant can verify the fluctuations of the contract, enabling the elimination of intermediaries and improving transparency and sustainability in practice.In this context, the research proposes a tool that ensures integrity and reliability in contract management in the coffee industry.The transactions rectified by the creation of the contract can be seen in Figure 8, where the contract is created and stored on the FUTURE_CONTRACT test network.

Results and Discussion
This article lays the foundation for critically conceptualizing futures contracts for buying and selling coffee.It focuses on the design and implementation of a smart contract and the architecture for developing a DApp intended for use by Colombian farmers based on the methodological requirements outlined in the previous sections [36].The smart contract plays a crucial role in contributing to the sustainability of this practice, providing better returns for the sale of these contracts.In contrast to [37], the proposal establishes a specific supply chain backed by a methodology that provides the requirements for designing a smart contract.The 54 participants who contributed to the development of this study were utilized to validate the proposal.Validation was carried out through questions related to user satisfaction, supported by a Likert scale.The results of the validation instrument were then described.The results show an average of approximately 10.8, a standard deviation of around 8.25, and a coefficient of variation of roughly 76.39%.
Regarding the willingness to use smart contracts designed for the context of futures contracts, the results presented in Figure 9 reveal a predominantly favorable perspective among participants; 74.07%showed strong support, indicating a significant level of acceptance and endorsement for implementing this technology in futures contracts; 11.11% expressed agreement to some extent, demonstrating considerable support, although less than the wholly agreed group; 5.56% remained indifferent, reflecting a lack of clear opinion or neutrality.Additionally, 9.26% indicated disagreement, suggesting a segment that does not fully endorse the idea.No responses were recorded in the "Completely Disagree" category.Overall, the results indicate a positive trend toward implementing smart contracts for futures contracts, with a smaller proportion having diverse opinions or expressing disagreement.Figure 10 displays the results regarding whether the platform meets the requirements for which it was designed.It can be observed that 42.6% of the participants expressed a high level of agreement, demonstrating confidence and satisfaction with the tool.Additionally, 16.7% indicated agreement, signifying significant acceptance.On the other hand, 18.5% were indifferent, suggesting ambivalence or a lack of clarity in perception.Notably, no responses were in the "Disagree" category, indicating the absence of opposing opinions.However, 22.2% expressed complete disagreement, a considerable proportion requiring special attention.Despite the majority having confidence in the effectiveness, it is crucial to understand the perceptions of those indifferent or in disagreement so as to make adjustments according to their needs.Concerning the question of willingness to explore smart contract-based solutions to improve the coffee supply chain, a diverse panorama is observed in the survey results.Detailed data analysis reveals that 44% of the participants agree with the proposal, indicating a significant acceptance and openness to adopting these innovative solutions.Additionally, 17% of the respondents have shown some level of agreement with smart contracts, suggesting support, albeit to a lesser extent than the ultimately agreed group.On the other hand, 19% remained indifferent, demonstrating a lack of a clear opinion or neutrality towards the proposal.However, 20% expressed complete disagreement, representing a significant segment that strongly opposes using smart contracts to improve the coffee supply chain.This group constitutes a clear position of rejection towards implementing these innovative solutions in this context, as shown in Figure 11.In Figure 12, it can be observed that efficiency in the supply chain stands out as the dominant category, at 49%, implying a clear priority in this area of smart contract technology in the coffee industry.Although slightly less prominent, the adoption of sustainable practices and the improvement in product quality and traceability are also significant considerations, with percentages of 36% and 18%, respectively.
On the other hand, negotiation facilitation and the increase in transparency and trust, while important, have lower percentages of 15%, suggesting a relatively lower relevance than other areas.
Based on the results of the instrument used, it is observed that, although the proposal has majority approval, there are still many aspects to address due to the lack of knowledge of the technology.After conducting this research, it is determined that the introduction of smart contracts and a decentralized infrastructure in Colombian coffee futures contracts has the potential to generate significant improvements in transparency and traceability throughout the supply chain.This technological advancement could mitigate the risk of non-compliance, enhancing reputational integrity and building confidence in the future sales of Colombian coffee [38].The positive impact extends beyond the coffee sector, influencing the development of similar tools for risk hedging in other agricultural industries such as rice, barley, and corn.Despite the potential benefits, it is recognized that the proposal could introduce cost pressures for providers, especially coffee producers, due to increased investment in time and resources.The willingness of coffee buyers to share transaction data and potential adoption challenges, including regulatory uncertainties and technological awareness, are crucial considerations.Despite the possible risks, the proposal benefits the supply chain by limiting intermediaries and commission agents, although regulatory gaps and knowledge disparities hinder it.The proposal also emphasizes the importance of educational initiatives to harness the full potential of smart contract implementations, especially in improving product traceability for quality and customization, which can positively impact sales prices and consumer satisfaction.

Conclusions
Based on the analysis of the perception of actors in the Colombian coffee supply chain, it is concluded that there is significant support, of 74.07%, for introducing smart contracts to mitigate price fluctuations in the practice of futures contracts.This high acceptance suggests a positive receptiveness among participants to implementing innovative technologies in future contracts.Regarding the effectiveness of the designed platform, the main conclusion is that most participants, representing 42.6%, expressed a high level of agreement regarding the tool's ability to meet their requirements.This endorsement indicates substantial confidence in the platform's effectiveness, although addressing the opinions of those who expressed indifference or disagreement, especially the 22.2% who showed complete disagreement, is highlighted as necessary.Despite the overall positive trend towards implementing smart contracts, the presence of diverse opinions and, in some cases, disagreement is identified.It underscores the importance of considering and understanding participants' perceptions and concerns.The conclusions highlight the need for a personalized approach and adaptive strategies when implementing new technologies in the context of futures contracts in the Colombian coffee supply chain.
Based on the identified perceptions, it is highlighted that implementing smart contracts supported by a specific architecture represents an essential contribution to understanding and refining the buying and selling of coffee futures contracts.Its prominent role in price determination throughout the supply chain generates potential benefits for fair pricing.By validating transactions and managing prices, the smart contract is an effective tool for improving efficiency and reliability throughout the coffee supply chain, emphasizing critical stages such as acquiring and processing futures contracts.The validation and management of associated variables provide clarity and transparency in the paid value and its modifications during the process, aspiring not only to enhance operational efficiency, but also to foster a more transparent and equitable environment in the management of coffee futures contracts.
As a perspective for future research, the study needs to expand the considered variables, with a particular focus on implementing cryptocurrencies in transactions within the coffee supply chain.The proposal involves broadening the range of factors incorporated into smart contracts to address specific challenges, including additional environmental, social, and economic aspects, aiming to achieve a more comprehensive management of transactions throughout the chain.Additionally, the development of interactive educational platforms targeted at users in the coffee supply chain is suggested.These platforms would serve not only as practical tools for the application of smart contracts, but also as means to educate users about the functionality of these contracts and explore the impact of interacting with cryptocurrencies in this context.This approach will help to quickly determine the willingness of farmers to adopt these tools and assess the value of implementing this technology in a real-world setting.

Figure 3 .
Figure 3. Adaptation of methodology for the validation of Harvest TPC through PoC.

Figure 5 .
Figure 5. Coffee supply chain, example of purchase, sale, and delivery process of future contract.

Figure 6 .
Figure 6.Layer-based architecture for smart contract implementation.

Figure 9 .
Figure 9. Answer to the question: "Would you use smart contracts designed for this context of futures contracts?".

Figure 10 .
Figure 10.Do you think the designed tool meets the requirements for which it was intended?

Figure 11 .
Figure 11.Response: How willing would you be to explore smart contract-based solutions to improve the coffee supply chain?

Figure 12 .
Figure 12.How do you think smart contract technology could transform the coffee industry in the future?

Table 1 .
Variables and indicators used in the study.