SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Downloaden Sie, um offline zu lesen
STATE
CHANNELS
BLOCKCHAIN SCALABILITY VIA STATE
CHANNELS
PROBLEMS ADDRESSED
BY STATE CHANNELS
Scalability - Tens of thousands transactions per second
possible
Privacy - None public transaction possible
Confirmation delay: instant transaction confirmation possible
-> Still trustless/ without counter party risk
BITCOIN - PAYMENT
CHANNEL
Alice wants to charge a E-car and pay Bob every second
A locks money in a multisig address (2 out of 2)
100mBTC in multisig:



1) Alice signs transaction with two outputs 1mBTC to Bob, 99 to Alice
2) Alice signs transaction with two outputs 2mBTC to Bob, 98 to Alice
3) Alice signs transaction with two outputs 3mBTC to Bob, 97 to Alice
….
Only Bob can submit transactions because his signature is missing
Bob would only submit the latest transaction
BITCOIN - PAYMENT
CHANNEL
Limitations: Payments only in one direction
Next step: Lightning network - invalidate older transactions by punishment
transaction

1) Alice signs transaction with two outputs 1mBTC to Bob, 99 to Alice
2) Alice signs transaction with two outputs 2mBTC to Bob, 98 to Alice
3) Alice signs transaction with two outputs 3mBTC to Bob, 97 to Alice
Bob signs a transaction that would spend the 3mBTC


With Ethereum: Much simpler and in a general way possible
SEQUENCE OF STATE
CHANNELS
1. two (or more) people lock up some tokens or any state description
they totally control.
2. this state can only be updated on the blockchain with a signed
message of all group members
3. the members of the group can internally do transactions by creating a
new state and letting it sign by everyone. The new state also has a
nonce (sequence number)
4. if members of the group stop cooperating the latest state can always
be written on the blockchain
5. to write the state on the blockchain anyone can submit a signed state
and a small security deposit - this will trigger a challenge period. During
this period a newer state (higher nonce) can be submitted, in this case
the first submitter would lose its deposit.
6. If a state remains unchallenged it will be written on the regular
blockchain
EXAMPLE -
PREDICTION MARKET
Alice and Bob wants to bet against each other.
1. Lock money
2. First transaction: Alice bets on Hillary, Bob on Sanders
(could sign the transaction or just the resulting state)
seq. nr. 0 | (A:50ETH/B:50ETH) |
seq. nr. 1 | (A:40ETH, 20 Hillary shares/B:
40ETH 20 Sanders shares) | signatures
EXAMPLE -
PREDICTION MARKET
3. Second transaction: Alice makes another bet on Hillary
seq. nr. 2 | (A:25ETH, 40 Hillary shares/B:
35ETH 40 Sanders shares) | signatures
seq. nr. 1 | (A:40ETH, 20 Hillary shares/B:
40ETH 20 Sanders shares) | signatures
4. Sanders wins
4a. If they cooperate they can just update the off-chain state to:
seq. nr. 3 | (A:25ETH,/B:75ETH) | signatures
4b. If Alice does not cooperate Bob can settle state 2
(submit it to the blockchain)
4c. Alice could try to cheat and settle state 0 or 1 - > Bob can
challenge this by submitting state 2 during the challenge period
HASHLOCK - (1/2)
TRANSITIVE TRANSACTIONS
Alices - Bob Bob - Charly
seq. nr. 0 | (A:50ETH/B:50ETH) | seq. nr. 0 | (B:50ETH/C:50ETH) |
Alice wants to send Charly 10 ETH but hasn't locked money
with him.
seq. nr. 1 | (A:40ETH/B:60ETH
) | signatures | HASHLOCK (only
known by Alice)
Solution - Alices sends 10 ETH to Bob in channel 1 and Bob
sends 10 to Charly in channel 2
Problem - Who makes the first transaction? -> Hashlock
seq. nr. 1 | (B:40ETH/C:60ETH
) | signatures | SAME HASHLOCK
(only known by Alice)
Alice can publish the HASH-LOCK
HASHLOCK - (2/2)
TRANSITIVE TRANSACTIONS
seq. nr. 1 | (A:40ETH/B:60ETH
) | signatures | HASHLOCK (only
known by Alice)
seq. nr. 1 | (B:40ETH/C:60ETH
) | signatures | SAME HASHLOCK
(only known by Alice)
What if
a) Alice creates the transaction to Bob but Bob does not create the

transaction to Charly

-> than Alice does not reveal the Secret
b) Alice reveals the secret of the transaction only to Charly?
-> as soon as Charly puts the secrete on the Blockchain Bob knows it
as well
c) What if Alices does not reveal the secret at all?

-> there needs to be an expiry date where funds are freed anyway
Alices - Bob Bob - Charly
CODE REVIEW
FINAL THOUGHTS
- more money locked than necessary
- make a bid - revoke the bid






mini - side chain




The court
READ MORE
Off chain trading on Gnosis
http://forum.groupgnosis.com/t/how-offchain-trading-will-
work/63/13
Intro to state channels
http://www.jeffcoleman.ca/state-channels/
Universal Payment Channels
https://gist.github.com/jtremback/058daafe1116435b6a2e
Bitcoin Lightning Network
https://lightning.network

Weitere ähnliche Inhalte

Mehr von Martin Köppelmann

Mehr von Martin Köppelmann (7)

Daoist history - By Joel Dietz
Daoist history - By Joel DietzDaoist history - By Joel Dietz
Daoist history - By Joel Dietz
 
Circles - Brandbook
Circles - BrandbookCircles - Brandbook
Circles - Brandbook
 
Gnosis platform - NYC 2016
Gnosis platform - NYC 2016Gnosis platform - NYC 2016
Gnosis platform - NYC 2016
 
