Bitcoin
Micropayment
Channels
Johann Barbie
Micropayments via Bitcoin
Problem:
● Bitcoin transactions are cheap
● But not cheap enough!
Solution:
● Rapidly-adjusted (...
Issues with small Transactions
1. frequent small transactions will be caught by anti-flooding
algorithms.
2. There is a fi...
Bitcoin - Script introduction
source: https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-...
Standard Transaction:
scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
scriptSig: <sig> <pubKey>

s...
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...
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...
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...
The End
Questions ???

@johba
mail@johba.de
Upcoming SlideShare
Loading in …5
×

Bitcoin Micropayment Channels

1,313
-1

Published on

Some slides from different sources to get people interested in Bitcoin script.

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,313
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
34
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Bitcoin Micropayment Channels

  1. 1. Bitcoin Micropayment Channels Johann Barbie
  2. 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. 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. 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. 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. 6. K2 K1 send PK2 PK1+PK2 create T1 (1 BTC, OP_CHECKMULTISIG)
  7. 7. K1 send PK2 PK1 create T1 (1 BTC, OP_CHECKMULTISIG) create T2 (1 BTC, to K1, +1H) sign T1 sign T2
  8. 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. 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. 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
  11. 11. The End Questions ??? @johba mail@johba.de
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×