IBM Z Day on Nov. 21: Discover the ideal environment for modern, mission-critical workloads. Learn more

Build a global finance application on blockchain

Summary

Blockchain is a secure, distributed, and open technology that can help lower costs, speed up processes, and build trust in transactional applications. Trust and dispute resolution are major concerns in the global finance use case, which involves product purchase transactions between multiple participants such as the buyer, seller, provider, shipper, and finance company. This developer code pattern shows you how to build an application that tracks these actions, and covers dispute resolution which can be applied across industry verticals to resolve disputes. This use case employs a Node.js smart contract and a Node.js web application.

Description

The global finance use case involves various participants, such as the buyer, seller, provider, shipper, and finance company, which perform the following actions:

  • The buyer creates the order.
  • The sellercontacts a provider for the items in the order.
  • The provider provides the items in the order.
  • The shipper delivers the items in the order.
  • The finance company processes payments to the seller.

The number of participants in this use case and the different types of transactions that can be executed show how this is an ideal use case to demonstrate dispute resolution using the smart contracts and distributed ledgers provided by blockchain. Blockchain also enables faster settlement of such disputes, as opposed to the traditional approaches employed for use cases like this.

In this code pattern, you will see how a global finance smart contract can be deployed to a network on the IBM Blockchain Platform. We will then show you how to test the network using a Node.js application that demonstrates the global finance use case by creating different views for the various members on the network.

When you have completed this code pattern, you will understand how to:

  • Package a blockchain smart contract using the IBM Blockchain Platform Extension for VS Code
  • Set up a Hyperledger Fabric network on IBM Blockchain Platform
  • Install and instantiate a smart contract package through the IBM Blockchain Platform
  • Test the blockchain network by executing a Node.js application with the Hyperledger Fabric SDK to interact with the deployed network by issuing transactions

Flow

flow

  1. The blockchain operator clones the GitHub repo to obtain the Global Finance on Blockchain smart contract.
  2. The blockchain operator uses the IBM Blockchain Platform Extension for VS Code to package the smart contract.
  3. The blockchain operator sets up and launches the IBM Blockchain Platform service.
  4. The IBM Blockchain Platform enables the creation of a Hyperledger Fabric network onto a IBM Kubernetes Service, enabling installation and instantiation of the Global Finance on Blockchain smart contract on the network.
  5. The users (buyers, sellers, providers, shippers, and finance companies) use the Node.js application, which in turn uses the Fabric SDK to interact with the deployed network on the IBM Blockchain Platform and issue transactions.

Instructions

Ready to get started? Check out the README for step-by-step details on how to:

  1. Clone the repo
  2. Package the smart contract
  3. Create IBM Cloud services
  4. Build a network
  5. Deploy the global finance smart contract on the network
  6. Connect the application to the network
  7. Run the application
Sandhya Nayak
Raheel Zubairy