PERUN: Virtual Payment Hubs over Cryptocurrencies Stefan Dziembowski Lisa Eckey Sebastian Faust Daniel Malinowski
Blockchain Scalability Problem: Blockchain transactions are slow and expensive Transaction Send to Bob Fees Alice Bob Goal: Cheap Fast Offline Secure Microtransactions 2
Smart Contracts Smart Contract Gas Store and send coins Execute code Lock Interact Store data Alice Bob Guaranteed by the underlying cryptocurrency 3
PERUN in a Nutshell Ledger Payment Channels New cryptographic protocol that allows microtransactions over cryptocurrencies Cheap Fast Offline Secure • Based on smart contracts Virtual Payment Channels • In a Hub-network 2 Types of payment channels • Ledger channels: build over the blockchain • Virtual channels: build over ledger channels
Outline o Motivation o Ledger Payment Channels o Virtual Payment Channels o Security & Performance o Summary & Outlook 5
(Ledger) Payment Channels* * Lightning, Spilman, Duplex, Sprites, Raiden, Counterfactual, L2 …. Channel Contract Lock c A Lock c B (c A + c B coins) Alice Bob 2. Update 2. Update 1. Create 1. Create 3. Close 3. Close 6
(Ledger) Payment Channels Off-chain channel state: s v =(x A ,x B ,v) update s 1 update s 1 c A +5 c B -5 chan AB Alice Bob Cheap Fast Offline Secure s 0 = (c A ,c B ,0) s 0 = (c A ,c B ,0) s 1 = (c A +5,c B -5,1) s 1 = (c A +5,c B -5,1) 1. Create 2. Update 3. Close 7
(Ledger) Payment Channels Channel Contract Send s n Send s m … s n is valid if q x A + x B = c A + c B q Aproved by A and B Select more recent state Unlock x A Unlock x B ...Wait for message for payout from Bob ... Alice Bob s m = (x A ,x B ,m) s n = (x A ,x B ,n) 1. Create 2. Update 3. Close 8
Outline o Motivation o Ledger Payment Channels o Virtual Payment Channels o Security & Performance o Summary & Outlook 9
Hashed Time Locked Contracts (HTLC)* Idea: Route every transaction via intermediary Fee Ingrid pays Bob if Ingrid pays Alice if Z Alice pays Ingrid Bob pays Ingrid Z chan IB chan AI Alice Bob Ingrid * J. Poon, T. Dryja: The bitcoin lightning network: Scalable off-chain instant payments. (2016) 10
PERUN Virtual Channels Cheap Fast Offline Secure chan AB chan IB chan AI Alice Bob Ingrid 11
PERUN Virtual Channels open virtual open virtual chan AB chan AB open virtual chan AB 1 - c A -1 c B 1 - c c I -1 I chan IB chan IB chan AI chan AI 2 Alice Bob 2 Ingrid 2. Update 1. Create 3. Close 12
PERUN Virtual Channels update vs 1 1 2 1 0 chan AB 1 - c A -1 c B 1 - c I - 1 c I chan IB chan AI 2 Alice Bob 2 s n = (c I -1, c B -1, n) s m = (c A -1, c I -1, m) Ingrid vs 0 = (1, 1, 0) vs 0 = (1, 1, 0) vs 1 = (2, 0, 1) vs 1 = (2, 0, 1) 1. Create 2. Update 3. Close 13
PERUN Virtual Channels last state: vs m last state: vs n 1 - c A -1 c B 1 - c c I -1 I chan IB chan AI 2 Alice Bob 2 Ingrid 1. Create 2. Update 3. Close 14
PERUN Virtual Channels update chan IB update chan AI Ingrid stays financially neutral update chan AI update chan IB 1 - c A +1 c A -1 c A +1 c B 1 1 1 + + - c c c c I -1 I I I chan IB chan AI 2 Alice Bob 2 Ingrid 1. Create 2. Update 3. Close 15
Outline o Motivation o Ledger Payment Channels o Virtual Payment Channels o Security & Performance o Summary & Outlook 16
(Informal) PERUN Security • Balance neutrality for intermediary • Consensus on channel creation and update 2 2 • Guaranteed balance payout for Alice & Bob • Guaranteed channel closing Validity = t This must hold even if ALL other players collude 17
PERUN Performance Virtual Ledger HTLC Channel Channel Network off-chain/ Channel Opening on-chain via Ingrid Fee/ 12 ct. Validity off-chain/ off-chain / off-chain / Update via Ingrid direct direct off-chain/ Agreement on-chain Fee/ via Ingrid Payment 50 ct. Closing Disagreement on-chain on-chain on-chain 55 ct. 84 ct. 84 ct. 18
Outline o Motivation o Ledger Payment Channels o Virtual Payment Channels o Security & Performance o Summary & Outlook 19
Extensions Summary General State Channel Networks • New formalism for payment channels • Virtual payment channels @ CCS 2018 • Can be opened and closed off-chain • Can be updated without intermediary Multi-party Virtual State Channels • Provable secure protocol • New model of DL and Smart Contracts • Rigorous security proof in UC model @ Eurocrypt 2019
Thank you for your attention! For more information visit: www.perun.network All icons made by Freepik from www.flaticon.com
Recommend
More recommend