Blockchain-based Framework for Supply Chain Traceability: A Case Example

Traceability has emerged as a prime requirement for a multi-tier and multi-site production. It enables visibility and caters to the consumer requirements of transparency and quality assurance. Textile and clothing industry is one such example that requires traceability implementation to address prevailing problems of information asymmetry and low visibility. Customers find it difficult to access product data that can facilitate ethical buying practices or assure product authenticity. Besides, it is challenging for stakeholders to share crucial information in an insecure environment with risk of data manipulations and fear of losing information advantage. In this context, this study investigates and proposes a blockchain-based traceability framework for traceability in multi-tier textile and clothing supply chain. It conceptualizes the interaction of supply chain partners, and related network architecture at the organizational level and smart contract and transaction validation rules at the operational level. To illustrate the application of the proposed framework, the study presents an example of organic cotton supply chain using blockchain with customized smart contract and transaction rules. It finally demonstrates the applicability of the developed blockchain by testing it under two parameters. The proposed system can build a technology-based trust among the supply chain partners, where the distributed ledger can be used to store and authenticate supply chain transactions. Further, the blockchain-based traceability system would provide a unique opportunity, flexibility, and authority to all partners to trace-back their supply network and create transparent and sustainable supply chain.


HIGHLIGHTS
1) Study proposes a blockchain-based traceability framework for the supply chain 2) Explains information exchange among supply chain stakeholders 3) Operational mode of framework illustrated in context of textile supply chain

INTRODUCTION
Prominent illicit trades, unethical production practices, and fragile supply chains have put industries under immense pressure from customers and governments to follow sustainable production means.Industries are expected to be transparent in their functioning and enhance visibility at the operational and organizational levels (Guercini & Runfola, 2009).Textile and Clothing (T&C) industry is one such example that is facing serious issues due to volatile consumer demands, escalating competition, product recalls and counterfeits (Alves et al., 2013;Kumar et al., 2017).It is further subjected to a strong criticism due to unfair labor practices and use of toxic materials, largely because of opaque supply chains.Catastrophic events in recent past have further intensified the demand and called for immediate actions (Algayerova, 2017;Hoque et al., 2016).Implementing supply chain traceability has emerged as a possible solution that can help to solve these supply chain issues (Mandolla et al., 2019;Wang et al., 2019).
Traceability, as defined in the United Nations Global compact and Business for Social Responsibility (2014) is "the ability to identify and trace the history, distribution, location and application of products, parts, and materials, to ensure the reliability of sustainability claims, in the areas of human rights, labour (including health and safety), the environment and anticorruption".
Blockchain has emerged as a possible solution to implement traceability by creating an information trail while ensuring security and data immutability.Blockchain-based traceability enables secured information sharing, facilitates product quality monitoring/control, operation monitoring/control, real-time data acquisition, transparency and visibility throughout the supply chain (Azzi et al., 2019;Frizzo-Barker et al., 2020).It is understandable that building trust among supply chain partners -especially those located at different parts of the globe, -is a slow and challenging process.Besides, the role of third party supply chain auditors' in documentation and reporting the violation of codes-of-conduct are often questioned thus remain untrustworthy (Short et al., 2016) .Collaboration would require accurate information sharing over long periods of time, a feat that is hard to achieve with the existing information systems.Operating on a decentralized network structure, with its data immutability feature, the implementation of blockchain is an appropriate solution to provide better visibility with information sharing that can build technology-based trust among the supply chain stakeholders.In this context, Helo & Hao (2019) presented a technical architecture of blockchain-based logistics monitoring system for parcel tracking in a given supply chain which supports a shared and immutable ledger recording of all transactions.Despite the existence of several different information sharing systems, supply chain integration has remained elusive.This is primarily due to the complex structure supply chains and a variety of information sharing systems with multiple data-sharing formats that create difficulty in developing a supply chain-wise integrated system and pose serious data security issues.Blockchain technology in combination with electronic data interchange (EDI) can solve these issues of information exchange and can offer a shared/common version of truth.This would facilitate information sharing among partners, resolve any disputes quicker with low chargeback (Fiaidhi et al., 2018).In the context of open or shared manufacturing systems, blockchain can facilitate effective resource sharing.Recently, Yu et al (2020) conceptualized a prototype of shared manufacturing based on blockchain technology to overcome trust issues.Crucial details for implementing shared manufacturing, such as real-time capacity data from multiple suppliers can be shared over blockchain network that can facilitate optimum order distribution and resource sharing (Agrawal et al., 2020).In this context, Zhang et al. (2019) presented a blockchain-based platform for manufacturing service collaboration that supports production and order distribution optimization, focusing on both short and long term demands of the consumers.However, tracking and tracing of products, materials, and processing information at various levels of supply chain remain a significant challenge.For example, in case of T&C supply chains, it is difficult to ensure provenance of raw materials and authenticity of the product (Kumar et al., 2017).In this direction, blockchain creates a chronological chain of records of all supply chain transactions in encrypted and immutable blocks in order to facilitate material traceability (Longo et al., 2019).
Addressing to the above-mentioned challenges with supply chain traceability, the present study investigates and proposes a blockchain-based traceability framework for traceability in multitier T&C supply chain.It conceptualizes the interaction of supply chain partners, and proposes network architecture at organizational level and smart contract and transaction validation rules at operational level.Many studies in the past have attempted to explore the potential of blockchain on various aspects of different supply chains (Kshetri, 2018;Meyer et al., 2019).
According to Petersen et al.(2018) there is a "striking gap between the huge expectations on short-term disruptive change and ready-to-use solutions on the market".Many studies have focused on T&C supply chain, and highlighted the potential of blockchain in a number of applications (e.g.(Bullón Pérez et al., 2020;ElMessiry & ElMessiry, 2018;Fu et al., 2018;Lam & LEI, 2019;Pal & Yasar, 2020)).Nevertheless, the operational models in the supply chain context invite further study and opportunities for experimentation. .In this context, Queiroz et al. (2019) identifies blockchain-SCM integration as an area lacking in research.Since the supply chains of different sectors differ in many aspects, it is important to investigate the blockchain operations not only from the application aspects but also from supply chain characteristics (Umeh, 2016).Hence, to address the research gap in the literature, the present paper makes the following practical contributions; (a) it proposes a blockchain-based traceability framework for the supply chain with case examples of Textile and Clothing (T&C) sector, demonstrating network configuration and partners interaction; (b) describes the traceability information exchange over distributed ledgers while ensuring provenance of raw material using customized smart contract for T&C product; (c) finally demonstrate the applicability by developing a blockchain for organic cotton product and testing it under various performance parameters.It must be noted that, though the example blockchain is developed for the T&C industry, it can be incorporated for any supply chain with certain modifications.

