Colombian Origin Coffee Supply Chain Traceability by a Blockchain Implementation

This exploratory study explains how to implement Blockchain technology for a supply chain by a proof of concept on Hyperledger Fabric, an open distributed ledger platform. This approach allowed to identify the feasibility and some implementation challenges, yield feedback, and exemplify one manner of tracing product origin using a distributed ledger technology. For this purpose, the case study of origin coffee is analyzed, given the relevance of traceability in this type of coffee and the cultural and economic importance of this agricultural product in the Colombian context. In addition, the data stored in the Blockchain and some technological architecture aspects are discussed.


Introduction
Agriculture is a representative economic sector in Colombia since it employs at least 60% of the rural population [1]. It is a key element in supplying the food needs of the population country and the main source of income in rural areas. The primary Colombian agricultural products include, among others, coffee, banana, sugar cane, chocolate, avocado, orange, and tangerine. Coffee is leading the list of permanent crops with the largest planted area in the nation. Currently, origin coffee has seen significant growth as more and more people are willing to spend extra for its special attributes in its flavor and aroma. Besides, the production method of origin coffee contributes to sustainability and the preservation of natural resources; it is grown in

Background
The availability of various types of coffee promoted the notion that every kind of coffee product has a specific type of consumer. According to Sepulveda et al. [4], this tendency was consolidated in the marketplaces of industrialized nations near the end of the 1960s, disseminating the adoption of a highly differentiated market consumption logic. Special coffees are differentiated from generic products by a specific characteristic that can be certified. The adoption of origin production is a product characteristic that cannot be detected directly in the product. This requires a certification process that increases consumer trust about the product [5,6]. In this sense, the certification provides confidence among customers who would be willing to pay extra for these products thanks to having greater attributes or characteristics than generic products [7]. The certification programs include standards of cultivation, production, appropriate trade, and a third-party organization that supervises compliance with the requirements and awards a seal assuring the customer that the product complies with the labeling criteria [6,8].
The process toward the Blockchain traceability of the origin products supply chain requires understanding fundamental concepts. In this sense, next is introduced origin coffee and Blockchain briefly for the supply chain.

Origin Coffee
One of the most widely exchanged agricultural products worldwide is coffee, a sizeable portion of the global economy and a significant source of foreign exchange for many developing nations. It is not strange that coffee is at the vanguard of sustainability actions such as the identification of origin coffees and economical upgrade opportunities for farmers in response to the UNs Sustainable Development Goals.
Over the last decade, growers have begun to employ their geographical location to safeguard their single-origin coffee's reputation and increase its value. Although the definition of single-origin coffees is not exact, it shows a new market opportunity supported by providing consumers' credibility now expected from sustainability initiatives [4].
The recognition of an origin coffee is based primarily on quality standards associated with the reputation of the producers of that region. However, there is no concrete sustainability platform that provides transparency regarding the place of production or quality features [9]. Customers cannot often fully comprehend the characteristics and other significant information of the coffee they purchase.
The coffee industry is undoubtedly at a critical juncture in determining the appropriate sustainability strategy moving forward. The moment has come to review, assess, and improve coffee distinctiveness and sustainability models that can better account for coffee sources [10]. Promoting economic, social, governance, and environmental sustainability for all actors in the supply chain involves new duties for participants in the coffee business.

