SlideShare a Scribd company logo
Bitcoin
Micropayment
Channels
Johann Barbie
Micropayments via Bitcoin
Problem:
● Bitcoin transactions are cheap
● But not cheap enough!
Solution:
● Rapidly-adjusted (micro)payments to a predetermined party
source: source: https://docs.google.com/presentation/d/1E4Aglf1sW6EMpNSjjWQ13GoZVPYljnydbghEV7w13nI/edit#slide=id.g237a625f_0_29
Issues with small Transactions
1. frequent small transactions will be caught by anti-flooding
algorithms.
2. There is a fixed minimum amount of value a single transaction can
send, determined by the number of bytes required to send and
claim it along with the fees charged.
3. The recipient of the micropayments ends up with a wallet full of
“dust” which can be expensive to spend, fee-wise.
source: http://www.coindesk.com/bitcoin-client-bitcoinj-implements-bitcoin-micropayments/
Bitcoin - Script introduction
source: https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-pubkey-hash.29

Word

Description

OP_DUP

Duplicates the top stack item.

OP_HASH160

The input is hashed twice: first with SHA-256 and then
with RIPEMD-160.

OP_EQUAL

Returns 1 if the inputs are exactly equal, 0 otherwise.

OP_EQUALVERIFY

Same as OP_EQUAL, but runs OP_VERIFY afterward.

OP_CHECKSIG

Hash Transaction, Validate with Signature. If it is, 1 is
returned, 0 otherwise.

OP_CHECKMULTISIG

For each signature and public key pair, OP_CHECKSIG is
executed

OP_VERIFY

Marks transaction as invalid if top stack value is not
true.
Standard Transaction:
scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
scriptSig: <sig> <pubKey>

source: https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-pubkey-hash.29

Stack

Script

Empty.

<sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash>
OP_EQUALVERIFY OP_CHECKSIG

<sig> <pubKey>

OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY
OP_CHECKSIG

<sig> <pubKey> <pubKey>

OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

<sig> <pubKey> <pubHashA>

<pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

<sig> <pubKey> <pubHashA> <pubKeyHash>

OP_EQUALVERIFY OP_CHECKSIG

<sig> <pubKey>

OP_CHECKSIG

true

Empty.
K2
K1

send PK2

PK1+PK2

create T1 (1 BTC,
OP_CHECKMULTISIG)
K1

send PK2

PK1

create T1 (1 BTC,
OP_CHECKMULTISIG)

create T2 (1 BTC, to K1,
+1H)

sign T1

sign T2
K1

send PK2

PK1

create T1 (1 BTC,
OP_CHECKMULTISIG)

create T2 (1 BTC, to K1,
+1H)

sign T1

sign T2

tell K2
create T3 (1-X to K1, X
BTC to K2)

abort ?
K1

send PK2

PK1

create T1 (1 BTC,
OP_CHECKMULTISIG)

create T2 (1 BTC, to K1,
+1H)

sign T1

sign T2

tell K2
create T3 (1-X to K1, X
BTC to K2)

sign T3
tell K2
increase X, sign T3 ag

ain

increase X, sign T3 ag

ain

abort ?

tell K2
tell K2
PK1

create T1 (1 BTC,
OP_CHECKMULTISIG)

sign T2

create T2 (1 BTC, to K1,
+1H)

sign T1

tell K2
create T3 (1-X to K1, X
BTC to K2)

sign T3
tell K2
increase X, sign T3 ag

ain

tell K2

increase X, sign T3 ag

ain

tell K2
nge

? or receive cha
abort ?

get payed
The End
Questions ???

@johba
mail@johba.de

More Related Content

Similar to Bitcoin Micropayment Channels

Round Rock Bitcoiner Meetup 14
Round Rock Bitcoiner Meetup 14Round Rock Bitcoiner Meetup 14
Round Rock Bitcoiner Meetup 14
RoundRockBitcoiners
 
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Zvi Avraham
 
Bitcoin, the Blockchain, and Open Source
Bitcoin, the Blockchain, and Open SourceBitcoin, the Blockchain, and Open Source
Bitcoin, the Blockchain, and Open Source
All Things Open
 
How to integrate bit coin wallet using blockchain methodology
How to integrate bit coin wallet using blockchain methodologyHow to integrate bit coin wallet using blockchain methodology
How to integrate bit coin wallet using blockchain methodology
Mitosis Technology
 
Cryptocurrency Mixing
Cryptocurrency MixingCryptocurrency Mixing
Cryptocurrency Mixing
ashmoran
 
The bitcoin blockchain
The bitcoin blockchainThe bitcoin blockchain
The bitcoin blockchain
Salah Hawila
 
Walls Within Walls: What if your attacker knows parkour?
Walls Within Walls: What if your attacker knows parkour?Walls Within Walls: What if your attacker knows parkour?
Walls Within Walls: What if your attacker knows parkour?
Greg Castle
 
