85
Ebay without Ebay Oleg Andreev @oleganza [email protected] February 13, 2014

Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Embed Size (px)

DESCRIPTION

Ebay without Ebay - by Oleg Andreev February 13, 2014 @ Paris Bitcoin Startups #1 --- About the author : Oleg Andreev - Software designer Web : http://oleganza.com/ Twitter : @oleganza E-mail : [email protected] Paris, France --- Uploadé par Bitcoinomie - L'actualité du Bitcoin et des monnaies virtuelles, en France et dans le monde. Web : http://www.bitcoinomie.fr Twitter : @Bitcoinomie

Citation preview

Page 1: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Ebay without EbayOleg Andreev

@[email protected]

!February 13, 2014

Page 2: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Bitcoin is:

Page 3: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

All-or-nothing ledger

Bitcoin is:

Page 4: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

All-or-nothing ledger

Decentralized

Bitcoin is:

Page 5: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

All-or-nothing ledger

Decentralized

Programmable

Bitcoin is:

Page 6: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Bitcoin is:

Page 7: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Everyone sees everything

Bitcoin is:

Page 8: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Everyone sees everything

Everyone executes code

Bitcoin is:

Page 9: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Everyone sees everything

Everyone executes code

Everyone validates txs

Bitcoin is:

Page 10: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Every teenager:

Page 11: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

2001: can make a webpage

Every teenager:

Page 12: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

2001: can make a webpage

2010: can make a mobile app

Every teenager:

Page 13: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

2001: can make a webpage

2010: can make a mobile app

2014: can make a contract

Every teenager:

Page 14: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

Page 15: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

iPod

Page 16: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod

Page 17: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod

Page 18: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod

Page 19: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod

Page 20: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100

iPod

Page 21: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

iPod

$100

Page 22: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100

iPod

Page 23: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

Page 24: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

Page 25: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod

Page 26: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod$200

Page 27: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod$200 $200

Page 28: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod

Page 29: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod

$200

Page 30: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod

$200$200

Page 31: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100 iPod

$200$200

Page 32: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$200$200

Page 33: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$200$200

Page 34: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$200$200

Page 35: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$200$200

Page 36: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod$200$200

Page 37: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev
Page 38: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

$200 2 AlicePubKey BobPubKey 2 CHECKMULTISIG$200

1 transaction2 inputs locked by 2 keys

Page 39: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

$200 2 AlicePubKey BobPubKey 2 CHECKMULTISIG$200

Page 40: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

$200 2 AlicePubKey BobPubKey 2 CHECKMULTISIG$200

Signatures required

Page 41: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

$200 2 AlicePubKey BobPubKey 2 CHECKMULTISIG$200

Signatures required

Keys used

Page 42: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

$200 2 AlicePubKey BobPubKey 2 CHECKMULTISIG$200

Alice Public KeySignatures required

Keys used

Page 43: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

$200 2 AlicePubKey BobPubKey 2 CHECKMULTISIG$200

Alice Public Key

Bob’s Public Key

Signatures required

Keys used

Page 44: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

$200 2 AlicePubKey BobPubKey 2 CHECKMULTISIG$200

Alice and Bob must agree on how money is being spent

Page 45: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

To unlock money both signatures must be present

0 (SigA) (SigB)$200$200

Page 46: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

To unlock money both signatures must be present

0 (SigA) (SigB)$200$200

Back to Alice

Page 47: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

To unlock money both signatures must be present

0 (SigA) (SigB)$200$200

Back to Alice

Back to Bob

Page 48: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$200$200

SigBSigA

Page 49: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice has both signatures and sends the unlock transaction

0 SigA SigB$200$200

Page 50: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$200$200

SigBSigA

Page 51: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$200$200

Problem: Alice can unlock

$200 any time she wants, but Bob

cannot.

SigBSigA

Page 52: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Anti-troll measure

Page 53: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev
Page 54: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

MAD

Page 55: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev
Page 56: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Mutually

Page 57: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

MutuallyAssured

Page 58: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

MutuallyAssuredDestruction

Page 59: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Before starting business, Alice and Bobsign transaction that destroys all funds

0 SigA SigB 000000000000000lock time: +30 days

Page 60: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Before starting business, Alice and Bobsign transaction that destroys all funds

0 SigA SigB 000000000000000lock time: +30 days

Cool off period

Page 61: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$200$200

SigBSigA

Page 62: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPodSigBSigA

Page 63: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Payment + Unlock in one transaction

Page 64: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$400

Page 65: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$300$100

Page 66: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$300$100

Page 67: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod$300$100

Page 68: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$400

SigBSigA

Page 69: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice Bob

$100iPod

$400

SigBSigA

Page 70: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice pays and unlocks at the same time

0 SigA SigB$100$300

Page 71: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Bob is motivated to unlock $300 to not allow Alice to destroy his $200

0 SigA SigB$100$300

0 SigA SigB 000000000000000lock time: +30 days

Page 72: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Once one tx is in blockchain, another one becomes invalid

0 SigA SigB$100$300

0 SigA SigB 000000000000000lock time: +30 days

Page 73: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Once one tx is in blockchain, another one becomes invalid

0 SigA SigB$100$300

Page 74: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Protocol:

Page 75: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice and Bob choose keys.

Protocol:

Page 76: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice and Bob choose keys.

They lock money with 2-of-2 multisig script.

Protocol:

Page 77: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice and Bob choose keys.

They lock money with 2-of-2 multisig script.

They sign a +30d timelocked destruction tx.

Protocol:

Page 78: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice and Bob choose keys.

They lock money with 2-of-2 multisig script.

They sign a +30d timelocked destruction tx.

Bob sends the product.

Protocol:

Page 79: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice and Bob choose keys.

They lock money with 2-of-2 multisig script.

They sign a +30d timelocked destruction tx.

Bob sends the product.

Alice pays and unlocks money.

Protocol:

Page 80: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Alice and Bob choose keys.

They lock money with 2-of-2 multisig script.

They sign a +30d timelocked destruction tx.

Bob sends the product.

Alice pays and unlocks money.

If money is not unlocked in time, either party can destroy money.

Protocol:

Page 81: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Use cases:

Page 82: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Anonymous markets

Use cases:

Page 83: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Anonymous marketsFreelance contracts

Use cases:

Page 84: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

Anonymous marketsFreelance contractsAutonomous agents

Use cases:

Page 85: Ebay without Ebay - Bitcoin smart contracts presentation by Oleg Andreev

http://oleganza.com/bitcoin-epita-2014.pdf