BACKGROUND
The T&C supply chain is a network with numerous materials many possible permutations and complicated processes.Due to dynamic consumer preferences and volatile trends, T&C products have a short shelf-life with multiple styles and collections every season (Thomassey, 2010).The supply chain partners are usually located internationally and the journey from fiber to the finished product is remarkably long (Muthu, 2017).As illustrated in Figure 1, a typical T&C supply chain starts with a fiber producer that can be a cultivation company growing natural fiber (e.g.cotton) or industry producing petroleum-based chemical fibers (e.g.polyester).These fibers are then proceeded into yarn by the yarn-manufacturing units using spinning process and later converted into fabric by fabric manufacturing units through weaving, knitting or nonwoven processes.The fabrics thus generated are passed to apparel manufacturing (stitching) industries where they are shaped into fashion clothing, accessories or home furnishing products.It is noteworthy that Figure 1 represents a typical T&C supply chain to demonstrate the material flow.In reality, it is a complex network with multiple partners at each production stage, each procuring raw material from multiple upstream suppliers, processing them and transferring the processed product to the next downstream buyer.Furthermore, the supply chain also consists of sub-suppliers and contractors involved in the supply chain providing add-on (e.g.buttons, threads, etc.) and processing services (e.g. chemical treatment, embroideries, etc.) Fashion brands, which are typically the retailers are the focal firms in the T&C supply chain, which procure finished textile products from upstream suppliers and sell them to end-customers.The fashion brands decide the upstream partners and supply chain configuration, based on various factors, including low-cost manufacturing location, suppliers' track record and consumer market (Kumar et al., 2016(Kumar et al., , 2017)). .

Fig. 1 A typical T&C supply chain
Due to this complex structure with the large geographical spread of the supply chain, the focal firms often face issues in monitoring the supply chains sustainability risk.They may find it difficult to track all involved suppliers, contractors, and sub-suppliers (Egels-Zandén et al., 2015;Guercini & Runfola, 2009), and this opaqueness in the supply chain occasionally allows the upstream suppliers to deviate from standard practices to reduce cost and maximize profit.
Information asymmetry, and low-visibility are major challenges in the T&C supply chain that have contributed to many catastrophic events and scandals (a most tragic example being Rana Plaza).Besides, counterfeits and product recalls posing a serious threat to economic and consumer health.According to OECD/EUIPO (2019) report, the EU industries face substantial losses due to counterfeit goods.. Similarly, inefficient product recall management causes financial losses and jeopardizes brands reputation (Y.Chen et al., 2009).As per the report by Rapid Alert System (RAPEX), textile, clothing, and fashion products are among the top five most notified products, contributing to almost 22% of the total recall notification in 2010 to 2017 (European Commission, 2018).Most of these recalls go unaccountable due to lack of traceability (European Commission, 2018).
Adoption of a blockchain-based traceability system is one of the possible solutions to address these challenges and ensure seamless information sharing among supply-chain partners.This system can track and record all the information related to each stage of product transformation while safeguarding crucial and sensitive data throughout the supply chain (Azzi et al., 2019).
The technology has been introduced at the most appropriate moment in time when the supply chains globally are facing huge customer demands in the form of product sustainability assurance.Customers are eager to know if the product they are buying is authentic, complies with all standards, is legally sourced and manufactured, along with quality assurance.
Blockchain-based traceability has the potential to identify counterfeits or fake transactions, tracking/tracing product origin, and supply chain activities at the same time can ease paperwork processing (Kshetri, 2018;Tu et al., 2017).With its interlinked hash function, blockchain technology can help in examining and tracing the trail of the product (Zhao et al., 2019).
A compilation of literature focusing on blockchain based traceability solution for various supply chains can be found in work by Sunny et al. (2020).Nevertheless, as stated before, the operational models in the supply chain context has remained elusive.Queiroz et al.(2019) identifies blockchain-SCM integration as a field lacking in research.Since the supply chains of different sectors differ in many aspects in terms of their features and functioning, it is important to investigate the blockchain operations, considering its applications and supply chain requirements (Umeh, 2016).In case of T&C supply chain, a structured search on Scopus scholarly database with query "( TITLE-ABS-KEY ( blockchain* AND ( textile* OR garment* OR cloth* OR apparel* ) ) )" results in 32 search results.However, only 10 results (three journal articles and seven conference papers) were found relevant after reviewing the abstract.Taking an example of women's shirts, Bullón Pérez et al. ( 2020) discussed structure and information content of the blocks for a textile blockchain network.Similarly Fu et al. (2018) presented a framework for emission trading in the apparel manufacturing industry using blockchain.ElMessiry (2019;2018) proposed a conceptual framework and a concept of dual token model in blockchain.Choi & Luo (2019) conducted a theoretical study to examine the impact of data quality issues in the emergent markets and the use of blockchain as a possible alternative to them.A recent study by Pal & Yasar (2020) proposes a conceptual enterprise information systems architecture for IoT applications using blockchain-based ledger.Further, Cruz & Cruz (2020) and Lam & LEI (2019), presented argument papers indicating traceability as a key to track sustainability parameters, and utilizing blockchain for storing traceability data.
Focusing on garment trade, Shi et al., (2020) proposed a smart contract that can be verified by inspecting digital signatures of trading parties.For digital rights management in a garment design, Lu et al., (2019) proposed a blockchain model for copyright registration, verification and trading.
Most of the papers in the available literature describe theoretical frameworks and applications of blockchain in T&C industry.Little attention is paid to (a) partner interaction in blockchain network for a complex multi-tier supply chain network to ensure data safety and build technology based trust; (b) smart contract that can ensure provenance of raw material; (c) practical demonstration of blockchain implementation.