Build dapps 1:3 dev tools
Build dapps 1:3 dev toolsBuild dapps 1:3 dev tools
Build dapps 1:3 dev tools
 
Cirlces berlin
Cirlces berlinCirlces berlin
Cirlces berlin
 
Circles - Universal Basic Income
Circles - Universal Basic IncomeCircles - Universal Basic Income
Circles - Universal Basic Income
 
51% Attacks - Pools and Game Theory
51% Attacks - Pools and Game Theory51% Attacks - Pools and Game Theory
51% Attacks - Pools and Game Theory
 

Kürzlich hochgeladen

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

State channels and scalability

  • 2. PROBLEMS ADDRESSED BY STATE CHANNELS Scalability - Tens of thousands transactions per second possible Privacy - None public transaction possible Confirmation delay: instant transaction confirmation possible -> Still trustless/ without counter party risk
  • 3. BITCOIN - PAYMENT CHANNEL Alice wants to charge a E-car and pay Bob every second A locks money in a multisig address (2 out of 2) 100mBTC in multisig:
 
 1) Alice signs transaction with two outputs 1mBTC to Bob, 99 to Alice 2) Alice signs transaction with two outputs 2mBTC to Bob, 98 to Alice 3) Alice signs transaction with two outputs 3mBTC to Bob, 97 to Alice …. Only Bob can submit transactions because his signature is missing Bob would only submit the latest transaction
  • 4. BITCOIN - PAYMENT CHANNEL Limitations: Payments only in one direction Next step: Lightning network - invalidate older transactions by punishment transaction
 1) Alice signs transaction with two outputs 1mBTC to Bob, 99 to Alice 2) Alice signs transaction with two outputs 2mBTC to Bob, 98 to Alice 3) Alice signs transaction with two outputs 3mBTC to Bob, 97 to Alice Bob signs a transaction that would spend the 3mBTC 
 With Ethereum: Much simpler and in a general way possible
  • 5. SEQUENCE OF STATE CHANNELS 1. two (or more) people lock up some tokens or any state description they totally control. 2. this state can only be updated on the blockchain with a signed message of all group members 3. the members of the group can internally do transactions by creating a new state and letting it sign by everyone. The new state also has a nonce (sequence number) 4. if members of the group stop cooperating the latest state can always be written on the blockchain 5. to write the state on the blockchain anyone can submit a signed state and a small security deposit - this will trigger a challenge period. During this period a newer state (higher nonce) can be submitted, in this case the first submitter would lose its deposit. 6. If a state remains unchallenged it will be written on the regular blockchain
  • 6. EXAMPLE - PREDICTION MARKET Alice and Bob wants to bet against each other. 1. Lock money 2. First transaction: Alice bets on Hillary, Bob on Sanders (could sign the transaction or just the resulting state) seq. nr. 0 | (A:50ETH/B:50ETH) | seq. nr. 1 | (A:40ETH, 20 Hillary shares/B: 40ETH 20 Sanders shares) | signatures
  • 7. EXAMPLE - PREDICTION MARKET 3. Second transaction: Alice makes another bet on Hillary seq. nr. 2 | (A:25ETH, 40 Hillary shares/B: 35ETH 40 Sanders shares) | signatures seq. nr. 1 | (A:40ETH, 20 Hillary shares/B: 40ETH 20 Sanders shares) | signatures 4. Sanders wins 4a. If they cooperate they can just update the off-chain state to: seq. nr. 3 | (A:25ETH,/B:75ETH) | signatures 4b. If Alice does not cooperate Bob can settle state 2 (submit it to the blockchain) 4c. Alice could try to cheat and settle state 0 or 1 - > Bob can challenge this by submitting state 2 during the challenge period
  • 8. HASHLOCK - (1/2) TRANSITIVE TRANSACTIONS Alices - Bob Bob - Charly seq. nr. 0 | (A:50ETH/B:50ETH) | seq. nr. 0 | (B:50ETH/C:50ETH) | Alice wants to send Charly 10 ETH but hasn't locked money with him. seq. nr. 1 | (A:40ETH/B:60ETH ) | signatures | HASHLOCK (only known by Alice) Solution - Alices sends 10 ETH to Bob in channel 1 and Bob sends 10 to Charly in channel 2 Problem - Who makes the first transaction? -> Hashlock seq. nr. 1 | (B:40ETH/C:60ETH ) | signatures | SAME HASHLOCK (only known by Alice) Alice can publish the HASH-LOCK
  • 9. HASHLOCK - (2/2) TRANSITIVE TRANSACTIONS seq. nr. 1 | (A:40ETH/B:60ETH ) | signatures | HASHLOCK (only known by Alice) seq. nr. 1 | (B:40ETH/C:60ETH ) | signatures | SAME HASHLOCK (only known by Alice) What if a) Alice creates the transaction to Bob but Bob does not create the
 transaction to Charly
 -> than Alice does not reveal the Secret b) Alice reveals the secret of the transaction only to Charly? -> as soon as Charly puts the secrete on the Blockchain Bob knows it as well c) What if Alices does not reveal the secret at all?
 -> there needs to be an expiry date where funds are freed anyway Alices - Bob Bob - Charly
  • 11. FINAL THOUGHTS - more money locked than necessary - make a bid - revoke the bid 
 
 
 mini - side chain 
 
 The court
  • 12. READ MORE Off chain trading on Gnosis http://forum.groupgnosis.com/t/how-offchain-trading-will- work/63/13 Intro to state channels http://www.jeffcoleman.ca/state-channels/ Universal Payment Channels https://gist.github.com/jtremback/058daafe1116435b6a2e Bitcoin Lightning Network https://lightning.network