A demo of an IOU-like agreement that can be issued, transfered and settled confidentially

Overview

Corda

The Obligation CorDapp

This CorDapp comprises a demo of an IOU-like agreement that can be issued, transfered and settled confidentially. The CorDapp includes:

  • An obligation state definition that records an amount of any currency payable from one party to another. The obligation state
  • A contract that facilitates the verification of issuance, transfer (from one lender to another) and settlement of obligations
  • Three sets of flows for issuing, transferring and settling obligations. They work with both confidential and non-confidential obligations

The CorDapp allows you to issue, transfer (from old lender to new lender) and settle (with cash) obligations. It also comes with an API and website that allows you to do all of the aforementioned things.

Instructions for setting up

  1. git clone http://github.com/roger3cev/obligation-cordapp
  2. cd obligation-cordapp
  3. ./gradlew deployNodes - building may take upto a minute (it's much quicker if you already have the Corda binaries)./r
  4. cd kotlin-source/build/nodes
  5. ./runnodes

At this point you will have notary/network map node running as well as three other nodes and their corresponding webservers. There should be 7 console windows in total. One for the networkmap/notary and two for each of the three nodes. The nodes take about 20-30 seconds to finish booting up.

NOTE: That the obligation and corda-finance CorDapps will automatically be installed for each node.

Using the CorDapp via the web front-end

In your favourite web browers, navigate to:

  1. PartyA: http://localhost:10007
  2. PartyB: http://localhost:10010
  3. PartyC: http://localhost:10013

You'll see a basic page, listing all the API end-points and static web content. Click on the "obligation" link under "static web content". The dashboard shows you a number of things:

  1. All issued obligations to date
  2. A button to issue a new obligation
  3. A button to self issue cash (used to settle obligations)
  4. A refresh button

Issue an obligation

  1. Click on the "create IOU" button.
  2. Select the counterparty, enter in the currency (GBP) and the amount, 1000
  3. Click create IOU
  4. Wait for the transaction confirmation
  5. Click anywhere
  6. Press the refresh button
  7. The UI should update to reflect the new obligation.
  8. Navigate to the counterparties dashboard. You should see the same obligation there. The party names show up as random public keys as they are issued confidentially. Currently the web API doesn't resolve the party names.

Self issue some cash

From the obligation borrowers UI:

  1. Click the issue cash button
  2. Enter a currency (GBP) and amount, 10000
  3. Click "issue cash"
  4. Wait for the transaction confirmation
  5. click anywhere
  6. Click the refresh button
  7. You'll see the "Cash balances" section update

Settling an obligation

From the obligation borrowers UI:

  1. Click the "Settle" button for the obligation you previously just issued.
  2. Enter in a currency (GBP) and amount, 500
  3. Press the "settle" button
  4. Wait for the confirmation
  5. Click anywhere
  6. Press the refresh button
  7. You'll see that £500 of the obligation has been paid down
  8. Navigate to the lenders UI, click refresh, you'll see that £500 has been paid down

This is a partial settlement. you can fully settle by sending another £500. The settlement happens via atomic DvP. The obligation is updated at the same time the cash is transfered from the borrower to the lender. Either both the obligation is updated and the cash is transferred or neither happen.

That's it!

From the lenders UI you can transfer an obligation to a new lender. The procedure is straight-forward. Just select the Party which is to be the new lender. Refresh teh UIs to see the reflected changes.

TODO

  1. Remove references to "IOU"
  2. Resolve party names for the web front-end.
  3. Replace the Corda web server with a reactive spring boot web server
  4. Auto update the UI

Feel free to submit a PR.

You might also like...
A gradle plugin for getting java lambda support in java 6, 7 and android

Gradle Retrolambda Plugin This plugin will automatically build your java or android project with retrolambda, giving you lambda goodness on java 6 or

A Job Queue specifically written for Android to easily schedule jobs (tasks) that run in the background, improving UX and application stability.

Development in this repository is stopped. Future development continues on https://github.com/yigit/android-priority-jobqueue ========================

An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped
An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped

DEPRECATED TinyDancer is deprecated. No more development will be taking place. Check out the Google Android developer documentation for UI performance

📄The reliable, generic, fast and flexible logging framework for Android
📄The reliable, generic, fast and flexible logging framework for Android

logback-android v2.0.0 Overview logback-android brings the power of logback to Android. This library provides a highly configurable logging framework

It makes a preview from an url, grabbing all the information such as title, relevant texts and images. This a version for Android of my web link preview https://github.com/LeonardoCardoso/Link-Preview
It makes a preview from an url, grabbing all the information such as title, relevant texts and images. This a version for Android of my web link preview https://github.com/LeonardoCardoso/Link-Preview

LeoCardz Link Preview for Android It makes a preview from an url, grabbing all the information such as title, relevant texts and images. Visual Exampl

A plug and play ;) android library for displaying a
A plug and play ;) android library for displaying a "rate this app" dialog