BLOCKCHAIN TECHNOLOGY
According to (Gupta, 2018), blockchain can be described as "a shared, immutable ledger that facilitates the process of recording transactions and tracking assets in a business network.An asset can be tangible (a house, a car, cash, land) or intangible (intellectual property, patents, copyrights, branding).Virtually anything of value can be tracked and traded on a blockchain network, reducing risk and cutting costs for all involved".The term blockchain is derived from the way it stored the transactional data.It consists of a sequence of blocks that are linked in the form of a chain, as shown in Figure 3.Each block holds a set/batch of the transactions arranged in Merkle tree form (represented by Tx_Root in Figure 3) where the cryptographic hashes of the transactions are stored as header for a quick and easy verification of individual transactions in the block.In additon, each block contains a timestamp indicating when the block is formed, the hash of previous block (represented by Prev_Hash in Figure 3), a block ID/Number and a proof from the consensus algorithm (represented by Nonce in Figure 3) (Swan, 2015).The blocks are logged into a distributed ledger based on the consensus rules agreed upon by the network partners.Further, to understand the blockchain mechanism and the proposed framework, it is important to understand the four crucial components of blockchain technology i.e. distributed shared ledger, smart contract, permissions, and consensus:

Distributed Shared Ledger
A ledger is simply a record of transactions.It has been used in double-entry book-keeping since ages.In blockchain, a common, shared ledgers that records all the transactions taking place between all the multiple authorized partners of the blockchain network and thus terming it as a distributed ledger.Additionally, the ledger is made immutable by binding the transactions with cryptographic hashe (Swan, 2015).A hash is a combination of random digits generated by passing the block information (transaction detail and a hash of the previous block) in a cryptographic hash function (e.g.SHA-256) which produces a new hash of a desired length (e.g.256 bit for SHA-256) for the current block.The cryptographic functions uniquely map the input data with output hash, and slight variation in input generates a different hash with no apparent pattern.Thus, due to the pseudo-random nature of calculated hash value, it is extremely difficult to compute the input information using the resulting hash value.Hence, it is also known as oneway encryption.In blockchain, as each block consists of the hash of a previous block as shown in Figure 2, any modification in the transactions of a previously registered block would alter the hashes of all subsequent blocks.Therefore, it makes it quite easy and quick to identify any tampering done with a block in the distributed ledger.Additionally, on a distributed ledger, each transaction is recorded only once, thus eliminating the risk of duplicate entry (Gupta, 2018;Swan, 2015).The ledger holds the current state of the network (record and track of all tangible and intangible assets that are being traded since the installation of blockchain) and chain of transactions.As the blockchain ledger is an append-only system, it serves as a single source of truth for all associated parties.Therefore, the shared ledger is one of the most important blockchain components that facilitates traceability of assets and information, and creates a technology-based trust among a group of parties interacting on the blockchain network without centralized authority.