Supply Chain in the Food Industry
According to Mentzer et al. [11], a supply chain (SC) is a group of organizations or people directly involved in the flow of goods, services, money, and/or information from a source to a customer. In the same way, for Wu et al. [12], SC is a group of businesses that transfer materials or introduce goods or services to the market. Thus, SC is a network of organizations involved in upstream and downstream processes to add value to the goods or services supplied to the final customer. Also, it is crucial to emphasize how SC connects businesses and customers, starting with raw materials that have not been processed and ending with the final user of the finished goods.
The supply chain objective alludes to the actions and procedures that produce value as goods or services for the end user [13]. Add value is a crucial aim of the SC processes, which depends on the coordination and communication of the actors involved in producing the products or services [14]. The general supply chain management process sometimes lacks information for the end user, generating different communication issues. As a result, giving the final customer useful information is necessary because it is an essential link in the chain.
The food sector, where a primary material is processed to produce a finished good for the final consumer, is the subject of the case study analyzed here. Several actors are needed between the raw material and the final consumer to make it happen [15], some of which include producers or manufacturers or businesses that create products. This may involve processing raw materials or creating final products. Wholesalers are often known as distributors. Retailers operate stock inventories and market to customers in lesser quantities. Customers, also known as consumers, are people who buy products to use them. Service providers are businesses that offer services to manufacturers, wholesalers, retailers, and customers.
The food industry must be profitable for businesses, competitive along SC, and able to meet demand [16]. This is challenging in this market because consumer tastes shift over time, forcing the sector to adjust more quickly and respond appropriately. According to the author [13], there are significant obstacles that can affect the food industry's supply chains. These include the Cold Chain, which refers to the ability to control temperature and trace the product throughout all stages of production and distribution [17]. Traceability refers to the ability to trace the product across all stages of production and distribution. Quality is crucial in this industry due to mandatory compliance certification for food products [18].

Blockchain for Supply Chain
The most common and accurate way of describing Blockchain is as the underpinning technology that permits the trading of any kind of asset thanks to the validation and consensus of all network nodes that also share the same transaction ledger. Before proceeding and adding the transaction to the Blockchain, most network participants must validate the transaction and agree with it, generating consensus [19].
According to Al-Jaroodi and Mohamed [20], among the features offered by Blockchain networks are immutability and traceability. Immutability means that Blockchain prevents anyone from changing its transactions. Blockchain's traceability refers to tracking all past network transactions up to the genesis block. This is because Blockchain records all network transactions on a single ledger that is updated whenever a transaction is valid, and everyone in the network has access to that.
Also, all transactions are encoded using mathematical algorithms and cryptography to ensure the security of every transaction on the network. Hence, the participants on the network cannot see others' identities regardless of whether the Blockchain is private or public [21]. Finally, one of the most crucial characteristics is using a timestamp signature. Once a transaction has been verified, the network can use this signature to track down the stored data or assets on the Blocks.
According to the aforementioned, Blockchain does not require a mediator, regulatory body, or government to facilitate trading. Instead, this technology enables you to conduct business with anyone worldwide as long as both parties are connected to the Blockchain network [22]. Both public and private Blockchain networks are possible, as was already mentioned. If a Blockchain is private, all users can separate their functions according to their roles and are familiar with one another. In a public Blockchain, everyone is on equal status and may participate anonymously like in the works of the Bitcoin network.
The most remarkable technology benefits of Blockchain are traceability, transparency, and security, achieved by the implementation of conjugated computational concepts such as immutability, consensus, encryption, decentralization, and distributed ledgers. These features are useful for facing operative challenges in any supply chain. Also, these characteristics support computer programs known as "Smart Contracts." These are used to automate Blockchain transactions by running automatically when a predetermined condition is met [23].
However, the design of every technical proposal demands high collaboration between stakeholders through the supply chain, elevated investment, and meticulous strategy because the offered value depends on that. It is not only about using technology for automating processes and earning efficiency but about building trust among SC actors. Trust is an intangible and highly cost asset with a significant impact on trade operations since giving the public the capacity to know about the provenance and history of the food they consume [2].
Some interesting initiatives that use this technology in the agro-industry, such as provenance.org 1 , AgriChain 2 , AgriLedger 3 , Ripe 4 , and AgriDigital 5 . Beyond their disruptive potential in food supply chains, they have to face the difficulties derived from the early stages of implementation of Blockchain technology, which is still in development.
In the Colombian coffee case, as authors stated [24], cultivation is a manual process in which a person selects and collects each coffee bean in regions with mountainous relief. This has been a tradition for generations, and coffee farmers are deeply proud of their work and culture. UNESCO declared all these natural, economic, and cultural elements with a high grade of homogeneity in 2011 as a World Heritage Site. In this way, Blockchain technology can serve this purpose by providing traceability for recognizing coffee culture, transparency for showing product quality and farmers' hard work, and confidence for ensuring that every end customer gets authentic Colombian coffee.