Easy Rating Dialog This lib provides a simple way to display an alert dialog for rating app. Default conditions to show: User opened the app more than

AudioPlayerView is an Android view that loads audio from an url and have basic playback tools.
AudioPlayerView is an Android view that loads audio from an url and have basic playback tools.

AudioPlayerView AudioPlayerView is an Android view that loads audio from an url and have basic playback tools. It makes use of the Android MediaPlayer

transai is a localization tool on Android and iOS.

transai transai is a command line tool to help you do Android and iOS translation management. You can extract string files to csv format, or generate

 KodeEditor - A simple code editor with syntax highlighting and pinch to zoom
KodeEditor - A simple code editor with syntax highlighting and pinch to zoom

KodeEditor - A simple code editor with syntax highlighting and pinch to zoom

Owner
null
A curated list of standards, tests and benchmarks that can be used for testing and evaluating dev-tools

A curated list of standards, tests and benchmarks that can be used for testing and evaluating dev tools Contribution Add the description of the benchm

null 13 Dec 16, 2022
Tired of manually setup test data of Kotlin data classes or POJOs? Instantiator creates Instances of any class for you so that you can focus on writing tests instead of spending time and effort to setup test data

Instantiator Tired of manually setup test data of Kotlin data classes or POJOs? Instantiator creates Instances of any class for you so that you can fo

Hannes Dorfmann 54 Dec 30, 2022
BlackBox - a virtual engine, it can clone and run virtual application on Android

BlackBox is a virtual engine, it can clone and run virtual application on Android, users don't have to install APK file to run the application on devices. BlackBox control all virtual applications, so you can do anything you want by using BlackBox.

null 1.6k Jan 3, 2023
A boiler plate that can be re-used to start android apps

Agile Boiler Plate The main task at the innovation labs of Avast is to find new ideas to work on, prototype these ideas, and quickly implement them. A

Abed Almoradi 45 Sep 19, 2022
Makes Google play in app purchase library (BillingClient) into a flowable that can easily be used in compose world

Billy the android Our goal is to make a modern api of BillingClient so that it is easier to use in compose world. This library is still early beta and

Stefan Wärting 16 Dec 14, 2022
A special view that can contain other views (called children)

A ViewGroup is a special view that can contain other views (called children.) The view group is the base class for layouts and views containers. There

Phạm Thành Trung 1 Oct 16, 2021
A .NET Watch Run Configuration (dotnet-watch) that can be used in RiderA .

A .NET Watch Run Configuration (dotnet-watch) that can be used in RiderA .NET Watch Run Configuration (dotnet-watch) that can be used in Rider

Maarten Balliauw 19 Dec 10, 2022
****. Use the native and support library variants instead - https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html. An android library that makes it easy to add custom fonts to edittexts and textviews

Add to your project Add this line to your dependencies in build.gradle compile 'in.workarounds.typography:typography:0.0.8' Using the views There are

Workarounds 43 Nov 6, 2021
SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device.

#Scripting Layer for Android (SL4A) SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreter

Damon Kohler 2.3k Dec 23, 2022
An application for runners and cyclists. Allows you to monitor your physical activity, weight and receive reminders about workouts.

An application for runners and cyclists. Allows you to monitor your physical activity, weight and receive reminders about workouts.

Just_Amalll 3 Feb 7, 2022