Smart contract
Smart contracts set the rules for the game that governs business transactions.In blockchain, smart contracts are hardcore programmable logics or rules with strict implementation conditions.
Each transaction is verified against the rules before recording on the shared ledger (Luu et al., 2016).There are two popular transaction validation and record-keeping methods widely used in blockchain: Unspent Transaction Output (UTXO) and Account/Balance model (Zahnentferner, 2018).In the Account/Balance model, each address (ID of the trading partners) is considered as an account with certain balance, and transactions hold the information of assets transfer between different accounts.A transaction is validated and recorded on the blockchain only when the sender has an asset value equal to or more than what is requested to transfer in the transaction.
In the UTXO model, there is no essential notion of the account associated with ID/ address of trader but the transactions inductively trade and spend outputs (assets) generated by previous transactions and create a new log of unspent outputs (assets).Both methods have their respective pros and cons.A detailed explanation can be found in work by Zahnentferner (2018).In the context of T&C supply chain, the above-mentioned methods can be adapted in accordance with the asset transfer and tracking requirements from the supply chain.

Permissions
Blockchain network are unusually of two types, private and public.Public blockchain (e.g.bitcoin blockchain) are open to common public and anyone with internet access can join the network and perform transactions.Contrary to this business blockchain (e.g. for application in supply chain) are private in nature and require adequate permission to join and perform transaction.A private blockchain network consists of known partners that have a certain degree of trust among themselves.Each partner holding a public-private keys pair identifier.A detailed explanation with an example of public-private keys pair can be found in in Zyskind et al. (2015).This identifier in private blockchain determines the type and extent of access an individual partner has private blockchain network.It helps to set the network rules and partners' interaction policies.Hence, to maintain security and avoid fraudulent transactions, the private key is always confidential and only known to its owner.Through this functionality, it is easy to comply with data protection regulations, maintain data privacy, trace the history of the product, identify the source of the defect and have better control on the data that are appended on the blockchain (shared ledger).

Consensus
While dealing with a shared ledger, it is important to have a mechanism to avoid what is called the Byzantine fault (Castro & Liskov, 2002).In simple terms, it is a wrong ledger entry, done by mistake or deliberately.Therefore, each transaction is verified against the current state of the shared ledger before recording it in a block.This validation can be done by single peer (validating peer) on the blockchain that can be randomly selected when a new block is formed.This safeguards the ledger from a wrong entry.The address of the validating peer is also saved on each block along with the transactions data and other information.Public blockchain like, Bitcoin uses a proof-of-work (PoW) consensus mechanism that makes bitcoin blockchain highly secured from attacks.In PoW, the miners (pool of processing nodes) compete with each other to find appropriate hash of the new block and earn a reward in the form of bitcoins.The appropriate hash is obtained by calculating a number referred as nonce (number only used once).
Greater the difficulty level, harder it is to create a hash lesser than the target.In a private blockchain, apart from PoW, mechanisms such as Proof-of-Elapsed Time, Byzantine fault tolerance, etc. can also be used where the validating miner is chosen randomly based on a set mechanism.A detailed explanation can be found in work by Viriyasitavat and Hoonsopon (2018).

BLOCKCHAIN-BASED TRACEABILITY FRAMEWORK FOR T&C SUPPLY CHAIN
Blockchain designed for business and supply chain application are private blockchain and quite different from that of the public blockchain for instance bitcoin blockchain or those for cryptocurrency applications.As compared to the public bitcoin network, blockchain for supply chain needs to have privacy and restricted access.It should be private with authorized and identifiable partners.Besides, there may be a requirement of different levels of visibility and accessibility for each partner.At system level, the blockchain would require to record and secure essential data to ensure traceability.However, depending on the accessibility-level, each partner may only have access to a certain set of information.This structure would ensure a technologybased trust among partners, transparency in the supply chain and visibility that can enable easy implementation of the government rules and policies.Similarly, each partner can maintain their competitive advantages without disclosing all information and strategies to the competing firms.
For instance, supplier product-costing data can be made accessible only to the buyer and not to other supply chain partners.Nonetheless, the blockchain should record all transactional data with customized accessibility to the supply chain partners and remain auditable and verifiable (Gupta, 2018;Korpela et al., 2017).This would help in resolving conflicts and make supply chain partners accountable, orienting them towards ethical practices...
For a clear understanding, the introduced blockchain-based traceability framework is described at organizational and operational levels.At the organizational level, it explains the supply chain configuration of private blockchain network, partner interactions, methods for defining customized accessibility of transactional data, and modes for accessing the blockchain network.
At the operational level, it explains how smart contract rules and transaction validation mechanism for blockchain can be configured for supply chain traceability application and how information associated with different supply chain stages can be captured and stored.

Organizational level
As explained previously, in the T&C supply chain, fashion brands or retailers usually act as as focal firms that forecast the market demand and place orders to upstream suppliers.Each retailer sells a variety of products through multiple channels (such as retail stores, online-stores etc.).
The product line changes depending on the season and fashion trends.In order to fulfill the demand, a retailer usually procures from multiple apparel manufacturers.Similarly, an apparel manufacturer supplies to multiple retailers and procures raw materials from different upstream suppliers.Hence, in an idealistic scenario of blockchain-based traceability in the supply chain, every partner may be connected to multiple channels, where each channel may have a separate shared ledger and one or more smart contracts.Figure 3, shows the transformation of linear T&C supply chain shows in Figure 1 into a distributed blockchain network.

