SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
Christopher Goes, Cosmos
IBC & public-private
blockchain interoperation
About this talk
● Explain IBC design goals
● Demystify implementation
○ IBC is a protocol!
○ How to do it yourself (rapid version)
● Walk through example
○ Using IBC to connect Ethereum & Zcash
○ Shielded ERC20 transactions: privately send your existing ERC20 tokens
What - “Inter-blockchain communication”
● Mechanism for relaying data packets between chain A & chain B
● Off-chain relayers responsible for watching chain A & committing
transactions to chain B
○ Relayers are not permissioned, anyone can relay
● Opaque payload: IBC protocol defines causal ordering semantics,
any application logic can be implemented on top
What - Authenticated message passing
● Rules on chain B which define a subset of accepted packets
○ If packet has been received on B, know something about state of A
● Chain B verifies proof that packet has been sent on chain A
● Various methods of doing so, with different security properties
○ Chain B acts as a Bitcoin-style light client of chain A (Merkle proofs)
○ Intermediary “peg zone” with finality and accountable validator set
● Must trust - consensus algorithms and light client verification
What - Use cases
● Basics
○ Transfer tokens (fungible/non-fungible) across chains
○ Conditionalize contract execution or output locking on state of another chain
● Sharding-esque
○ Split & parallelize contract logic across multiple chains with compatible VMs
■ IBC exposes a channel-like primitive
○ Compose hybrid EVM-Cosmos-Zcash state machines
○ Delegated security - validators for one chain slashable over IBC on another
● Key point - heterogenous chains
○ Various combinations of IBC primitives can be implemented on each chain
○ Sovereign chains can have custom features (zkSNARKs!)
How - Security model
● Goal - allow preservation of “contract invariants” across chains
○ Burn asset T on chain A, redeem “T vouchers” on chain B
○ Burn T vouchers on chain B, redeem T on chain A
○ (which is really the voucher? No canonical chain!)
● State machine of B must verify that state machine of A burned T
○ Can encapsulate some of this verification in the known components of Alpha/Beta
state machines prior to creating IBC connection
■ Or prove it directly if code is stored in state and VMs are compatible
○ After A burns T, writes some data to a provable store
■ Then B can just verify light client proof of written data
■ Data couldn’t have been written if T hadn’t been burned
How - Connection lifecycle
● Connection - data necessary to verify packets between two chains
● Opening a connection
○ Root-of-trust - genesis block, initial validator set added “at connection creation”
■ When smart contract is deployed
■ When governance implements upgrade
○ Any connection user can check the root-of-trust
● Updating trusted headers
○ Verify update from H1
to H2
■ Tendermint - Track validator set, check signed by previous validator set
■ Nakamoto consensus - continues previous chain, most work seen
○ Headers allow packet proof verification
● Closing a connection
○ In exceptional cases - fork, safety violation
○ Can be done by permissioned entity (governance) or some on-chain proof-of-fraud
How - Strictly ordered message passing
● IBC implements a vector clock for two processes (blockchains)
○ A, B chains of interest
○ i packet counter
○ x, y events (other transactions)
○ -> before, => implies
○ Asend:i
-> Breceive:i
○ Breceive:i
-> Areceipt:i
○ Asend:i
-> Asend:i+1
○ x -> Asend:i
=> x -> Breceive:i
○ y -> Breceive:i
=> y -> Areceipt:i
● Consensus provides single canonical ordering on a chain
● IBC provides single canonical ordering across chains
● Easily generalized to an n-process vector clock for multi-chain ordering
○ a on chain A before b on chain B before c on chain C
How - Ordering guarantees
● Ordering guarantee can be used to reason about the combined
state of both chains as a whole
○ Example: fungible token total supply
■ If packet i is sent on A, burn tokens
■ If packet i is received on B, mint vouchers
● Tokens must have previously been burned on A
● Total supply conserved
■ Counters prevent replay on the same chain
■ Metadata prevents replay on other chains
How - Channels
● Channel: abstraction providing ordering guarantee
○ Set of four queues, two per chain
■ On chain A
● Outgoing A-B
● Incoming B-A receipts
■ On chain B
● Outgoing B-A
● Incoming A-B receipts
○ Each queue keeps a counter
○ Packets can only be sent & received in order
■ If counters mismatch, reject
How - Packets
● Packet - Individual datagram with opaque payload & metadata
○ Five-tuple - (type, sequence, source, destination, data)
■ Type - multiplexing (one connection, many applications)
■ Sequence - ordering guarantee (prevent replay)
■ Source - source chain (prevent replay masquerading from another chain)
■ Destination - destination chain (prevent replay on another chain)
■ Data - opaque application-specific payload
○ Packets are committed once, in order, from only one chain to only one chain
How - Receipt, acknowledgement, timeout
● IBC receipt - IBC packet back to the source chain
○ Proves original packet was received & acted upon
■ Relevant application-specific action was taken
○ Data for proof can then be deleted from Merkle tree
● IBC timeout on source chain
○ Each packet additionally contains timeout t relative to destination chain state
○ Destination chain rejects packets past t
○ t can be height or timestamp, must be proved back to A for asset release
■ Via same proof as IBC packets (Merkle path)
■ Provides safety if packet isn’t committed on destination chain
■ Assets can be un-escrowed, released to original sender
Why - One asset, many chains
● Assets can be freely transferred
○ Send your BTC from Bitcoin, to Ethereum, to Cosmos, to Zcash, then back
○ Always the “same” BTC - can be redeemed back through that path to vanilla BTC
● Multi-hop routing reduces implementation cost
○ Assets can be sent along any path of individually-connected chains
● Permissionless
○ Set up another chain, implement IBC with an existing asset, add new features
Why - New features, old security
● When you need privacy, send your BTC to Zcash
○ Usually keep it on the Bitcoin chain for security
○ (but be careful about linkability!)
● No trusted setup risk
○ IBC contract on Bitcoin (or peg) can track total supply in/out
○ If trusted setup was compromised:
■ BTC on Zcash chain is at risk
■ BTC on Bitcoin chain is at no risk - IBC contract will cap inflation
○ Risk is always opt-in!
● Generalizable: supply for fungible tokens, uniqueness for NFTs, etc.
Why - Opt-in upgrades
● Add new features to a chain, no governance required
○ Copy the chain, add the features, create an IBC connection back to the old chain
○ Anyone can elect to move their existing assets to the new chain
■ Could allow moving back to the old chain - or not
○ Security?
■ Naive (simple) PoS - less secure initially, more secure as staking token moves
■ Delegated security - New chain validators slashable on old chain over IBC
● No need for a new asset
● Both chains can peacefully coexist
Aside - Consensus requirements
● State finality
○ IBC safety requires finality, otherwise coins could be double-spent
○ Consensus landscape
■ Tendermint/PBFT - Instant finality
■ Casper FFG - Fast finality
■ Nakamoto consensus (PoW, Tezos/Ouroboros Praos PoS)
● Probabilistic finality, must pick a threshold
● Could vary threshold based on transfer amount (~risk)
● Proof verification
○ With smart contracts or custom state machine - natively
○ Without smart contracts - separate “peg chain” to bridge
Aside - Bridged “Peg-zone”
● Accountable federated peg
○ Cosmos Bonded PoS (and similar) have configurable slashing conditions
○ Assets controlled by weighted (or k-of-m) multi-signature on pegged chain
■ e.g. Bitcoin, Zcash, Monero
■ Future alternative - multiparty ECDSA
○ Second Tendermint chain with validator set of multi-signature
■ Transactions committed to the bridge chain must be signed by multi-sig,
then can be relayed to main chain
■ Any transactions signed but not committed to bridge chain are slashable!
● Also slashable - failure to update multi-sig if validator set is changed
■ Received transactions on main chain can be relayed back to bridge chain for
ease-of-verification
■ Configurable finality threshold (n confirmations)
○ Main (pegged) chain needs no additional features
Example - Ethereum ERC20 ⇔ Zcash UIT
● Zcash UITs (User-issued tokens)
○ https://github.com/zcash/zcash/issues/830
○ Bitcoin-style “colored coins” on Zcash
○ Not in Sapling but maybe soon? (see discussion on the issue)
○ Alternatives: Zcash-fork per ERC20 token, or ZEC-as-ERC20
● Associate each ERC20 token contract with a unique UIT identifier
○ “ibc/ethereum/{contract address}”
○ Identifiers can be created lazily on demand (and also for new tokens)
● ERC20 token vouchers can be shielded on the Zcash chain
● Can remain so indefinitely and be shielded-transferred as usual
● Once unshielded, can be transferred back to the original ERC20
ERC20 ⇔ UIT - Components
● Dedicated smart contract on Ethereum
○ Holds ERC20 tokens in escrow
○ Provide proof that x of token y has been escrowed
○ Verify proof that UIT has been burned and release escrowed ERC20 tokens
○ (channel ordering semantics are optional since transfers are commutative)
● Zcash multisignature (or multiparty ECDSA) peg chain
○ Multisignature (unshielded) account on Zcash chain
○ Signer set of multisignature account runs Tendermint consensus on peg chain
○ Peg chain
■ Verifies proofs of ERC20 token escrow on Ethereum
■ Provides proofs of UITs burned to Ethereum smart contract
■ Slashes multisignature members if they commit a fault
ERC20 ⇔ UIT - Step I (Ethereum)
● User has some ERC20 token T, on the Ethereum chain
● User calls ERC20 transfer to send token to IBC smart contract
■ IBC contract escrows ERC20 token
■ IBC contract logs the escrow event in the Patricia trie
● Includes: sender, token, amount, desired destination address
ERC20 ⇔ UIT - Step II (Zcash peg chain)
● IBC packet sent from Ethereum to Zcash peg chain
○ IBC relayer (user or third-party) constructs IBC packet
■ Packet references escrow event on Ethereum chain
○ IBC relayer commits packet in a transaction to Zcash peg chain
■ Zcash peg chain state machine verifies proof of event
ERC20 ⇔ UIT - Step III (Zcash)
● Zcash peg chain validators sign UIT-mint transaction
○ UIT-mint transaction mints the associated UIT denomination in the amount proved
by the Ethereum event on the peg chain, to the user-specified destination address
○ Peg chain validators or user commit mint transaction to Zcash chain
● User can then transact as normal with a Zcash UIT
○ Shield to a z-address, spend privately, unshield/shield again as desired
○ Privacy equivalent: ERC20-side is “unshielded pool”
■ Be careful about pattern-matching linkability!
● UIT can be sent back to Ethereum in reverse
○ Provably burn the UIT on Zcash, submit proof to Zcash peg chain
○ IBC relayer submits packet to Ethereum smart contract which unescrows the
tokens
ERC20 ⇔ UIT - Properties
● Permissionless & opt-in
○ Anyone can implement for any token
○ Which chain to keep on, when to move up to the asset holder
○ No risk for existing ERC20 token holders of inflation
■ IBC contract can track total supply in/out
● Full Zcash-level privacy when shielded
○ Same level of linkability as transparent addresses / unshielded pool
● Scalable implementation
○ Same logic (and one peg chain) can handle all ERC20 contracts & associated UITs
Future Research - higher-assurance proofs
● IBC security dependent on correct light client proofs
● Various degrees of light-client assurance
○ Bitcoin - relatively low
■ No state transition verification
■ Long forks do seem to be unlikely in practice...
○ Cosmos/Tendermint - medium
■ No state transition verification
■ But - lying to light client always a slashable offense
● IBC packet data is public, so it would definitely be caught!
■ Security dependent on value-at-stake (hence the Cosmos hub-spoke model)
○ Coda Protocol / recursive SNARKs - high
■ Can verify full state transition history!
■ Still need to disincentivize forks
Future Research - Byzantine recovery
● What if consensus breaks?
○ No valid chain, n valid chains (valid for IBC = can provide light client proofs)
○ Wide space of possibilities
■ n valid chains: can spot duplicate headers when published
■ 0 valid chains: no progress without intervention (but timeouts protect assets)
● What if one chain’s state machine has a bug?
○ No protection right now - if you hold assets on the chain, you accept the risk
○ Could implement fraud proofs
■ Complex requirements on state machines (on both chains)
○ Where applicable, governance on one chain could “fix” - credit the original tokens
at parity with balances on the other chain before the bug was exploited
■ Not an ideal solution, irregular state change
● Ideal case - asset security (invariant set) as long as 1-of-n chains are correct & live
Questions?
● Cosmos will implement IBC for our stack, but the protocol is open!
○ Alternative implementations, contributions, ideas welcome
● Spec - github.com/cosmos/cosmos-sdk/tree/develop/docs/spec/ibc
● Email - cwgoes@tendermint.com
● Check-out the break-out!
○ Rob Habermeier leading on zero-knowledge state transitions in
blockchains, 15:40 in Breakout 2