Proposed Methodology for Colombian Origin Coffee Traceability Process
The methodology implemented is based on product attributes to integrate SC with Blockchain to provide trust as value added for customers. For this, the traceability of Colombian-origin coffee information is used to certify where it grew and determine whether or not it is organic. Before the implementation, all the variables related to the process must be understood. Identifying those that will be registered in the Blockchain business network allows for certification of the coffee. Then, the process begins by identifying the product attributes and all the processes along SC engaged in the production of origin coffee. It is important to list every piece of information that is used in the complete production process. All of this information will be useful in defining the network's participants, assets, and information flow.
To track SC information using Blockchain technology, Bettin-Diaz et al. [25] suggested the following methodological steps: 1. Choose the product that will correspond to the main asset that defines the Blockchain architecture scope. This will aid in determining the procedures, functions, and elements that will make up the product identity and must be integrated into Blockchain. 2. Define product characteristics, the features that give a product its distinctive identity. Those qualities are the ones to trace using Blockchain to produce the origin certificate. This step might be among the most significant for a successful implementation. 3. Identify the production requirements (technical, functional, legal, and regulatory, among others) since these will direct us to the steps that will turn the product from the raw material into finished products. 4. Constitute all the players needed to build up the Blockchain business network, as well as their roles and transactional scope. For this is mandatory to identify all actors involved in the process. 5. Specify the operations and procedures that transform raw materials into finished products. This is part of product characteristics and Blockchain business network assets. Also, it provides identity to the product, facilitates transactions, and allows tracing the product characteristics to verify the product's provenance. 6. Develop business rules, which are prerequisites for the procedures that cause a transaction to occur. Every time a transaction is made, the smart contract validates it to ensure it complies with the business rules. Once the transaction has been approved, it is recorded on the Blockchain. 7. Consider digital assets, in necessary to define the product information that will be traceable as a transactional document. This supports each transaction and contains all necessary information across the process to verify the origin of coffee. 8. Establish information flows. Using a data flow diagram will make it simpler to understand how the information about the assets will move through the process. 9. Configure the Blockchain. This implies defining the sort of business network that will be relevant to the process, choosing the software to construct the Blockchain business network, and choosing each of its components. 10. Verify the Blockchain business network. Test the new business network by validation to make sure everything is operating in line with the expected objectives.