Fig. 3 Blockchain-based decentralized network for information sharing
This transformation from linear to distributed blockchain network affects the information sharing mechanism.Further, the dotted arrows linked with each partner and moving outward shows the other possible blockchain networks with which a partner can be associated.There are two additional partners (Ordering service and Auditor) in the network that are explained later.
In this proposed framework, we have considered T&C retailer, which usually acts as the focal firm, as the initiating partner that starts and maintains the blockchain network.The retailer interacts with different clusters of upstream suppliers and connects each cluster with one or more channels.Each cluster consists of sub-supply chain or supplier network starting from fiber manufacturer to apparel manufacturing unit, involving logistic partners, auditors, and certification agencies.Multiple customizations can be made in a private blockchain network to match the requirements of the trading partners.This customization and configuration can ease the functioning of blockchain, accelerate the processing, and simultaneously maintain privacy and transparency in the network.Based on the same logic, here we propose a blockchain-based traceability system while configuring the supply chain structure and partner interaction rules.
Following are the main components of the blockchain-based traceability network at the organizational level.

 Channels
Channels are subdivisions of the network, used for data partitioning.Each channel has its independent blockchain (chain of transactions) that are stored over a distributed shared ledger.
The blockchains are are governed by one or more smart contracts.A cluster of the upstream suppliers, usually dealing with a particular product, can connect to one channel or a set of channels, each for different types of transactions.For example, all material and productionrelated transactions for one cluster could run through one channel and financial transactions from the same cluster can run through another channel.This would facilitate data privacy and subdivide the network in multiple sub-network, each with its own shared ledger(s) and smart contract(s).Each partner over a given channel follows the channel rules and common rules of the whole network.These rules include trading and access rights of indiviadual partners and the extent to which a partner can interact over a particular channel.For instance, an auditor can only access a read-only request (for the ledger) to approve transactions, however, they cannot add or modify a transaction.

 Peers
Peers are processing systems that host the smart contract and/or shared ledgers on them.They facilitate generation, endorsement and/or validation of transactions depending on their roles.
They are different nodes that are connected together to form the network.Determined by their roles, only the main partners of a supply chain (cluster) should host peer systems, as it involves investment and maintenance of the system.The other partners can simply access the ledger through an application.For example, sub-suppliers with a limited contribution in the supply chain need not invest in hosting peers.They can simply run the application on a compatible device to access the blockchain.During the validation process, peers can be selected based on the consensus mechanism to validate and endorse a transaction.

 Applications
Applications are user-friendly software interface that can be used to make requests on blockchain.The requests can aim to read or add transactions, or validate transactions to add on shared ledger.Each partner can run the blockchain application on multiple devices with different access rules.For example, an RFID or QR-code reader can be directly connected to a channel to post, tag, scan timestamps and locations. .Similarly, customers can access product trading data through a separate application connecting to the same blockchain with limited accessibility of data. .

 Ordering service
Ordering service is typically a third-party service, responsible for maintaining the network.It does not host the shared ledger, smart contract or generate/endorse/verify transactions.Its main task is to collect a set of transactions that are added by the supply chain partners, arrange them in a logical sequence, register them on a block and convey the block for validation process.
After validation, the ordering service would append the validated block to the shared ledger of the respective channel.

 Membership services
In a private blockchain network for supply chain, membership services generate and provide unique public-private key pairs to the participating partners.The key pairs determine the type and extent of accessibility on the blockchain network depending upon the role and responsibility of the supply chain partner.
Figure 4 shows a simplified representation of the proposed blockchain framework for the T&C supply chain.It consists of two channels for two clusters of the supply chain partners with the retailer (RE) as a common partner.Here, RE is the focal firm that initiates the blockchain and hosts multiple channels for various clusters.Supply chain partners interact with each-other on the respective channel (Channel 1 and Channel 2).This interaction is governed by a aggregation of channel specific rules (C1 and C2) and common network rules (CN).There are multiple peer systems (e.g.P1a and P1b for Channel 1 and P2a and P2b for Channel 2 in Fig. 4) associated with each channel that can host a single smart contract and ledger (e.g.P1a hosting S1 and L1), or multiple smart contracts and ledgers (e.g.PC hosting S1 and L1 and S2 and L2).In Figure 4, A1a and A1b are the applications that can access Channel 1 and , A2a and A2b are the applications that access Channel 2, whereas AC application can access both channels.ACus is an application for the customer through which they can read the product traceability related data to verify the origin, make, provenance of the product.

Operational level
For designing blockchain-based traceability framework, it is important to analyze the operationalization of blockchain.This analysis is in the context of supply chain that involves multiple operations by different s..For example, apparels form the core of a T&C supply chain and traceability refers to the apparel data management starting from fiber stage throughout the supply chain.Hence, the framework at operational level should demonstrate activities such as planning, gathering, arranging, and exchanging traceability data at different levels of the T&C supply chain.
In the T&C supply chain most upstream partners (i.e.excluding retailer and mediators) take raw materials in different forms as input from the suppliers; perform various operations to make the final product that is passed to the next supply chain partner (Kumar et al., 2017).This process is replicated repeatedly by various supply chain partners until the final product is supplied to the retailer.As a result, a substantial amount of is generated at each supply chain stage that require proper collection and management procedures.The generated information acts as a critical component of the supply chain and each partner needs to work towards controlling its flow and protecting confidential information.As a result, all of the information may be recorded but only essential information should be shared on the distributed ledger.Thus, the blockchainbased traceability implementation would require advance planning and identification of the essential traceability information that can be shared on the distributed ledger by building a proper consensus among the supply chain partners (Agrawal & Pal, 2019).Similarly, it is also important that necessary data is collected and shared to comply with local regulations and certifying agencies' requirements.To reduce the complexity, Kumar et al. (2017) proposed to divide the traceability information into four sets: Private shareable, public shareable, secured, and linking information.

 Private shareable information
