GithubHelp home page GithubHelp logo

hyperledger-experiments's Introduction

Court of Venice 1594 business network

Hyperledger composer experiment in "translating" the "Merchant of Venice" play

It is a business network revolving around a defaulted and then an exonerated bond between a Lender, Guarantor, and Borrower.

Participants

Lender: Shylock gives 3000 ducats without usury for 3 months with a collateral (Merry bond).

Notary: Anonymous notary in Venice confirms the contract between Antonio (guarantor) and Shylock (lender) to give a loan to Bassanio (borrower, debtor). Approval of the bond.

Guarantor: Antonio guarantees to repay the loan in 3 months or give one pound of his flesh to Shylock.

Borrower: Bassanio who needs 3000 ducats.

Judge: Doctor Balthasar who notifies the ledger if the bond/loan was repaid or defaulted (received by lender). Holds a rule that if the bond defaults, collateral has to be executed. Holds a rule forbidding a collateral with Christian blood < 0. Triggers a law confiscating the property of a person “conspiring against the life of a Venetian citizen - half of his wealth and property will go to the state and the other half to Antonio”. Executes or exonerates a defaulted bond/collateral rule. Executes a rule on acquiring all assets from Lender if blood is included in a bond.

Assets

Loan: 3000 ducats Collateral: Pound of flesh Confiscated property?

Transactions (scenarios)

Loan is initiated Notary confirms/notifies the ledger: Changes the status of the loan to ‘APPROVED’. Borrower/debtor gets 3000 ducats from the lender. Initiates a rule that in 3 months (DateTime) guarantor will repay the loan to the lender. Guarantor provides a collateral to guarantee the bond (1 pound of flesh) - new asset is created after the signature?

Loan is repaid Guarantor sends 3000 ducats to Lender in <3 months. Lender notifies the ledger and Collateral changes status to ‘ANNULLED’

Loan defaults Guarantor does not send any payment after 3 months (lender account does not get 3000 ducats after three months from “Loan Initiated”). The Judge changes the status of the collateral to “INITIATED”. Lender demands the Guarantor for a one pound of flesh. Judge sends notification that the bond on one pound of flesh does not include blood. Judge executes a rule/law on blood of Venetian citizens. Lender sends notification/request to exonerate the loan.

Loan and collaretral exonerated Judge executes a rule on acquiring all assets from Lender if blood is included in a bond. Lender loses all his property and has to convert to Christianity.

hyperledger-experiments's People

Contributors

denisakera avatar pelevesque avatar

Stargazers

Brian Degger avatar

Watchers

James Cloos avatar  avatar

hyperledger-experiments's Issues

ApproveLoan transaction

I was hoping that newRelationship code will automatically add the name (ParticipatId) when the transaction is initiated, so I tried two variations of what you can do with that and non of it is able to add the names when I click on test transaction in the playgroind :
//const loan = factory.newRelationship(NS, 'Loan', al.LoanforBessanio);//
In this I used the Id of the asset I'm interested in to appear automatically = LoanforBessanio

//const owner = factory.newRelationship(NS, 'Borrower', al.getIdentifier());//
In this I tried to get the only Borrower created in the demo transactiion = Bessanio

The transacation works when I put the names manually (and changes the status to approved), but it is not actually using this part of the code...

Should I do
const loan = factory.newRelationship(NS, 'Loan', al.LoanforBessanio);
al.loan.loanId = LoanforBessanio?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.