{"id":2730,"date":"2018-12-17T23:32:25","date_gmt":"2018-12-17T18:02:25","guid":{"rendered":"http:\/\/navveenbalani.dev\/?p=2730"},"modified":"2020-02-16T22:53:34","modified_gmt":"2020-02-16T17:23:34","slug":"the-trade-finance-use-case-using-ibm-hyperledger","status":"publish","type":"post","link":"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/","title":{"rendered":"The Trade Finance Use Case using IBM HyperLedger"},"content":{"rendered":"\n<p>In this section, we will explore and implement the trade finance use\ncase. Let\u2019s consider an international trade process. To carry out an\ninternational trade, several parties or organizations need to coordinate with\neach other. They typically include, but not limited to: buyer (importer), seller\n(exporter), banks, shipping and logistics firms, port and customs authorities.\nThe international trade process of today is often time-consuming and\nineffective due to several regulations and documentation at each stage of the\nprocess. This not only makes the trade process ineffective but also adds a huge\nburden of cost. <\/p>\n\n\n\n<p>Secondly, there is lack of visibility around the entire process, and\neach party to the trade maintains their own truth of information. There is no\nshared consensus and often arise lack of trust especially if they have not\nconducted business with each other before.&nbsp;\n<\/p>\n\n\n\n<p>As creating the entire trading process may not be pragmatic within the\nscope of the book, we will implement a very simple trade finance use case that\nwill involve exporting goods from seller to buyer and cover the process of\ncreating and authorizing LOC and shipment using Hyperledger Fabric blockchain\ntechnology.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><em>&nbsp;\u201cTrade finance refers to financing a trade. In\nsimple terms, a trade is an exchange of goods and services between buyers and\nsellers or importer and exporter. Trade can be a domestic or international\ntrade. Banks or financial institutions provide a different form of financing\navenues to support a trade. Financing does not only involve lending money but\nalso making sure appropriate documentation is carried out so that the trade\nprocess is efficient and parties to trade can do business with confidence and\ntrust.\u201d<\/em> <\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>We will introduce a fictitious company named Free Trade Enterprise\n(FTE) &#8211; providing a trade finance application to conduct free and fair trade,\ntransparent to all the parties. The application will be implemented using\nHyperledger Fabric blockchain platform. The application will enable parties to\nthe business execute a trade in a secured fashion by means of consensus and\nprovenance, so as to provide transparency and accountability thereby reducing\nthe time of financial trade from days to hours.<\/p>\n\n\n\n<p>The FTE provides a marketplace model where trading can happen through\nshared consensus by the parties involved in the business. The marketplace uses\nmany technologies apart from blockchain to make trading smooth and transparent.\nThe technologies could include artificial Intelligence to match prospective\nsellers with buyers based on buyer&#8217;s requirements, rating, and past trades. For\nnew buyers, recommendation systems could pick up best-rated and safe sellers\nand trusted associated parties and provide optimization of trade based on\nsimilar requirements.<\/p>\n\n\n\n<p>Internet of Thing (IoT) technology can be used to automatically track\ngoods and shipments at various intervals. For instance, goods that require to\nbe transported over some optimum temperature, sensors can be employed that\nupdate contracts automatically if the temperature is dropped to a certain\nlevel. GPS coordinates can be tracked at various intervals to ensure real-time\nevent tracking of trades.<\/p>\n\n\n\n<p>As you see the possibilities are endless and one can leverage a\ncombination of these technologies, backed by consensus through blockchain for\nnext generation trade platform.<\/p>\n\n\n\n<p>The users of our trade finance application are categorized into four\ndistinct entities:<\/p>\n\n\n\n<ul><li>Buyer (registered with FTE)<\/li><li>Supplier (registered with FTE)<\/li><li>Importer and exporter bank (part of larger\nBanking Consortium)<\/li><li>Shipper (Shipment and Logistics firm)<\/li><\/ul>\n\n\n\n<h3><a>The Trade\nscenario<\/a><\/h3>\n\n\n\n<p>A buyer (importer) registered with FTE wishes to buy 5 cartons of rich\nbaked almonds with each carton containing 500 packs. FTE provides a Fabric\nblockchain platform where parties to the trade can create relevant\ndocumentation using smart contract. The buyer initiates the process by making a\npurchase inquiry to the seller. The seller views the purchase order and\nregisters a sales order against it with certain terms and conditions about the\nsale. Once the sale contract is established, the importer bank will issue a\nletter of credit (LOC) to the exporter bank. This is one way of providing\ncredit to the buyer on presentation of relevant documents, like bill of lading,\nby the seller. Once the exporter bank receives and validates the terms in the\nletter of credit, the seller approves the same, which initiates the shipment\nprocess. The shipping company will scan the goods and prepare the bill of\nlading (BOL) document, signifying the initiation of shipment process. Once the\nbuyer receives the goods, it endorses the bill of lading document thereby\nindicating the completion of the trade. <\/p>\n\n\n\n<p>In the above\nprocess, we are not dealing with any physical documents like purchase order,\nLOC or BOL but creating a smart contract and updating the status as the trade\nprogresses. As we move towards a digital world, we envision a future where\ndigital contracts would replace physical documentation as legitimate and legal\nartifacts.<\/p>\n\n\n\n<p>We will implement the above flow using\nHyperledger Fabric and start from the LOC creation process. We will assume that\nbuyer and the seller have entered into an agreement to perform a trade\ninvolving the purchase of rich almonds. So, our smart contract is ready with\npurchase and sale order details.<\/p>\n\n\n\n<h2><a>Application Design and\nImplementation strategy<\/a><\/h2>\n\n\n\n<p>We aim to provide a universal design and implementation roadmap for a permissioned-based\nenterprise blockchain. The stated approach is generic in nature and will\nprovide you with a fair idea on how to kick-start your blockchain\nimplementation in the enterprise. We will start with identifying business\nentities and designing the network topology and end up showing implementation\nand deployment. In the end, we will demonstrate the end-to-end test cases that\nwill fulfill our smart contract as it executes transactions and query through\nthe same to depict the final trade completion state.<\/p>\n\n\n\n<p>The approach will have the following stages that can be used to design\nand implement a permissioned enterprise blockchain application:<\/p>\n\n\n\n<ul><li>Defining Business Network<\/li><li>Designing Network Topology<\/li><li>Defining Smart Contract<\/li><li>Application Deployment<\/li><li>\u25cf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nEnd-to-end Test Execution<\/li><\/ul>\n\n\n\n<h3><a>Defining\nBusiness Network<\/a><\/h3>\n\n\n\n<p>Defining business network involves identifying parties to the\nbusiness, their roles, and stake in the business. It involves creating users,\ntheir roles and affiliations or departments. For our trade finance application,\nwe will use three different groups of business entities that will form the\nbusiness network to carry out the trade business. All these entities will\ninteract with the trade finance application and perform its respective function\nto fulfill a smart contract to take it to its logical end. In short, it will\nsignify the completion of the trade in a free, transparent and trusted manner.\nThe following are the three entities or organizations we will configure:<\/p>\n\n\n\n<ol><li>Free Trade Enterprise (FTE)<\/li><li>Banking Consortium (BNK)<\/li><li>Shipping and Logistics firm (SHP)<\/li><\/ol>\n\n\n\n<h3><a>Free Trade\nEnterprise (FTE)<\/a><\/h3>\n\n\n\n<p>FTE will consist of registered buyers and sellers that make use of the\nplatform to discover each other and carry out trades. Their goal will be to\nfulfill their purchase and sale orders respectively. They will interact with\nthe application to typically initiate the quotations or proposal and approve\nthem as smart contracts. The following table depicts the user organization of\nFTE:<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\n  <strong>User Id<\/strong>\n  <\/td><td>\n  <strong>Role<\/strong>\n  <\/td><td>\n  <strong>Organization\n  MSP Id<\/strong>\n  <\/td><\/tr><tr><td>\n  User1\n  <\/td><td>\n  Buyer\n  <\/td><td>\n  Org1FTE\n  <\/td><\/tr><tr><td>\n  User2\n  <\/td><td>\n  Seller\n  <\/td><td>\n  Org1FTE\n  <\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>As shown in the above table, we have two users\ndefined with the roles of buyer and seller respectively and an MSP id of the\norganization to which the user belongs. (Note: MSP Id can be any arbitrary\nvalue; it just identifies your organization). In Hyperledger Fabric, the users\ncan be created using Fabric CA client component. But one can also plug in their\nown CA server implementation to create users or generate crypto credentials.\nFor our trade finance application, we have used the cryptogen tool provided by\nFabric runtime, to generate users and certificates. This is discussed in the\nlater section.<\/p>\n\n\n\n<h3><a>Banking\nConsortium (BNK)<\/a><\/h3>\n\n\n\n<p>The banking consortium can be viewed as a consortium of various banks.\nFor our trade finance application, we will have an importer and an exporter\nbank as a member of this consortium. Importer bank will be involved in the\nprocess of LOC creation, which will be eventually approved by the exporter\nbank. This will be all done using trade finance application provided by FTE\nthrough the use of smart contracts. Just like FTE, the banking consortium will\nalso represent an MSP. The below table depicts its user organization:<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\n  <strong>User Id<\/strong>\n  <\/td><td>\n  <strong>Role<\/strong>\n  <\/td><td>\n  <strong>Organization\n  MSP Id<\/strong>\n  <\/td><\/tr><tr><td>\n  User1\n  <\/td><td>\n  Importer Bank\n  <\/td><td>\n  Org2BNK\n  <\/td><\/tr><tr><td>\n  User2\n  <\/td><td>\n  Exporter Bank\n  <\/td><td>\n  Org2BNK\n  <\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>We will have users with the role of importer and\nexporter bank respectively. The MSP id of the consortium will be Org2BNK<\/p>\n\n\n\n<h3><a>Shipping\nand Logistics firm (SHP)<\/a><\/h3>\n\n\n\n<p>Our design will have a separate entity that will handle shipping and\nlogistics aspect of the trade. Once the seller verifies the LOC approval, the\nshipper will initiate the shipping by creating the BOL document. This again\nwill be done using the smart contract. The below table depicts the user\norganization of the shipper:<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\n  <strong>User Id<\/strong>\n  <\/td><td>\n  <strong>Role<\/strong>\n  <\/td><td>\n  <strong>Organization\n  MSP Id<\/strong>\n  <\/td><\/tr><tr><td>\n  User1\n  <\/td><td>\n  Shipper\n  <\/td><td>\n  Org3SHP\n  <\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>There will be only one user with the role name as a shipper and the\nMSP id as Org3SHP<\/p>\n\n\n\n<p>In the next stage of our design and\nimplementation approach, we will talk about designing a network topology.<\/p>\n\n\n\n<h3><a>Designing\nNetwork Topology<\/a><\/h3>\n\n\n\n<p>Designing a network topology is a very significant step when it comes to implementing blockchain in the enterprise. For our trade finance application, the network topology or the deployment model will look like the following:<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" src=\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2019\/12\/image-62.png\" alt=\"\" class=\"wp-image-2731\" width=\"402\" height=\"266\"\/><\/figure>\n\n\n\n<p>The above network topology defines a blueprint with many nodes or\ndeployment units that communicate with each other to execute or fulfill a\nblockchain transaction. Our network design will comprise of six peer nodes\nrepresenting three different organizations viz. FTE, BNK and SHP and an Orderer\nnode. The model also depicts a channel that will be used by peers to validate\nand execute transactions.<\/p>\n\n\n\n<p>The Orderer node will be responsible for guaranteeing transaction\norder and delivery. The orderer service is also used to create a channel that\nprovides a common communication infrastructure for peer and client nodes. Our\norderer node will be part of FTE organization (orderer.fte.com) hosted on port\n7050. The orderer service is bootstrapped with genesis block also known as the\nfirst block of the blockchain network that contains configuration details like\nwhich organization will manage the orderer node and number of peers and users\nmanaged by each organization. <\/p>\n\n\n\n<p>Channel is another core component that provides a common\ninfrastructure for all the peers (part of that channel) to communicate. We will\nhave one channel termed as &#8216;tradechannel&#8217; where our MSP instances like orderer\n(orderer.fte.com) and peers from all the three organizations will participate\nin the transaction. Each peer will have its own copy of ledger associated with\n&#8216;tradechannel&#8217; channel. In short, all the peers will have visibility of every\ntrade finance transactions that will be carried out on this channel. <\/p>\n\n\n\n<p>Every organization will host peer nodes. We will have two peers per\neach organization &#8211; peer0.app.fte.com and peer1.app.fte.com as part of FTE,\npeer0.bnk.com, and peer1.bnk.com as part of BNK and peer0.shp.com and\npeer1.shp.com as part of organization SHP. One of the responsibilities of peer\nis to execute the transactions and validate them against the endorsement\npolicy. The transactions itself will be part of chaincode that represents our\nsmart contract. And therefore, our chaincode named &#8216;tradefinancecc&#8217; will be\ninstalled on each peer. Peers itself can also become an endorser of\ntransactions. All the peers will form a part of channel \u2018tradechannel\u2019. <\/p>\n\n\n\n<p>In the <a href=\"https:\/\/navveenbalani.dev\/index.php\/articles\/smart-contract-for-trade-finance-application\/\">next article<\/a>, we will talk a bit about our trade finance smart contract, termed as &#8216;tradefinancecc&#8217;. We will explore through the business methods and workflow that will represent the trade finance application.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this section, we will explore and implement the trade finance use case. Let\u2019s consider an international trade process. To carry out an international trade, several parties or organizations need to coordinate with each other. They typically include, but not limited to: buyer (importer), seller (exporter), banks, shipping and logistics firms, port and customs authorities. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[174],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.0.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The Trade Finance Use Case using IBM HyperLedger - Current and Future Technology Trends by Navveen Balani<\/title>\n<meta name=\"description\" content=\"The Trade Finance Use Case using IBM HyperLedger -\" \/>\n<link rel=\"canonical\" href=\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Trade Finance Use Case using IBM HyperLedger - Current and Future Technology Trends by Navveen Balani\" \/>\n<meta property=\"og:description\" content=\"The Trade Finance Use Case using IBM HyperLedger -\" \/>\n<meta property=\"og:url\" content=\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/\" \/>\n<meta property=\"og:site_name\" content=\"Current and Future Technology Trends by Navveen Balani\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-17T18:02:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-16T17:23:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2019\/12\/image-62.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"10 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/navveenbalani.dev\/#website\",\"url\":\"https:\/\/navveenbalani.dev\/\",\"name\":\"Current and Future Technology Trends by Navveen Balani\",\"description\":\"Current and Future Technology Trends by Navveen Balani\",\"publisher\":{\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/navveenbalani.dev\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2019\/12\/image-62.png\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/#webpage\",\"url\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/\",\"name\":\"The Trade Finance Use Case using IBM HyperLedger - Current and Future Technology Trends by Navveen Balani\",\"isPartOf\":{\"@id\":\"https:\/\/navveenbalani.dev\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/#primaryimage\"},\"datePublished\":\"2018-12-17T18:02:25+00:00\",\"dateModified\":\"2020-02-16T17:23:34+00:00\",\"description\":\"The Trade Finance Use Case using IBM HyperLedger -\",\"breadcrumb\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/navveenbalani.dev\/\",\"url\":\"https:\/\/navveenbalani.dev\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/\",\"url\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/\",\"name\":\"The Trade Finance Use Case using IBM HyperLedger\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/#webpage\"},\"author\":{\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\"},\"headline\":\"The Trade Finance Use Case using IBM HyperLedger\",\"datePublished\":\"2018-12-17T18:02:25+00:00\",\"dateModified\":\"2020-02-16T17:23:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/#webpage\"},\"publisher\":{\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\"},\"image\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/blockchain\/the-trade-finance-use-case-using-ibm-hyperledger\/#primaryimage\"},\"articleSection\":\"Blockchain\",\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\",\"name\":\"Navveen\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/navveenbalani.dev\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2019\/07\/navveen_balani.jpeg\",\"width\":200,\"height\":200,\"caption\":\"Navveen\"},\"logo\":{\"@id\":\"https:\/\/navveenbalani.dev\/#personlogo\"},\"sameAs\":[\"http:\/\/naveenbalani.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts\/2730"}],"collection":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/comments?post=2730"}],"version-history":[{"count":3,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts\/2730\/revisions"}],"predecessor-version":[{"id":2765,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts\/2730\/revisions\/2765"}],"wp:attachment":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/media?parent=2730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/categories?post=2730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/tags?post=2730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}