Private shareable information consists of set of information crucial for B2B operations and especially those useful for material transformation processes (for instance, intermediate product specifications, design and details).This information when shared securely within supply chain partners can enhance visibility and reduce risks.However, they are secured and cannot be accessed by a third party or customer.

 Public shareable information
Contrary to private shareable information, public sharable information can be shared with the customer and with any third party.These are some of the essential information that should be recorded and shared at all stages of product transformation in order to comply with the accreditation and regulations from the local government.The extent of collection and sharing of public shareable information would determine the transparency level of a supply chain for its customer.

 Secured information
It is encoded information that can only be accessed by an selective authorized partner within the channel.Unlike private shareable information which can be accessed by any B2B partner, secured information is sensitive and confidential.It can include financial data, IP data and various other information that can be a source of competitive advantage.

 Linking information
The work by Kumar al. (2017)

BLOCKCHAIN-BASED TRACEABILITY OF ORGANIC COTTON -A USE CASE EXAMPLE
The application of the proposed framework is demonstrated through an example blockchain program written in Python 3.7.2,HTML and Flask (Python-based web framework) on an Intel(R) Core (TM) i7-8665U CPU 2.11 GHz with 16GB memory running on windows 10.The blockchain is designed for one channel a cluster of supply chain partners trading organic cotton or organic cotton based products.The supply chain starts with organic cotton supplier and passes through different supply chain partners until the retailer gets the final product (e.g.garment) with 100 % organic cotton composition.Here on, we will refer the final product as 'organic product'.The example demonstrates the application of the blockchain-based framework in tracking and tracing transactions and collect crucial traceability information.The following section explains the main components of the example blockchain.

Supply chain partners  Organic Cotton producer/supplier (OCS)
Organic Cotton producer/supplier (OCS) is a certified cultivator or supplier (with several farms) of organic cotton.The OCS is the only partner in the supply chain who has an authority to add organic cotton mass in the supply chain and corresponding transactions on blockchain distributed ledger, whereas other partners can only transfer the organic cotton mass in different forms.This organic cotton mass is constantly monitored based on the production capacity of the OCS.In addition, a certifying agency regularly monitors the farms and provides a time-bound certificate for material authentication, which implies that the OCS can add a certain mass on the shared ledger based on the validity of the certificate .Each transaction contains the information of two associated partners and a certain mass of organic cotton which is transferred among the associated partners.

 Yarn Manufacturer (YM)
Yarn Manufacturer (YM) represnts a fiber-spinning mill that receives/buys the organic cotton fiber from the OCS and manufacture yarns from it.YM further divides the yarns into different batches (each with a certain mass) and transfers them to the next partner (in this case fabric manufacturer).Each batch is assigned with a unique Traceability ID that includes an impression of previous Traceability ID of the cotton fiber provided by OCS.

 Fabric Manufacturer (FM)
Fabric Manufacturer (FM) is a weaving mill that receives a organic cotton yarns, from YM (physically and transaction updated on blockchain) and subsequently transforms them into fabrics.FM divides fabrics into batches and marks them with a unique Traceability ID that includes an impression of previous Traceability ID of the cotton yarn provided by YM.

 Apparel Manufacturer (AM)
AM receives a certain mass of organic cotton fabric of cotton (in the form of rolls) and turns them into a finished organic product.AM makes organic products and assigns them with a new Traceability ID that includes an impression of previous Traceability ID of the fabric provided by the FM.

 Retailer (RE)
RE receives the finished and ready-to-sell organic product from AM.At this point, they can connect with the blockchain network and access the shared ledger.Hence, the RE can track and trace all involved supply chain partners, know the history of the organic product and ensure the origin and authenticity of organic cotton.

Smart contract
In the given example, the concept of mass balancing is followed to keep track of organic cotton mass generated and transferred in the supply chain.It is a widely used logic for the conservation of mass in a physical system, which states that mass cannot disappear and neither can be created spontaneously.Mass balancing accounts for the material entering and exiting along with the current mass accumulated in the system.Each transaction recoding the mass flow is tracked and recorded on the shared ledger.Duplicate transfer of the same amount/asset is identified by the mass balancing system (Wills & Finch, 2016), which is written in mathematical form as: Where, 'input' refers to the total mass of assets that a supply chain partner has received from other supply chain partners or generated through some processes (like in case of OCS), 'output' refers to the amount that has been transferred to other supply chain partners and 'accumulation' refers to the mass left in the inventory.Therefore, each transaction will be validated with the mass balancing to check if the organic cotton mass remains conserved and connected to the origin.The algorithm checks whether the transferring partner actually possesses the suitable organic cotton mass that is being traded.For record-keeping, we have followed the Account / Balance method.The algorithm keeps track of the asset balance in each partners' blockchain account as a global state in the shared ledger.Unlike UTXO (use in Bitcoin), the Account / Balance method is more effective for record-keeping the same blockchain has to deal with multiple types of assets.For instance, could be the case where a single partner can supply various types of fiber (e.g.polyester, acrylic, rayon, etc.) and in the later stages, these fibers are blended during the product transformation in the supply chain.