Bitcoin : A fierce Decentralized internet currency
Bitcoin : A fierce Decentralized internet currencyBitcoin : A fierce Decentralized internet currency
Bitcoin : A fierce Decentralized internet currency
Shivek Khurana
 
Libbitcoin slides
Libbitcoin slidesLibbitcoin slides
Libbitcoin slides
swansontec
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmers
Wojciech Langiewicz
 
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
Dace Barone
 
Bitcoin’s blockchain - from hashes to Escrow and beyond
Bitcoin’s blockchain - from hashes to Escrow and beyondBitcoin’s blockchain - from hashes to Escrow and beyond
Bitcoin’s blockchain - from hashes to Escrow and beyond
Grzegorz Gawron
 
Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the Hood
Galin Dinkov
 
Dropwizard with MongoDB and Google Cloud
Dropwizard with MongoDB and Google CloudDropwizard with MongoDB and Google Cloud
Dropwizard with MongoDB and Google Cloud
Yun Zhi Lin
 
Malleability and SegWit
Malleability and SegWitMalleability and SegWit
Malleability and SegWit
Pandora Boxchain
 
Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2
Wojciech Langiewicz
 
Checking Bitcoin
 Checking Bitcoin Checking Bitcoin
Checking Bitcoin
Andrey Karpov
 
Solving compliance for crypto businesses using Decentralized Identity – Pelle...
Solving compliance for crypto businesses using Decentralized Identity – Pelle...Solving compliance for crypto businesses using Decentralized Identity – Pelle...
Solving compliance for crypto businesses using Decentralized Identity – Pelle...
SSIMeetup
 
Bitcoin protocol for developerBitcoin Protocol for Developers
Bitcoin protocol for developerBitcoin Protocol for DevelopersBitcoin protocol for developerBitcoin Protocol for Developers
Bitcoin protocol for developerBitcoin Protocol for Developers
Paradigma Digital
 
Panmind at Ruby Social Club Milano
Panmind at Ruby Social Club MilanoPanmind at Ruby Social Club Milano
Panmind at Ruby Social Club Milano
Panmind
 

Similar to Bitcoin Micropayment Channels (20)

Round Rock Bitcoiner Meetup 14
Round Rock Bitcoiner Meetup 14Round Rock Bitcoiner Meetup 14
Round Rock Bitcoiner Meetup 14
 
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
 
Bitcoin, the Blockchain, and Open Source
Bitcoin, the Blockchain, and Open SourceBitcoin, the Blockchain, and Open Source
Bitcoin, the Blockchain, and Open Source
 
How to integrate bit coin wallet using blockchain methodology
How to integrate bit coin wallet using blockchain methodologyHow to integrate bit coin wallet using blockchain methodology
How to integrate bit coin wallet using blockchain methodology
 
Cryptocurrency Mixing
Cryptocurrency MixingCryptocurrency Mixing
Cryptocurrency Mixing
 
The bitcoin blockchain
The bitcoin blockchainThe bitcoin blockchain
The bitcoin blockchain
 
Walls Within Walls: What if your attacker knows parkour?
Walls Within Walls: What if your attacker knows parkour?Walls Within Walls: What if your attacker knows parkour?
Walls Within Walls: What if your attacker knows parkour?
 
Bitcoin : A fierce Decentralized internet currency
Bitcoin : A fierce Decentralized internet currencyBitcoin : A fierce Decentralized internet currency
Bitcoin : A fierce Decentralized internet currency
 
Libbitcoin slides
Libbitcoin slidesLibbitcoin slides
Libbitcoin slides
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmers
 
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
 
Bitcoin’s blockchain - from hashes to Escrow and beyond
Bitcoin’s blockchain - from hashes to Escrow and beyondBitcoin’s blockchain - from hashes to Escrow and beyond
Bitcoin’s blockchain - from hashes to Escrow and beyond
 
Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the Hood
 
Dropwizard with MongoDB and Google Cloud
Dropwizard with MongoDB and Google CloudDropwizard with MongoDB and Google Cloud
Dropwizard with MongoDB and Google Cloud
 
Malleability and SegWit
Malleability and SegWitMalleability and SegWit
Malleability and SegWit
 
Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2
 
Checking Bitcoin
 Checking Bitcoin Checking Bitcoin
Checking Bitcoin
 
Solving compliance for crypto businesses using Decentralized Identity – Pelle...
Solving compliance for crypto businesses using Decentralized Identity – Pelle...Solving compliance for crypto businesses using Decentralized Identity – Pelle...
Solving compliance for crypto businesses using Decentralized Identity – Pelle...
 
Bitcoin protocol for developerBitcoin Protocol for Developers
Bitcoin protocol for developerBitcoin Protocol for DevelopersBitcoin protocol for developerBitcoin Protocol for Developers
Bitcoin protocol for developerBitcoin Protocol for Developers
 
Panmind at Ruby Social Club Milano
Panmind at Ruby Social Club MilanoPanmind at Ruby Social Club Milano
Panmind at Ruby Social Club Milano
 

