Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Cordage v0.2 - Quorum Meetup Online

Introduction to Cordage v0.2 - Quorum Meetup Online

Shun Takagiwa

May 14, 2020
Tweet

More Decks by Shun Takagiwa

Other Decks in Technology

Transcript

  1. Introduction to
    https://youtu.be/f1ZPXvoVyj8?t=3477

    View Slide

  2. 2
    Introduction to Cordage © 2020 The Cordage Authors
    Speaker
    Shun Takagiwa / 高際 隼
    Senior Software Architect, LayerX Inc.
    Core maintainer of Cordage
    ● Joined LayerX Inc. since it was founded in August 2018
    ● Responsible for multiple projects as a technical lead
    ○ e.g. MUFG, MITSUI & CO., LTD., Cryptorealty, etc
    ● In charge of product concept design, agile software development,
    system design, implementation, and operation
    ● The CEO Special Award 2019, The Core Values Award 2020
    @shun_tak

    View Slide

  3. 3
    Introduction to Cordage © 2020 The Cordage Authors
    Agenda
    ● Overview of blockchain interoperability
    ● What is Cordage
    ● Cross-Chain Atomic Swap with Cordage
    ● Demo
    ● Milestones

    View Slide

  4. 4
    Introduction to Cordage © 2020 The Cordage Authors
    Overview of
    blockchain interoperability

    View Slide

  5. 5
    Introduction to Cordage © 2020 The Cordage Authors
    Background
    Since Bitcoin, many blockchain products and use cases came out
    Increasing demands to connect other products
    ● e.g. Quorum vs Corda in Ubin-Jasper project
    ● e.g. Hyperledger Fabric vs Corda in Deutsche bank project
    Blockchain interoperability provides tighter and more secure coupling between platforms
    than is possible with existing systems

    View Slide

  6. 6
    Introduction to Cordage © 2020 The Cordage Authors
    Types of blockchain interoperability
    ● Connect blockchain and existing system
    ○ e.g. Import Swift data into blockchain
    ● Connect different dapps on the same blockchain
    ○ e.g. Decentralized exchange (DEX)
    ○ e.g. Decentralized finance (DeFi)
    ● Connect the same type of different blockchains
    ○ e.g. Quorum vs other Quorum
    ● Connect different types of blockchains
    ○ e.g. Quorum vs Corda
    From now, let’s discuss the latter 2 types of interoperability
    Typically discussed
    blockchain interoperability

    View Slide

  7. 7
    Introduction to Cordage © 2020 The Cordage Authors
    Example Applications for blockchain interoperability
    ● Cross-Chain Atomic Swap
    ○ e.g. Cross-Chain DvP Settlement
    ● Cross-Chain Oracle
    ○ e.g. Take prices from Uniswap on Ethereum mainnet and use them on other blockchain
    ● Pegged Asset
    ○ e.g. Wrapped BTC
    ● Asset Portability
    ○ e.g. Move an asset between blockchain shards
    ● Automatic Payment
    ○ e.g. Transfer ether or bitcoin in accordance with OpenLaw's contract enforcement terms

    View Slide

  8. 8
    Introduction to Cordage © 2020 The Cordage Authors
    3 schemes of blockchain interoperability
    Trusted intermediaries Relays HTLC
    Overview
    Trust model Majority of intermediaries honest Depends on each blockchains Depends on each blockchains
    Ease of implementation Medium Hard Easy
    Required functions ● Fetching events
    ● Propagating events
    ● Intermediaries consensus
    ● On-chain verification for
    intermediaries signatures
    ● Fetching events
    ● Propagating events
    ● Verifying events correctness
    ● Verifying events finality
    ● Fetching data
    ● Propagating data
    ● Ability to time locking
    ● Cryptographic hash function
    Applicability to use
    cases
    Any use cases
    (Some use cases require long-term
    intermediaries trust)
    Any use cases
    (Some use cases require
    bidirectional relays)
    Specialized to atomic swap
    (Asset portability and automatic
    payments are difficult)
    Ref: Chain Interoperability by Vitalik Buterin
    A B A B A B
    TI scheme depends on intermediaries honest while relays are too hard to implement
    In the consortium area, we can take advantage of blockchain operators to improve TI scheme security

    View Slide

  9. 9
    Introduction to Cordage © 2020 The Cordage Authors
    What is Cordage

    View Slide

  10. 10
    Introduction to Cordage © 2020 The Cordage Authors
    Cordage makes the interoperability possible between Corda and Ethereum based blockchain
    without additional trusted intermediaries
    What is Cordage
    Features
    ● Connect Ethereum based blockchain with Corda
    ● No need to run an additional process
    So, how is Cordage’s interoperability scheme like?

    View Slide

  11. 11
    Introduction to Cordage © 2020 The Cordage Authors
    Cordage’s interoperability scheme
    Trusted intermediaries Cordage scheme
    Overview
    Trust model Majority of intermediaries honest Depends on each blockchains
    Ease of implementation Medium Medium
    Required functions ● Fetching events
    ● Propagating events
    ● Intermediaries consensus
    ● On-chain verification for
    intermediaries signatures
    ● Fetching events
    ● Propagating events
    ● Light client of blockchain B that
    works on blockchain A’s smart
    contract
    Applicability to use
    cases
    Any use cases
    (Some use cases require
    long-term intermediaries trust)
    Any use cases
    A B A B
    Same security level as relays
    Higher than TI scheme
    Easier than Relays
    Higher availability than TI scheme
    due to no intermediaries
    Corda is able to run the Ethereum
    light client

    View Slide

  12. 12
    Introduction to Cordage © 2020 The Cordage Authors
    How Cordage’s interoperability scheme works
    Propagating events
    1. Make an ethereum transaction that includes data on Corda
    2. Sign the transaction with the Ethereum private key owned by Corda Notary
    3. Send the transaction to Ethereum node
    Corda Notary signs to guarantee correctness and finality on Corda
    Fetching events
    1. Watch logs in transaction receipts on Ethereum
    2. Parse logs by using ABI and encoder
    3. Store them to Corda
    Both actions are run from Corda Nodes or Corda Notary, not the additional intermediaries
    Access authority to the Ethereum RPC endpoint is required
    3. Send the tx
    1. Watch logs
    2-3. Parse and
    store logs
    1-2. Make and sign the tx

    View Slide

  13. 13
    Introduction to Cordage © 2020 The Cordage Authors
    Cross-Chain Atomic Swap
    with Cordage
    Disclaimer
    This is a minimal viable product to confirm swapping assets in atomic among blockchains.
    You may need additional features in production such as the privacy feature.

    View Slide

  14. 14
    Introduction to Cordage © 2020 The Cordage Authors
    Cross-Chain Atomic Swap with Cordage
    Scenario
    ● Ether and corporate bond are minted in advance
    ● Alice wants to buy 100 amount of corporate bond that is
    owned by Bob
    ○ Alice remits by ether to Bob (The unit price is
    specified with the initial corporate bond registration)
    ○ Bob transfers 100 amount of corporate bond to Alice
    ○ These are expected to happen in atomic
    Steps to cross-chain atomic swap
    1. By running ProposeAtomicSwapFlow, Alice creates a
    ProposalState and asks Bob to sign
    2. LockEtherFlow is started automatically by
    ProposeAtomicSwapFlow after its finality
    3. By running StartEventWatchFlow once, Bob watches
    Ethereum logs with running EventWatchFlow every 5
    seconds
    4. SettleAtomicSwapFlow is started automatically by
    EventWatchFlow if it finds a targeted log (LockEtherEvent)
    5. In the SettleAtomicSwapFlow, Bob transfers corporate
    bond to Alice, and at the same time Corda Notary unlocks
    and sends the ether to Bob
    https://github.com/LayerXcom/cordage/tree/
    master/cross-chain-atomic-swap-cordapp

    View Slide

  15. 15
    Introduction to Cordage © 2020 The Cordage Authors
    Demo

    View Slide

  16. 16
    Introduction to Cordage © 2020 The Cordage Authors
    Milestones

    View Slide

  17. 17
    Introduction to Cordage © 2020 The Cordage Authors
    Milestones
    ● Version 0.3
    ○ Implement exception scenario for cross-chain atomic swap (Currently under testing)
    ● Improvements
    ○ Enhance documentation
    ○ Implement additional sample applications
    ● Version 1.0
    ○ Transform modules to work as maven (gradle) libraries
    ● New features
    ○ Support Hyperledger Fabric

    View Slide

  18. 18
    Introduction to Cordage © 2020 The Cordage Authors
    GitHub https://github.com/LayerXcom/cordage
    Gitter chat https://gitter.im/LayerXcom/Cordage

    View Slide