Permission
As stated before, in private blockchain each partner has a unique ID that is assigned by the registering or membership service provider.In addition, a private-public key pair is generated for supply chain actor's authentication on the blockchain network.As the public keys are usually a long set of random digits, unique ID is a simplified and easily communicable identifier for each partner that is associated with their public key.In our example, the private and public key pair for each partner is generated using the RSA (Rivest-Shamir-Adleman) algorithm (Rivest et al., 1978).Likewise, in the blockchain application, while doing a transaction; a transferring partner will input its unique ID, private key and the Unique ID of the recipient.The web interface developed for the generating public-private key pair and connect it to the assigned unique ID is shown in Figure 5.The key pair can also be used to determine the access rights of each partner on the blockchain network.

Fig. 5
Web interface for the public and private key generator

Consensus:
The example blockchain program runs on a computer system.The first peer generates all the transactions; the second one validates them against the shared ledger.If validated, transactions are written on a block that contains block ID, a hash of the previous block, transactions (along with the traceability information) and address of the validating peer.For demonstration purpose, the proof-of-work consensus mechanism is followed to generate the nonce value for each block.

Transactions:
The example blockchain demonstrates a simple scenario of trading and transfer of organic cotton from fiber supplier (OCS) to retailer (RE) in sequential order i.e. simulating the material flow in a typical T&C supply chain.In practice, there may exist multiple partners at each supply chain stage that are connected on the blockchain network over different channels, as explained earlier.
Similarly, a supply chain actor may procure assets from multiple suppliers, and subsequently transfer these assets to multiple downstream buyers, as shown in Figure 6.

Fig. 6 A complex T&C supply chain network with a marked partner involved in the example scenario
It can be observed that RE can have multiple at each supply chain stage, with many possible permutations.Nonetheless, for of understanding, one channel and four sets of transactions are on one channel and recorded on the shared ledger.For the demonstrative purpose, first a transaction is performed by a supply chain partner using the 'Trade Organic Cotton' interface (as shown in Figure 7) and then it is verified and recorded as a block in the blockchain.The interface collects sender Unique ID, sender Private key and recipient unique ID (which act as an address and linked with the recipient public key).At first, a verification is made if the sender is valid and if it possesses assets required for transactions.If both conditions are satisfied, the transaction is written on the blockchain and the transferred assets are updated accordingly in the respective supply chain actors' accounts.Figure 7, demonstrate transaction between organic cotton supplier and yarn manufacturer from Turkey, where the sender (organic cotton supplier enters its unique ID and private key, along with unique ID of recipient, in this case yarn manufacturer along with amount.

Fig. 7 Web interface to perform transactions
As it is previously explained that, only OCS has the permission to add new mass of organic cotton on the shared ledger and subsequently in the supply chain.Therefore, as shown in Figure 6, OCS uses its public/private key, generate the genesis block (Block 0) and adds 200U (U stands for units) of organic cotton on his/her account on the shared ledger.This block is then hashed and acts as a starting point of the blockchain.OCS performs another transaction in which 100U of organic cotton is transferred to yarn manufacturers (YM1 and YM2) respectively.This is recorded on Block 1, which is hashed and amount is updated on the shared distributed ledger.
After this, YM1 transfers 75U of organic cotton (in the form of yarn) to fabric manufacturer (FM1) and retain a balance of 25U.The transaction is again validated against the shared ledger, recorded on new Block 2 and hashed.Subsequently, FM1 makes fabrics from the obtained 75U of organic cotton (in the form of yarn) and transfer of it to manufacturer (AM1) in the form of fabrics.The transaction again follows same validation steps and a new Block 3. Finally, AM1 constructs organic product from these 50U organic cotton (in the form of fabric) and transfers it to the retailer (RE).This transaction is validated and recorded as Block 4.

Performance
To get an insight related to performance and applicability of the proposed framework some simulation runs were performed with the developed blockchain program.To reduce the complexities, the simulation ran on single blockchain node while modifying parameters that could replicate transaction and validation from multiple nodes.It is well understood from literature that development of a large testbed (incorporating all proposed features, partner interaction and channel structure) to simulate and evaluate the performance of applications like blockchain would require high efforts (Alzahrani & Bulusu, 2020).In fact, the few blockchain simulation models /tools currently available do not have functions to incorporate all the proposed aspects of blockchain and/or would requires substantial modifications.
The developed blockchain with the deployed smart contract tests the validity of transaction by first verifying the public-private key signature and then the account balance (cotton mass) of the sender (party transferring the cotton mass to the receiver or buyer).The blockchain was simulated varying the following parameters.First, the nonce difficulty level from one to six, in order to evaluate the average time duration to predict the target hash.As the present blockchain follows proof-of-work consensus mechanism, the increase in nonce difficulty level would enhance the security of the blockchain network.Nevertheless, this can impact the block formation time.As a second parameter, the number of transactions that could be included in a batch sent to committers to one block was varied from 1 to 91 to check its impact on the hashing time.
It can be seen in Figure 8 (a) that there was no significant change in block hashing time with increase in number of transactions.On the other hand, there was an exponential increase in time with increase in difficulty level of the nonce, as seen in Figure 8(a) and (b),.Hence, for better performance of the proposed blockchain with proof-of-work consensus algorithm would require fixing the nonce to lower difficulty levels with higher number of transactions per block, to avoid delay in block hashing.Moreover, proposed is a private blockchain with a certain degree of trust among supply chain partners -so proof-of-work algorithm is just for randomly selecting the validating node without concept of rewarding miner.

