Skip to content

cybersoton/corda-trade-finance

Repository files navigation

Corda for Uk Trade Finance

This repo contains the sources of Java CorDapp developed together with the UK Export Finance (UKEF), as part of the Department of International Trade (DIT).

This code can be installed as a Corda blockchain DApp. This PoC represents the result of a joint scoping, design and development activities with UKEF. The main goal of this PoC is to explore the viability of using blockchain technology for next-generation finance support services for the UK exporters.

The code has been generated by building on the Java Template for Cordapp.

Installation

To download the application, execure the following commands

  $ git clone https://github.com/cybersoton/corda-export-finance.git
  $ cd corda-export-finance

To set up the Corda application, it is needed to compile via Gradle

$ ./gradlew clean deployNodes
$ build/nodes/runnodes

To set up and run the web servers (one for each party)

$ ./gradlew runTemplateServerExporter
$ ./gradlew runTemplateServerBank
$ ./gradlew runTemplateServerUKEF

that enable the webapp likned to the Cordapp on http://localhost:10050/ (for the Exporter) http://localhost:10051/ (for the Bank) http://localhost:10052/ (for UKEF).

Usage

The application involved three parties:

  1. Exporter simulating exporters submiting a bond application
  2. Bank simulating the bank relantionship manager and the trade finance team assessing the exporter application
  3. UKEF simulaitng the UKEF team assessing the exporter application and the bank guarantee answer

In addition to these parties, the network created by the application features a Notary node that enforces the 'consensus' services for transaction acceptance.

The Cordapp can be used both via a mock web-interface built upon the REST API exposed by the RPC servers.

Operational Flows

The application defines three main flows among the parties as defined below

  1. CreateBond: Exporter submits a bond application, together with its value and UK relevace
  2. BankAssess: Bank provides financial info about the exporter and decides the level of support granted
  3. UKEFAssess: UKEF checkes, if any, the support given by the bank and decides if supporting the application

Corda Terminal

To use the Corda terminal (which is opened, one for each party, by the command build/nodes/runnodes) you can use these commands.

  • CreateBond (from exporter console)
start CreateBond$Initiator bondId: "bond1", bondValue: 1000, bondUKValue: 400, bank: "O=Bank,L=London,C=GB", ukef: "O=UKEF,L=London,C=GB"

To visualise the updated state in the vault

run vaultQuery contractStateType: com.template.UKTFBondState
  • BankAssess (from bank console)
start BankAssess$Initiator bondID: "bond1", bankSupplyContractID: "Bnk-BondA1", turnover: 150000.0, net: 12000, defaultProbability: 10, creditRating: BB, requestedUKEFSupport: 60, exporter: "O=Exporter,L=Southampton,C=GB", ukef: "O=UKEF,L=London,C=GB"
  • UKEFAssess (from UKEF console)
start UKEFAssess$Initiator bondID: "bond1", UKEFSupplyContractID: "UKEF-BondExpA1", isUKEFSupported: true, exporter: "O=Exporter,L=Southampton,C=GB", bank: "O=Bank,L=London,C=GB"