Proof of Concept
After a promising initial evaluation, the project was focused on giving support to the methodology explained above with a structured execution of a proof of concept (POC) [26]. It specifically explored the viability of a Blockchain-based solution for upholding traceability in producing origin coffee.
The POC aimed to gain insights into handling this novel technology and the capability to trace a coffee bag in every supply chain echelon within the bounds of a simulated environment. Having said that, the project was divided into five phases, as Fig. 1 shows: the definition of unit operation and processes, the high-level design, the detailed design, the coding and deployment, and integration and the final evaluation of the prototype. The following explains the development in every phase: 1. UO and processes definition. The specific coffee customer needs have their core in adequately defining unit operations (UO) and processes across the supply chain. Figure 2 depicts the primary participants in the production of coffee, as well as the overall process [24]. 2. High-level design. Once the UO and process requirements were identified, the following was to determine the quality requirements for modeling the software architecture.
-Transparency: A trusted third party is often employed to validate transactions since it inspects the trade agreements between the parties. Here, the third party must be dispensed and every participant must be able to connect to the Blockchain network and has the same status and authority. -Security: The solution must guarantee the participation of only authorized members and the immutability (non-modifiability) of every record. -Integrity: Data validity and consistency increase solution stability while improving the overall system's recoverability, searchability, traceability, and connectivity. The solution must guarantee the data and services are being delivered as intended. The elements explained above are the basis for developing a four-layered architecture that separates the specific functionality as services in tiers. This design uses a similar architecture proposed by Xu et al. [27] to accomplish product traceability. Figure 3 shows an overview of the architecture in four layers, from top to bottom, application, distributed computing, networking, and infrastructure.
(a) The application layer defines the point of access for participants. It contains protocols commonly needed by users, such as HTTP (Hypertext Transfer Protocol), the basis for the World Wide Web, and protocols for file transfer, electronic mail, and network news. (b) The distributed computing layer provides access, privacy, authenticity, and security for data. It is responsible for managing user certificates such as user registration, user enrollment, or user revocation. A user is a participant able to query or invoke any transaction. It is considered to be an application that interacts with a blockchain network according to its permissions, roles, and attributes. (c) The networking layer is responsible for building the transaction and executing consensus protocol to reach an agreement regarding the order of the transactions in the network, updating the ledger, and selecting a miner for the next block to be added to the chain. (d) The infrastructure layer comprises the hardware elements required to run the blockchain, such as nodes, storage, connection setup, data forwarding, routing, and delivery. It is responsible for copying and spreading data across an interconnected network of computers. A node is a participant in the network that updates its blockchain each time a new block is added to reflect the change.
3. Detailed design. It considered the elements in the new business network: E.g., coffee origin traceability, it tracks the supply chain from upstream to downstream processes, from raw material to finished products. A regulator indicated as a checkpoint between phases in Fig. 2 can provide oversight throughout this whole Fig. 2 General coffee production process process. Table 1 describes the business network elements considered in the methodology proposed above. Figure 4 shows in an illustrative way that some data (everything that represents the process) should store in the database (Records A, B, C, and D ). Some data (fundamental traits that allow tracing the origin) should keep in the blockchain (Blocks 1, 2, 3, and 4). For example, in the first four processes of the productive unit "farm" related to the coffee growing required attributes such as farm, farmer, seed type, seed color, seed size, soil acidity, humidity, temperature, fertilizers, pest control assignation, lot, and order number, to mention just a few. Those  PlaceOrder UpdateOrder attribute fields store numbers, texts, images, or files that describe business network objects (or entities) represented in tables. These itemized data are necessary for managing processes; however, handling a contract with each end-consumer requires specific transactional data that record, for example, the timestamp, the location, the participants, the event, and the asset to trace the origin and guarantee it by mutual confirmation. Since a transaction is a business activity involving two or more parties (or things) that reciprocally affect each other, and no matter how the transaction is processed, it must guard the business event that needs to materialize to keep the product information in each transaction for tracing it to where it began. The considered elements to be stored in a blockchain are listed in Table 1. All other data will need a Consumer DB service for conventionally storing data. 4. Coding and deployment. For the PoC, we decided to use Hyperledger Fabric which is an open, private, and permissioned Blockchain-based platform (every participant has known identity) that provides execution of smart contracts [28]. In Hyperledger Fabric, it is necessary to invoke a smart contract to interact with the blockchain. The first step is implemented through policies that establish the properties of digital identities and are used to determine who can use a specific event service. The second step depends on the primary type of Blockchain Architecture and the framework that supports it. We used a distributed ledger on a private network in our case study. The third step is implemented by an ACL (access control list) which is formatted as a list of key-value pairs for associating the resource (key) with the channel policy (value). Setting the policies and ACL in the file "configtx. yaml." In the fourth step, we deployed a smart contract in packages called chaincode. We deploy this to a channel using a process known as the Fabric Chaincode lifecycle. In the fourth step, a smart contract is deployed in a chaincode, software for defining an asset, and the transaction instructions for modifying it. Once it executes is submitted to the network and spread to the ledger on all peers. After the above steps, the chaincode was ready to invoke by a client application. Finally, we used a development environment to test smart contracts utilizing the Fabric test network. 5. Test and evaluation. After a chaincode is installed on the peers previously joined to a channel, participants can deploy the chaincode to use the smart contract in the chaincode. However, the ledger is empty after the initial deployment of the chaincode package. Figure 5 exposes an example for the "PlaceOrder" transaction. This order is made for a specific lot to be cultivated, identified as "1234", whose transaction is generated by the participant -farmer-and is assigned to a -regulator-to validate the integrity of the information. In this example, an order is generated to get a Fig. 5 A Hyperledger block of a transaction for submitting a "PlaceOrder" "pulped cherry," an intermediate product, in a series of processes, within the productive unit (farm) (see Fig. 2).
The ledger of transactions shows the transaction ID and a specific timestamp. With these records, the validation and traceability of the origin of the final product that was born from lot "1234" whose movements or status changes we will record as shown in Fig. 5.
After a smart contract has verified its validity, this transaction will be stored on the Blockchain with a transaction ID and TimeStamp. This means there will be a log on the ledger for every transaction created on the business network with all those records. Figure 5, in the end, shows the registered transactions information from the processes, and when the product passes from one process to another changing its status. Once smart contracts validate these transactions, they store them in the Blockchain.