CONCLUSIONS
Blockchain is a distributed ledger that works without a central authority and allows creating a decentralized and immutable ledger of transactions which are verifiable and traceable.Due to these unique features, it has been explored for various applications primarily in the financial sector.However, a shift has been observed in terms of exploring novel applications in the context of supply chain, particularly to create transparency and traceability.They have highlighted potential of smart contract for gaining efficiency using automated validation mechanism (Lohmer & Lasch, 2020), need for small scale experimentation for demonstrate applications of blockchain in supply chain (Sunny et al., 2020) and sector specific blockchain studies (Wasim Ahmad et al., 2020).
In this direction, this paper presented a blockchain-based traceability framework for the supply chain with a case example of the T&C supply chain.It provides blockchain framework for supply chain traceability implementation.Further, the proposed framework is operationally illustrated for organic cotton traceability through the mass balancing validation mechanism.The main outcome of this paper is a simulation-based demonstration of network configuration and partner interaction protocol in the context of a complex supply chain, by using a blockchain-based traceability framework.The demonstration showcases how to ensure data safety, traceability information exchange and develop technology-based trust over a blockchain network by using a smart contract.Key outputs from the simulation conducted under two scenarios formulated in our study suggest delay in block formation when a) nonce complexity increases, and b) number of transactions increases per block.
The paper makes contributions not only to scientific literature on blockchain in the domain of supply chain management, but also practically in the industrial sector of T&C.. Firstly, the demonstration work carried in the paper provides evidence-based proof of how the critical aspects of blockchain-SCM integration must be operationalized, as highlighted by Queiroz et al. (2019) which remains currently elusive in research.Secondly, with an example blockchain, the paper demonstrates the applicability of the framework by testing its performance at different nonce difficulty levels while scaling up the block size.
When it comes to the practical implications of the study, our demonstrated application of developing a blockchain for organic cotton products and testing it under various scenarios can be a major input to several ongoing blockchain pilots, e.g.UNECE's capacity building project for implementing blockchain for traceability and due diligence in the cotton value chain, by particularly creating understanding of the critical success factors and enablers of implementation.This, in particular relates to understanding the blockchain system design, based on building distributed ledger technology (DLT), smart contracts, token economy that is secured and credible.Our simulation results can be interesting starting points for gauging the feasibility of several of these blockchain pilots, such as UNIDO Egyptian cotton project (Weghofer et al., 2020) .
The presented research creates a foundation for future research in multiple directions.One area of research, which can be focused in future is to formulate the sector-specific smart contract which accommodates the specific needs from individual supply chain for actor specific activities.Presently, certification companies play an important role in compliance of the supply chain stakeholders.In this context, the role of certification agencies can be further explored and operationalized in the supply chains where blockchain-based traceability systems can be used to ensure compliance through smart contracts.Furthermore, the interaction and integration of different blockchain systems needs to be investigated for their functioning when a supply chain partner is involved with multiple buyers or suppliers with multiple blockchain networks.
discusses about linking information in context of supply chain traceability.Nevertheless, linking information is most crucial to the functioning of the blockchain.It is the information that would be validated during each transaction against the shared ledger that is governed by the smart contract.This would contain four value fields and a combination of all this would be confirmed against the global state of the shared ledger to validate the transaction.These four value fields are: a) Traceability ID or Lot ID: is a unique identification code differentiating each TRU (traceability unit) from the other similar TRUs.It is a crucial element of traceability and essential to bind each TRU with the traceability information.It also facilitates tracing of asset lots even after they are divided, mixed or recombined.These IDs can be generated through a time-based function to ensure its uniqueness.b) Public Key is assigned to identify the supply chain partners.The key is a crucial element to trace and verify the claim.During the transaction validation, the public keys of the trading partners are checked against the shared ledger to verify if sending partner has sufficient assets i.e. at least equal to the amount to be transacted. .c) Transaction signature is a combination of the private key and the unique ID or address of the authorized partner that has initiated the transaction.It is used to authenticate the transaction, help in maintaining security of ledger and define the type of accessibility.d) Asset Value is the amount of asset being traded on the supply chain.Each supply chain partner can access the blockchain through applications and subsequently add transactions including the asset value that they would like to trade.If validated, the asset value is written on the block chain and the ledger is updated.Asset values and amount can be tracked and captured automatically using sensors.

Fig. 8
Fig. 8(a) Time taken to form block with increased of transaction per block different nonce difficulty level from 1-6 (b) Average time taken to predict target hash at different nonce difficulty level