Más contenido relacionado

La actualidad más candente

Kubernetes from scratch at veepee sysadmins days 2019
Kubernetes from scratch at veepee   sysadmins days 2019Kubernetes from scratch at veepee   sysadmins days 2019
Kubernetes from scratch at veepee sysadmins days 2019🔧 Loïc BLOT
 
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet Mens
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet MensOSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet Mens
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet MensNETWAYS
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesAdam Hamsik
 
How VXLAN works on Linux
How VXLAN works on LinuxHow VXLAN works on Linux
How VXLAN works on LinuxEtsuji Nakai
 
2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration
2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration
2014 OpenStack Summit - Neutron OVS to LinuxBridge MigrationJames Denton
 
Docker Multihost Networking
Docker Multihost Networking Docker Multihost Networking
Docker Multihost Networking Nicola Kabar
 
Deep dive into highly available open stack architecture openstack summit va...
Deep dive into highly available open stack architecture   openstack summit va...Deep dive into highly available open stack architecture   openstack summit va...
Deep dive into highly available open stack architecture openstack summit va...Arthur Berezin
 
OSDC 2015: Jan-Piet Mens | MQTT for your data center (and for the IoT)
OSDC 2015: Jan-Piet Mens | MQTT for your data center (and for the IoT)OSDC 2015: Jan-Piet Mens | MQTT for your data center (and for the IoT)
OSDC 2015: Jan-Piet Mens | MQTT for your data center (and for the IoT)NETWAYS
 