More from JohannBarbie

Bitcoin Droidcon Tunisia
Bitcoin   Droidcon TunisiaBitcoin   Droidcon Tunisia
Bitcoin Droidcon Tunisia
JohannBarbie
 
Bitfinger - Bitcoin on Webfinger, Webfist and Fist-Bump
Bitfinger - Bitcoin on Webfinger, Webfist and Fist-BumpBitfinger - Bitcoin on Webfinger, Webfist and Fist-Bump
Bitfinger - Bitcoin on Webfinger, Webfist and Fist-Bump
JohannBarbie
 
37 Coins
37 Coins37 Coins
37 Coins
JohannBarbie
 
Sleeping collection
Sleeping collectionSleeping collection
Sleeping collectionJohannBarbie
 
Travel map
Travel mapTravel map
Travel map
JohannBarbie
 
Travel
TravelTravel
Travel
JohannBarbie
 

More from JohannBarbie (6)

Bitcoin Droidcon Tunisia
Bitcoin   Droidcon TunisiaBitcoin   Droidcon Tunisia
Bitcoin Droidcon Tunisia
 
Bitfinger - Bitcoin on Webfinger, Webfist and Fist-Bump
Bitfinger - Bitcoin on Webfinger, Webfist and Fist-BumpBitfinger - Bitcoin on Webfinger, Webfist and Fist-Bump
Bitfinger - Bitcoin on Webfinger, Webfist and Fist-Bump
 
37 Coins
37 Coins37 Coins
37 Coins
 
Sleeping collection
Sleeping collectionSleeping collection
Sleeping collection
 
Travel map
Travel mapTravel map
Travel map
 
Travel
TravelTravel
Travel
 

Recently uploaded

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 

Recently uploaded (20)

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 

Bitcoin Micropayment Channels

  • 2. Micropayments via Bitcoin Problem: ● Bitcoin transactions are cheap ● But not cheap enough! Solution: ● Rapidly-adjusted (micro)payments to a predetermined party source: source: https://docs.google.com/presentation/d/1E4Aglf1sW6EMpNSjjWQ13GoZVPYljnydbghEV7w13nI/edit#slide=id.g237a625f_0_29
  • 3. Issues with small Transactions 1. frequent small transactions will be caught by anti-flooding algorithms. 2. There is a fixed minimum amount of value a single transaction can send, determined by the number of bytes required to send and claim it along with the fees charged. 3. The recipient of the micropayments ends up with a wallet full of “dust” which can be expensive to spend, fee-wise. source: http://www.coindesk.com/bitcoin-client-bitcoinj-implements-bitcoin-micropayments/
  • 4. Bitcoin - Script introduction source: https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-pubkey-hash.29 Word Description OP_DUP Duplicates the top stack item. OP_HASH160 The input is hashed twice: first with SHA-256 and then with RIPEMD-160. OP_EQUAL Returns 1 if the inputs are exactly equal, 0 otherwise. OP_EQUALVERIFY Same as OP_EQUAL, but runs OP_VERIFY afterward. OP_CHECKSIG Hash Transaction, Validate with Signature. If it is, 1 is returned, 0 otherwise. OP_CHECKMULTISIG For each signature and public key pair, OP_CHECKSIG is executed OP_VERIFY Marks transaction as invalid if top stack value is not true.
  • 5. Standard Transaction: scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG scriptSig: <sig> <pubKey> source: https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-pubkey-hash.29 Stack Script Empty. <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <sig> <pubKey> <pubKey> OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <sig> <pubKey> <pubHashA> <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <sig> <pubKey> <pubHashA> <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <sig> <pubKey> OP_CHECKSIG true Empty.
  • 6. K2 K1 send PK2 PK1+PK2 create T1 (1 BTC, OP_CHECKMULTISIG)
  • 7. K1 send PK2 PK1 create T1 (1 BTC, OP_CHECKMULTISIG) create T2 (1 BTC, to K1, +1H) sign T1 sign T2
  • 8. K1 send PK2 PK1 create T1 (1 BTC, OP_CHECKMULTISIG) create T2 (1 BTC, to K1, +1H) sign T1 sign T2 tell K2 create T3 (1-X to K1, X BTC to K2) abort ?
  • 9. K1 send PK2 PK1 create T1 (1 BTC, OP_CHECKMULTISIG) create T2 (1 BTC, to K1, +1H) sign T1 sign T2 tell K2 create T3 (1-X to K1, X BTC to K2) sign T3 tell K2 increase X, sign T3 ag ain increase X, sign T3 ag ain abort ? tell K2 tell K2
  • 10. PK1 create T1 (1 BTC, OP_CHECKMULTISIG) sign T2 create T2 (1 BTC, to K1, +1H) sign T1 tell K2 create T3 (1-X to K1, X BTC to K2) sign T3 tell K2 increase X, sign T3 ag ain tell K2 increase X, sign T3 ag ain tell K2 nge ? or receive cha abort ? get payed