mcevoyinit / honeycomb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

honeycomb-png-transparent-clipart-freeuse

Honeycomb CorDapp

  1. Introduction
  2. CorDapp Design
  3. Quick Start Guide

Introduction

This CorDapp contains a series of flows and contracts useful in the world of Decentralised Exchanges - (DeX)

  • Transaction mechanism for a multi-asset and multi-instrument DeX

  • Introduce Asset Lock Pattern which addresses

    • Settlement Risk
    • Credit Risk
    • Fat Finger errors
  • Enable fully Decentralised P2P Trading with privacy by taking advatage of the token receipt pattern

Cordapp Design

This is the CorDapp design diagram mapped our using Corda Design Language.

Here we can see the 3 step process in performing an atomic exchange of an asset and on-ledger cash tokens in a way that preserves transactional privacy, downstream.

  1. LockAssetTransaction - the asset owner or seller locks the asset by consuming it and transforming it to status LOCKED while marking all the information needed for the buyer to provide valid payment and claim the asset for their own
  2. PaymentTransaction - the transfer to cash tokens from buyer to seller and the creation of a receipt state that contractually matches the value of tokens transferred whille marking to whom and from whom. This receipt is used in the subequent transaction to claim ownership of the asset
  3. UnlockAssetTransaction - now the receipt can be spent by the buyer to claim ownership of the asset. This involves changing the lock status to UNLOCKED and changing the owner identity to be the buyers.

image

Quick Start Guide

If you're continuing from the terminal, you can go ahead and build some nodes.

cd Honeycomb
./gradlew deployNodes
./build/nodes/runnodes

Contribute

Feel free to contribute! Some things that would be useful

  • Increase "pluggability" - how do we allow arbitrary assets to use these flows and not just AssetStates
  • Introduce flows for the seller to unfreeze the asset after expiry date has passed and prospective buyer has not paid
  • Building a decentralised order book to allow matching
  • Think about more complex asset locks with derivatives evolving the lock over time
  • Flow and contract testing

About


Languages

Language:Kotlin 100.0%