Devconf.cz 2016 Linux as a guest on Hyper-V
Devconf.cz 2016 Linux as a guest on Hyper-VDevconf.cz 2016 Linux as a guest on Hyper-V
Devconf.cz 2016 Linux as a guest on Hyper-VVitaly Kuznetsov
 
Networking in Docker Containers
Networking in Docker ContainersNetworking in Docker Containers
Networking in Docker ContainersAttila Kanto
 
OSMC 2015: MQTT it´s also for monitoring by Jan-Piet Mens
OSMC 2015: MQTT it´s also for monitoring by Jan-Piet MensOSMC 2015: MQTT it´s also for monitoring by Jan-Piet Mens
OSMC 2015: MQTT it´s also for monitoring by Jan-Piet MensNETWAYS
 
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream Kernel
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream KernelLF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream Kernel
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream KernelLF_OpenvSwitch
 
LF_OVS_17_State of the OVN
LF_OVS_17_State of the OVNLF_OVS_17_State of the OVN
LF_OVS_17_State of the OVNLF_OpenvSwitch
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetesJuraj Hantak
 
LF_OVS_17_LXC Linux Containers over Open vSwitch
LF_OVS_17_LXC Linux Containers over Open vSwitchLF_OVS_17_LXC Linux Containers over Open vSwitch
LF_OVS_17_LXC Linux Containers over Open vSwitchLF_OpenvSwitch
 
