0

Understand that Interledger is an open protocol suite for sending payments across different ledgers -- supports and integrates with Bitcoin, Ethereum (IS 20022)

Does Interledger supports hyperledger and/or vice versa? i.e., any integration possibilities between Interledger and Hyperledger? i.e., hyperledger <-> interledger <-> ethereum and/or bitcoin?

Understand that Hyperledger does not have cryptocurrency but I might have digital assets within my hyperledger network that can be exchanged with ether or bitcoin.

Thus I wish to know if there are integration possibilities between Hyperledger and Interledger?

Nathan Aw
  • 545
  • 5
  • 18

3 Answers3

1

Interledger is a protocol, not a system so I would rephrase your question as:

I wish to know if there are integration possibilities between Hyperledger and other ledgers using Interledger?

The answer is yes but this depends also on the use case. What do you mean by "integration"?

Interledger defines some standards for distributed transaction execution according to a two-phase commit strategy. It is specifically well-suited to transfers of digital assets across multiple ledgers because it's resiliency is depends on the economic incentives of the intermediaries to claim the assets that have been transferred to them (and in so doing providing the key to the next intermediary to do the same).

The most important standard is the use of a SHA-256 hash in the prepare request and the pre-image of that hash as the commit trigger of the two phase asset transfer on each ledger. We call the hash a condition and the pre-image the fulfillment.

If you want to perform a transaction that transfers digital assets from a sender on one ledger to a receiver on another ledger then you will first establish a condition that can only be fulfilled by the receiver (i.e. only the receiver knows the pre-image).

This way you can involve an untrusted intermediary that will accept a transfer on the sender's ledger and make a corresponding transfer to the receiver on their ledger. Both transfers are prepared using the condition and when the receiver releases the fulfillment to their ledger the assets are transferred to them.

The intermediary will then have possession of the fulfillment (they observed the assets they transferred to the receiver being committed) and will use the same fulfillment to claim the assets transferred to them by the sender.

Any Hyperledger ledger that can be used to underwrite asset ownership and support this two-phase commit strategy can be used in an Interledger payment.

There are examples of writing smart contracts that do just this in Ethereum so I assume the same could be achieved using Fabric, Sawtooth or any other Hyperledger ledger.

I am not aware of any existing implementations of such a plugin that would allow the reference ILP connector to be run as an intermediary between a Hyperledger ledger and other ILP-compatible ledgers but I'd certainly welcome any efforts to build one and would be happy to assist.

Adrian Hope-Bailie
  • 2,445
  • 1
  • 23
  • 26
0

Interledger looks to be a service that wants you to route financial transactions through them. There is some simple sample code for compatible wallets and transactions in JavaScript. Presumably you can do this in any language.

Which leads me to point out that Hyperledger supports smart contracts and applications written in Go, Java, Python, and JavaScript (through the Hyperledger Composer) and so there is a pretty good chance that you can implement an ISO 20022 / Interledger compatible data model and protocol.

HOWEVER

You need to follow best practices and smart contracts should never directly update external services as their is no way of rolling back external service changes if the smart contract sends successful external transactions but then fails for other reasons.

So, you need to design multi-stage transactions in your smart contracts and related applications. Applications will have to coordinate with smart contracts and post on their behalf to other services, recording results in the ledger and triggering next stage updates and transactions.

This allows the blockchain ledger to reflect the reality of external states from Interledger or whatever ISO 20022 compatible service you use.

This all presumes that the other financial institution refuses direct participation with the smart contract and hyperledger blockchain, which is always going to be more efficient, reliable, and secure.

Kim
  • 592
  • 3
  • 13
  • Hi Kim, thank you! You mentioned "design multi-stage transactions in your smart contracts". How is this commonly achieved within the chaincode using Go? Some samples of multi-stage transactions will be very helpful. Second, if best practices dictates that smart contracts should not directly update external services, what can one do if there is a need to update external services? E.g., Updating other ledgers (PUT, POST) instead of just retrieving (GET) – Nathan Aw Oct 01 '17 at 17:30
  • I don't have an example, but you have to imagine an application syncing between services. If a chaincode has successfully been committed, it can send an event saying so (even with late failure during commit, emission of events is suppressed, so if you see one, it means the transaction is on the change and in world state.) So a secure application can be written that looks for this event and responds by updating the external service, because the result is now *certain*. – Kim Oct 02 '17 at 13:34
  • The confirmation coming from the other end can be added to the chaincode state in a second transaction (just updating the state of the overall multi-stage transaction). A third transaction can be made to accept a signature. And a fourth and fifth if you want to allow the other participant to sign and then an approver. For each received signature transaction, the state is checked and if all signatures are present, the state is set to APPROVED and an event emitted. – Kim Oct 02 '17 at 13:35
  • The same secure application is watching for the APPROVED event and proceeds to send the final external transaction moving the money (or whatever is left to do). The response is of course updated into the world state as the final state of the transaction. The application raises major alerts if that does not happen. So the chaincode and a secure external application are collaborating, and the chaincode is always up to date with the official status. This is critical such that the chaincode always has the complete state as a single point of truth. – Kim Oct 02 '17 at 13:37
  • right, right. understood -- chaincode should always have the complete state as a single point of truth. Not some other external systems. Thank you Kim! I have been cracking my head over smart contracts as well. https://stackoverflow.com/questions/46569843/smart-contracts-hyperledger-vs-eth – Nathan Aw Oct 04 '17 at 16:34
0

It sounds like you want something like Hyperledger Quilt, which interoperates between different blockchain technologies.

Dan Anderson
  • 2,265
  • 1
  • 9
  • 20