Discussion
The first two steps of the methodology are related to identifying the coffee (the main asset) and its features. Some data will be stored in a conventional database, and others in the Blockchain. Transactions, such as the generation of an order, the movement from one process to another, and the change of custody between the participants, are always stored in the Blockchain. This generates a unique and immutable record, which will be the basis for developing the product traceability of origin. This is possible thanks to smart contracts that encode the transactions and store the information that goes to the business network -Blockchain.
In accordance with this proposal [25], the primary inputs for the definition of the business network are knowledge of the product, its properties, the manufacturing process, the process needs, and its participants. The "transactions" in the original model can be considered business rules. In this way, network participants could handle transactions over the assets, and the latter is the component that, in our opinion, must be able to be tracked throughout the entire process. The case study's two key strengths were the coffee (the key element of the process) and the order; both were fed throughout the process at various points to create the product's traceability.
Likewise, owing to the assets defined in the case study, coffee and order, it is achievable to have information on the attributes of the coffee and the process state. For example, the coffee transformations along the processes, the new qualities that are gained or lost, the events that are triggered throughout the process, and the custody that is generated, allow following the track to the farm.
There is a latent risk of data inaccuracy due to information tampering by the many participants across the chain; for that reason, the model includes checkpoints that enable a "regulator." it is referred to like this in this case study and depicts his participation in Fig. 2 as checkpoints. Inasmuch as the process is manual, data modification before registration is still possible. Using this technology does not control adding or omitting data that does not correspond to the actual process and affects transparency. Since it is complex to install sensors in all crops to automate data gathering from start to finish, it is valid to include checkpoints across the chain for evaluating and monitoring the operational situation in each phase.
Join every participant in the chain ensures the traceability of all transactions related to a certain lot or product. As a result, there is increased data integrity and confidence, which makes it possible to hold responsible parties accountable. Even if a player from outside the business network made a negative intervention, this might have a significant effect on the final level of consumer confidence.
Finally, security is a crucial factor to take into consideration. The structure and operation of any established blockchain, whether public, consortium, or private, are the same; from a conceptual standpoint, data inside a blockchain are secure. Nonetheless, the security of a blockchain depends on the architecture of the system that supports it [29]; and regardless of any technology, the human factor must also be addressed, since it is always the most vulnerable shackle in any security scheme [30]. Security in the Hyperledger Fabric scenario depends on proper key management and certificate authority settings. For configuring the overall trust level of the network, the system must additionally enable TLS client authentication on peer nodes [28]. In addition, if data are not encrypted, they may be taken at the host level by malicious actors.

Conclusions
This paper explores a Hyperledger-based Blockchain technology integration in a supply chain using Colombian coffee as a study case. This study follows the phases of a proof of concept to show that it is possible to trace the product's origin. Although this instance was around the origin of coffee, the same methodology could be used in any product traceability, by choosing the appropriate attributes.
Origin coffee is one that comes from a single original producer, that is, from a region, field, or farm of a specific country. It refers to the raw material, the grains of each variety of coffee, the type of roast or ground, but above all, to its traceability, the fact of knowing exactly where it was cultivated and who did it. This feature happens only if it can track and trace along its supply chain; in other words, to access information throughout the product life cycle.
While the PoC demonstrated the feasibility of using this technology for traceability, there are significant challenges to implementing this proposal in a real context. Farmers carry out the coffee processes mostly manually, and they are highly dependent on their expertise. Activities such as selectively picking coffee cherries on land so steep are not a problem and are even a distinctive feature of the region. However, the data gathering, specifically frequency, format, and accuracy are they. Every actor in the supply chain manages its procedures and information (some semiautomatically and others manually), which rarely is shared or concerted. This fact makes it difficult to have information integrity on the chain, triggering the lack of a traceability process and other typical logistic problems, such as out-of-stock.
Funding Open Access funding provided by Colombia Consortium.