Docker networking Tutorial 101
Docker networking Tutorial 101Docker networking Tutorial 101
Docker networking Tutorial 101LorisPack Project
 

La actualidad más candente (20)

Kubernetes from scratch at veepee sysadmins days 2019
Kubernetes from scratch at veepee   sysadmins days 2019Kubernetes from scratch at veepee   sysadmins days 2019
Kubernetes from scratch at veepee sysadmins days 2019
 
VXLAN with Cumulus
VXLAN with CumulusVXLAN with Cumulus
VXLAN with Cumulus
 
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet Mens
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet MensOSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet Mens
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet Mens
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetes
 
How VXLAN works on Linux
How VXLAN works on LinuxHow VXLAN works on Linux
How VXLAN works on Linux
 
Docker networking
Docker networkingDocker networking
Docker networking
 
2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration
2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration
2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration
 
Docker Multihost Networking
Docker Multihost Networking Docker Multihost Networking
Docker Multihost Networking
 
Deep dive into highly available open stack architecture openstack summit va...
Deep dive into highly available open stack architecture   openstack summit va...Deep dive into highly available open stack architecture   openstack summit va...
Deep dive into highly available open stack architecture openstack summit va...
 
Ethereum bxl
Ethereum bxlEthereum bxl
Ethereum bxl
 
OSDC 2015: Jan-Piet Mens | MQTT for your data center (and for the IoT)
OSDC 2015: Jan-Piet Mens | MQTT for your data center (and for the IoT)OSDC 2015: Jan-Piet Mens | MQTT for your data center (and for the IoT)
OSDC 2015: Jan-Piet Mens | MQTT for your data center (and for the IoT)
 
Devconf.cz 2016 Linux as a guest on Hyper-V
Devconf.cz 2016 Linux as a guest on Hyper-VDevconf.cz 2016 Linux as a guest on Hyper-V
Devconf.cz 2016 Linux as a guest on Hyper-V
 
Networking in Docker Containers
Networking in Docker ContainersNetworking in Docker Containers
Networking in Docker Containers
 
OSMC 2015: MQTT it´s also for monitoring by Jan-Piet Mens
OSMC 2015: MQTT it´s also for monitoring by Jan-Piet MensOSMC 2015: MQTT it´s also for monitoring by Jan-Piet Mens
OSMC 2015: MQTT it´s also for monitoring by Jan-Piet Mens
 
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream Kernel
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream KernelLF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream Kernel
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream Kernel
 
LF_OVS_17_State of the OVN
LF_OVS_17_State of the OVNLF_OVS_17_State of the OVN
LF_OVS_17_State of the OVN
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
 
LF_OVS_17_LXC Linux Containers over Open vSwitch
LF_OVS_17_LXC Linux Containers over Open vSwitchLF_OVS_17_LXC Linux Containers over Open vSwitch
LF_OVS_17_LXC Linux Containers over Open vSwitch
 
Docker networking Tutorial 101
Docker networking Tutorial 101Docker networking Tutorial 101
Docker networking Tutorial 101
 
ØMQ - An Introduction
ØMQ - An IntroductionØMQ - An Introduction
ØMQ - An Introduction
 

Similar a Interblockchain Communication for Blockchain Interoperability

Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodGalin Dinkov
 
Fredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesFredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesAlex Akselrod
 
Node.js Blockchain Implementation
Node.js Blockchain ImplementationNode.js Blockchain Implementation
Node.js Blockchain ImplementationGlobalLogic Ukraine
 
Connecting The Block Cointelligence Academy by Dr Vince Ming
Connecting The Block   Cointelligence Academy by Dr Vince MingConnecting The Block   Cointelligence Academy by Dr Vince Ming
Connecting The Block Cointelligence Academy by Dr Vince MingCointelligence
 
blockchain-and-trusted-computing
blockchain-and-trusted-computingblockchain-and-trusted-computing
blockchain-and-trusted-computingYongraeJo
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroTal Shmueli
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to BlockchainAkshay Kumar
 
Peer_to_Peer_Affine_Commitment
Peer_to_Peer_Affine_CommitmentPeer_to_Peer_Affine_Commitment
Peer_to_Peer_Affine_CommitmentKruti Sharma
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, TechnicallyAlex Chepurnoy
 
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saulDestry Saul
 
Blockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challengesBlockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challengesSébastien Tandel
 
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain TransactionsHorizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain TransactionsGanesha Upadhyaya
 
Blockchain, cryptography, and consensus
Blockchain, cryptography, and consensusBlockchain, cryptography, and consensus
Blockchain, cryptography, and consensusITU
 
Iota - Structure and Validation Method
Iota - Structure and Validation MethodIota - Structure and Validation Method
Iota - Structure and Validation MethodJY Chun
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmersWojciech Langiewicz
 

Similar a Interblockchain Communication for Blockchain Interoperability (20)

Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the Hood
 
Fredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesFredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slides
 
Node.js Blockchain Implementation
Node.js Blockchain ImplementationNode.js Blockchain Implementation
Node.js Blockchain Implementation
 
Basics of Block Chain
Basics of Block ChainBasics of Block Chain
Basics of Block Chain
 
Connecting The Block Cointelligence Academy by Dr Vince Ming
Connecting The Block   Cointelligence Academy by Dr Vince MingConnecting The Block   Cointelligence Academy by Dr Vince Ming
Connecting The Block Cointelligence Academy by Dr Vince Ming
 
Ethereum overview
Ethereum overviewEthereum overview
Ethereum overview
 
blockchain-and-trusted-computing
blockchain-and-trusted-computingblockchain-and-trusted-computing
blockchain-and-trusted-computing
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies Intro
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Lightning Network
Lightning  NetworkLightning  Network
Lightning Network
 
Peer_to_Peer_Affine_Commitment
Peer_to_Peer_Affine_CommitmentPeer_to_Peer_Affine_Commitment
Peer_to_Peer_Affine_Commitment
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, Technically
 
Sidechains introduction
Sidechains introductionSidechains introduction
Sidechains introduction
 
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saul
 
Blockchain and bitcoin
Blockchain and bitcoinBlockchain and bitcoin
Blockchain and bitcoin
 
Blockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challengesBlockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challenges
 
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain TransactionsHorizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
 
Blockchain, cryptography, and consensus
Blockchain, cryptography, and consensusBlockchain, cryptography, and consensus
Blockchain, cryptography, and consensus
 
Iota - Structure and Validation Method
Iota - Structure and Validation MethodIota - Structure and Validation Method
Iota - Structure and Validation Method
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmers
 

Más de Tendermint Inc

Vision of Rearchitecting the Blockchain Ecosystem by Chjango Unchained
Vision of Rearchitecting the Blockchain Ecosystem by Chjango UnchainedVision of Rearchitecting the Blockchain Ecosystem by Chjango Unchained
Vision of Rearchitecting the Blockchain Ecosystem by Chjango UnchainedTendermint Inc
 
Many Chains, Many Tokens, One Ecosystem
Many Chains, Many Tokens, One EcosystemMany Chains, Many Tokens, One Ecosystem
Many Chains, Many Tokens, One EcosystemTendermint Inc
 
Open Finance & the Decentralization Movement
Open Finance & the Decentralization MovementOpen Finance & the Decentralization Movement
Open Finance & the Decentralization MovementTendermint Inc
 
Introduction to Blockchain & Building the 3rd Generation with Golang
Introduction to Blockchain & Building the 3rd Generation with GolangIntroduction to Blockchain & Building the 3rd Generation with Golang
Introduction to Blockchain & Building the 3rd Generation with GolangTendermint Inc
 
A Brief History of Distributed State
A Brief History of Distributed StateA Brief History of Distributed State
A Brief History of Distributed StateTendermint Inc
 
Code Run of the Cosmos SDK
Code Run of the Cosmos SDKCode Run of the Cosmos SDK
Code Run of the Cosmos SDKTendermint Inc
 
Intro to the Cosmos Network
Intro to the Cosmos NetworkIntro to the Cosmos Network
Intro to the Cosmos NetworkTendermint Inc
 
Four Dimensional Blockchain Scaling
Four Dimensional Blockchain ScalingFour Dimensional Blockchain Scaling
Four Dimensional Blockchain ScalingTendermint Inc
 
Cosmos Proof-of-Stake: An Introduction
Cosmos Proof-of-Stake: An IntroductionCosmos Proof-of-Stake: An Introduction
Cosmos Proof-of-Stake: An IntroductionTendermint Inc
 
Ethermint 2.0: An Ethereum Scaling Solution by Cosmos
Ethermint 2.0: An Ethereum Scaling Solution by CosmosEthermint 2.0: An Ethereum Scaling Solution by Cosmos
Ethermint 2.0: An Ethereum Scaling Solution by CosmosTendermint Inc
 

Más de Tendermint Inc (10)

Vision of Rearchitecting the Blockchain Ecosystem by Chjango Unchained
Vision of Rearchitecting the Blockchain Ecosystem by Chjango UnchainedVision of Rearchitecting the Blockchain Ecosystem by Chjango Unchained
Vision of Rearchitecting the Blockchain Ecosystem by Chjango Unchained
 
Many Chains, Many Tokens, One Ecosystem
Many Chains, Many Tokens, One EcosystemMany Chains, Many Tokens, One Ecosystem
Many Chains, Many Tokens, One Ecosystem
 
Open Finance & the Decentralization Movement
Open Finance & the Decentralization MovementOpen Finance & the Decentralization Movement
Open Finance & the Decentralization Movement
 
Introduction to Blockchain & Building the 3rd Generation with Golang
Introduction to Blockchain & Building the 3rd Generation with GolangIntroduction to Blockchain & Building the 3rd Generation with Golang
Introduction to Blockchain & Building the 3rd Generation with Golang
 
A Brief History of Distributed State
A Brief History of Distributed StateA Brief History of Distributed State
A Brief History of Distributed State
 
Code Run of the Cosmos SDK
Code Run of the Cosmos SDKCode Run of the Cosmos SDK
Code Run of the Cosmos SDK
 
Intro to the Cosmos Network
Intro to the Cosmos NetworkIntro to the Cosmos Network
Intro to the Cosmos Network
 
Four Dimensional Blockchain Scaling
Four Dimensional Blockchain ScalingFour Dimensional Blockchain Scaling
Four Dimensional Blockchain Scaling
 
Cosmos Proof-of-Stake: An Introduction
Cosmos Proof-of-Stake: An IntroductionCosmos Proof-of-Stake: An Introduction
Cosmos Proof-of-Stake: An Introduction
 
Ethermint 2.0: An Ethereum Scaling Solution by Cosmos
Ethermint 2.0: An Ethereum Scaling Solution by CosmosEthermint 2.0: An Ethereum Scaling Solution by Cosmos
Ethermint 2.0: An Ethereum Scaling Solution by Cosmos
 

Último

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 

Último (20)

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 

Interblockchain Communication for Blockchain Interoperability

  • 1. Christopher Goes, Cosmos IBC & public-private blockchain interoperation
  • 2. About this talk ● Explain IBC design goals ● Demystify implementation ○ IBC is a protocol! ○ How to do it yourself (rapid version) ● Walk through example ○ Using IBC to connect Ethereum & Zcash ○ Shielded ERC20 transactions: privately send your existing ERC20 tokens
  • 3. What - “Inter-blockchain communication” ● Mechanism for relaying data packets between chain A & chain B ● Off-chain relayers responsible for watching chain A & committing transactions to chain B ○ Relayers are not permissioned, anyone can relay ● Opaque payload: IBC protocol defines causal ordering semantics, any application logic can be implemented on top
  • 4. What - Authenticated message passing ● Rules on chain B which define a subset of accepted packets ○ If packet has been received on B, know something about state of A ● Chain B verifies proof that packet has been sent on chain A ● Various methods of doing so, with different security properties ○ Chain B acts as a Bitcoin-style light client of chain A (Merkle proofs) ○ Intermediary “peg zone” with finality and accountable validator set ● Must trust - consensus algorithms and light client verification
  • 5. What - Use cases ● Basics ○ Transfer tokens (fungible/non-fungible) across chains ○ Conditionalize contract execution or output locking on state of another chain ● Sharding-esque ○ Split & parallelize contract logic across multiple chains with compatible VMs ■ IBC exposes a channel-like primitive ○ Compose hybrid EVM-Cosmos-Zcash state machines ○ Delegated security - validators for one chain slashable over IBC on another ● Key point - heterogenous chains ○ Various combinations of IBC primitives can be implemented on each chain ○ Sovereign chains can have custom features (zkSNARKs!)
  • 6. How - Security model ● Goal - allow preservation of “contract invariants” across chains ○ Burn asset T on chain A, redeem “T vouchers” on chain B ○ Burn T vouchers on chain B, redeem T on chain A ○ (which is really the voucher? No canonical chain!) ● State machine of B must verify that state machine of A burned T ○ Can encapsulate some of this verification in the known components of Alpha/Beta state machines prior to creating IBC connection ■ Or prove it directly if code is stored in state and VMs are compatible ○ After A burns T, writes some data to a provable store ■ Then B can just verify light client proof of written data ■ Data couldn’t have been written if T hadn’t been burned
  • 7. How - Connection lifecycle ● Connection - data necessary to verify packets between two chains ● Opening a connection ○ Root-of-trust - genesis block, initial validator set added “at connection creation” ■ When smart contract is deployed ■ When governance implements upgrade ○ Any connection user can check the root-of-trust ● Updating trusted headers ○ Verify update from H1 to H2 ■ Tendermint - Track validator set, check signed by previous validator set ■ Nakamoto consensus - continues previous chain, most work seen ○ Headers allow packet proof verification ● Closing a connection ○ In exceptional cases - fork, safety violation ○ Can be done by permissioned entity (governance) or some on-chain proof-of-fraud
  • 8. How - Strictly ordered message passing ● IBC implements a vector clock for two processes (blockchains) ○ A, B chains of interest ○ i packet counter ○ x, y events (other transactions) ○ -> before, => implies ○ Asend:i -> Breceive:i ○ Breceive:i -> Areceipt:i ○ Asend:i -> Asend:i+1 ○ x -> Asend:i => x -> Breceive:i ○ y -> Breceive:i => y -> Areceipt:i ● Consensus provides single canonical ordering on a chain ● IBC provides single canonical ordering across chains ● Easily generalized to an n-process vector clock for multi-chain ordering ○ a on chain A before b on chain B before c on chain C
  • 9. How - Ordering guarantees ● Ordering guarantee can be used to reason about the combined state of both chains as a whole ○ Example: fungible token total supply ■ If packet i is sent on A, burn tokens ■ If packet i is received on B, mint vouchers ● Tokens must have previously been burned on A ● Total supply conserved ■ Counters prevent replay on the same chain ■ Metadata prevents replay on other chains
  • 10. How - Channels ● Channel: abstraction providing ordering guarantee ○ Set of four queues, two per chain ■ On chain A ● Outgoing A-B ● Incoming B-A receipts ■ On chain B ● Outgoing B-A ● Incoming A-B receipts ○ Each queue keeps a counter ○ Packets can only be sent & received in order ■ If counters mismatch, reject
  • 11. How - Packets ● Packet - Individual datagram with opaque payload & metadata ○ Five-tuple - (type, sequence, source, destination, data) ■ Type - multiplexing (one connection, many applications) ■ Sequence - ordering guarantee (prevent replay) ■ Source - source chain (prevent replay masquerading from another chain) ■ Destination - destination chain (prevent replay on another chain) ■ Data - opaque application-specific payload ○ Packets are committed once, in order, from only one chain to only one chain
  • 12. How - Receipt, acknowledgement, timeout ● IBC receipt - IBC packet back to the source chain ○ Proves original packet was received & acted upon ■ Relevant application-specific action was taken ○ Data for proof can then be deleted from Merkle tree ● IBC timeout on source chain ○ Each packet additionally contains timeout t relative to destination chain state ○ Destination chain rejects packets past t ○ t can be height or timestamp, must be proved back to A for asset release ■ Via same proof as IBC packets (Merkle path) ■ Provides safety if packet isn’t committed on destination chain ■ Assets can be un-escrowed, released to original sender
  • 13. Why - One asset, many chains ● Assets can be freely transferred ○ Send your BTC from Bitcoin, to Ethereum, to Cosmos, to Zcash, then back ○ Always the “same” BTC - can be redeemed back through that path to vanilla BTC ● Multi-hop routing reduces implementation cost ○ Assets can be sent along any path of individually-connected chains ● Permissionless ○ Set up another chain, implement IBC with an existing asset, add new features
  • 14. Why - New features, old security ● When you need privacy, send your BTC to Zcash ○ Usually keep it on the Bitcoin chain for security ○ (but be careful about linkability!) ● No trusted setup risk ○ IBC contract on Bitcoin (or peg) can track total supply in/out ○ If trusted setup was compromised: ■ BTC on Zcash chain is at risk ■ BTC on Bitcoin chain is at no risk - IBC contract will cap inflation ○ Risk is always opt-in! ● Generalizable: supply for fungible tokens, uniqueness for NFTs, etc.
  • 15. Why - Opt-in upgrades ● Add new features to a chain, no governance required ○ Copy the chain, add the features, create an IBC connection back to the old chain ○ Anyone can elect to move their existing assets to the new chain ■ Could allow moving back to the old chain - or not ○ Security? ■ Naive (simple) PoS - less secure initially, more secure as staking token moves ■ Delegated security - New chain validators slashable on old chain over IBC ● No need for a new asset ● Both chains can peacefully coexist
  • 16. Aside - Consensus requirements ● State finality ○ IBC safety requires finality, otherwise coins could be double-spent ○ Consensus landscape ■ Tendermint/PBFT - Instant finality ■ Casper FFG - Fast finality ■ Nakamoto consensus (PoW, Tezos/Ouroboros Praos PoS) ● Probabilistic finality, must pick a threshold ● Could vary threshold based on transfer amount (~risk) ● Proof verification ○ With smart contracts or custom state machine - natively ○ Without smart contracts - separate “peg chain” to bridge
  • 17. Aside - Bridged “Peg-zone” ● Accountable federated peg ○ Cosmos Bonded PoS (and similar) have configurable slashing conditions ○ Assets controlled by weighted (or k-of-m) multi-signature on pegged chain ■ e.g. Bitcoin, Zcash, Monero ■ Future alternative - multiparty ECDSA ○ Second Tendermint chain with validator set of multi-signature ■ Transactions committed to the bridge chain must be signed by multi-sig, then can be relayed to main chain ■ Any transactions signed but not committed to bridge chain are slashable! ● Also slashable - failure to update multi-sig if validator set is changed ■ Received transactions on main chain can be relayed back to bridge chain for ease-of-verification ■ Configurable finality threshold (n confirmations) ○ Main (pegged) chain needs no additional features
  • 18. Example - Ethereum ERC20 ⇔ Zcash UIT ● Zcash UITs (User-issued tokens) ○ https://github.com/zcash/zcash/issues/830 ○ Bitcoin-style “colored coins” on Zcash ○ Not in Sapling but maybe soon? (see discussion on the issue) ○ Alternatives: Zcash-fork per ERC20 token, or ZEC-as-ERC20 ● Associate each ERC20 token contract with a unique UIT identifier ○ “ibc/ethereum/{contract address}” ○ Identifiers can be created lazily on demand (and also for new tokens) ● ERC20 token vouchers can be shielded on the Zcash chain ● Can remain so indefinitely and be shielded-transferred as usual ● Once unshielded, can be transferred back to the original ERC20
  • 19. ERC20 ⇔ UIT - Components ● Dedicated smart contract on Ethereum ○ Holds ERC20 tokens in escrow ○ Provide proof that x of token y has been escrowed ○ Verify proof that UIT has been burned and release escrowed ERC20 tokens ○ (channel ordering semantics are optional since transfers are commutative) ● Zcash multisignature (or multiparty ECDSA) peg chain ○ Multisignature (unshielded) account on Zcash chain ○ Signer set of multisignature account runs Tendermint consensus on peg chain ○ Peg chain ■ Verifies proofs of ERC20 token escrow on Ethereum ■ Provides proofs of UITs burned to Ethereum smart contract ■ Slashes multisignature members if they commit a fault
  • 20. ERC20 ⇔ UIT - Step I (Ethereum) ● User has some ERC20 token T, on the Ethereum chain ● User calls ERC20 transfer to send token to IBC smart contract ■ IBC contract escrows ERC20 token ■ IBC contract logs the escrow event in the Patricia trie ● Includes: sender, token, amount, desired destination address
  • 21. ERC20 ⇔ UIT - Step II (Zcash peg chain) ● IBC packet sent from Ethereum to Zcash peg chain ○ IBC relayer (user or third-party) constructs IBC packet ■ Packet references escrow event on Ethereum chain ○ IBC relayer commits packet in a transaction to Zcash peg chain ■ Zcash peg chain state machine verifies proof of event
  • 22. ERC20 ⇔ UIT - Step III (Zcash) ● Zcash peg chain validators sign UIT-mint transaction ○ UIT-mint transaction mints the associated UIT denomination in the amount proved by the Ethereum event on the peg chain, to the user-specified destination address ○ Peg chain validators or user commit mint transaction to Zcash chain ● User can then transact as normal with a Zcash UIT ○ Shield to a z-address, spend privately, unshield/shield again as desired ○ Privacy equivalent: ERC20-side is “unshielded pool” ■ Be careful about pattern-matching linkability! ● UIT can be sent back to Ethereum in reverse ○ Provably burn the UIT on Zcash, submit proof to Zcash peg chain ○ IBC relayer submits packet to Ethereum smart contract which unescrows the tokens
  • 23. ERC20 ⇔ UIT - Properties ● Permissionless & opt-in ○ Anyone can implement for any token ○ Which chain to keep on, when to move up to the asset holder ○ No risk for existing ERC20 token holders of inflation ■ IBC contract can track total supply in/out ● Full Zcash-level privacy when shielded ○ Same level of linkability as transparent addresses / unshielded pool ● Scalable implementation ○ Same logic (and one peg chain) can handle all ERC20 contracts & associated UITs
  • 24. Future Research - higher-assurance proofs ● IBC security dependent on correct light client proofs ● Various degrees of light-client assurance ○ Bitcoin - relatively low ■ No state transition verification ■ Long forks do seem to be unlikely in practice... ○ Cosmos/Tendermint - medium ■ No state transition verification ■ But - lying to light client always a slashable offense ● IBC packet data is public, so it would definitely be caught! ■ Security dependent on value-at-stake (hence the Cosmos hub-spoke model) ○ Coda Protocol / recursive SNARKs - high ■ Can verify full state transition history! ■ Still need to disincentivize forks
  • 25. Future Research - Byzantine recovery ● What if consensus breaks? ○ No valid chain, n valid chains (valid for IBC = can provide light client proofs) ○ Wide space of possibilities ■ n valid chains: can spot duplicate headers when published ■ 0 valid chains: no progress without intervention (but timeouts protect assets) ● What if one chain’s state machine has a bug? ○ No protection right now - if you hold assets on the chain, you accept the risk ○ Could implement fraud proofs ■ Complex requirements on state machines (on both chains) ○ Where applicable, governance on one chain could “fix” - credit the original tokens at parity with balances on the other chain before the bug was exploited ■ Not an ideal solution, irregular state change ● Ideal case - asset security (invariant set) as long as 1-of-n chains are correct & live
  • 26. Questions? ● Cosmos will implement IBC for our stack, but the protocol is open! ○ Alternative implementations, contributions, ideas welcome ● Spec - github.com/cosmos/cosmos-sdk/tree/develop/docs/spec/ibc ● Email - cwgoes@tendermint.com ● Check-out the break-out! ○ Rob Habermeier leading on zero-knowledge state transitions in blockchains, 15:40 in Breakout 2