luxemburg, 19th january 2016 the state-of-the-art fintech ... · crowdfunded ~$20m in ~ a month...

29
The State-of-the-Art of Smart Contracts Andrew Miller FinTech R&D Innovation Conference Luxemburg, 19th January 2016

Upload: others

Post on 09-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

The State-of-the-Art of Smart Contracts

Andrew MillerFinTech R&D Innovation Conference

Luxemburg, 19th January 2016

Page 2: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Smart Contracts- Executed by computer network

- Operates on deposited funds100% collateral up front

- Written in computer code

- On cryptocurrency

Real Contracts- Executed by the counterpartiesEnforced by law, arbitration

- Expectation of good faith(bankruptcy protection)

- Written in legalese

- Subject to regulation(unconscionable?)

Page 3: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,
Page 4: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,
Page 5: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Free

Business

Idea!

Page 6: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrencyMoney spent on prototype, tools, community boosting

Page 7: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Smart Contracts in Ethereum

- Pay for computational resources- Run by a peer-to-peer network (unstoppable)- Everyone can see all the data and transaction log- Pseudonymous by default (permissionless)

Hazards:- Front running- No appeals (use at own risk)

Page 8: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

def finalize():

goog = stockAuthority.GetPrice(“GOOG”,”$”)

if goog > 1000 and currentDate() >= tuesday:

stockLedger.transfer(Alice, Bob, “GOOG”, 10)

Alice.send(1000 ETH)

self.conclude()

Page 9: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Contract created

Parties deposit funds

Event occurs

Money is paid out

T1

T2

T3

T4

Blockchain

Page 10: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,
Page 11: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,
Page 12: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Contract Contract

Page 13: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,
Page 14: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,
Page 15: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Smart Contracts in the Wild

http://etherscrape.com

Page 16: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Smart Contract in the Wild: Multisig Wallet- Set of designated principals

- Limited amount of money can be moved each day by any principal

- 2-of-3 (e.g.) principals must approve larger transactions

- Ownership set can change

Page 17: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Smart Contracts in the wild - GamesEthereum Pyramid Scheme

Page 18: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Contract Composition Hazards

Page 19: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

- Virtual machine images (to simplify setup)- Self-contained guide, notes- Recorded lectures from 1-day workshop

Page 20: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Gadgets as a public service- Overcome limitations in script environment

- Blockhashes- Ethereum Alarm Clock

- Amortize costs- Reduce “attack surface”

e.g. 1 “data feed” used by many instruments- Layers of indirection

Page 21: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Gadget Contracts - BTCRelay

A “Bitcoin” payment verifier implemented inside Ethereum

Page 22: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Open Problem: “Trustless” Data Feed

- “Cryptoeconomics”

- Prediction markets:Augur, Truthcoin

Page 23: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

“Off-chain” contracts- Alice wants to pay Bob incrementally

e.g. for WiFi, every 10 seconds, up to $20

- Blockchain transactions are expensive- Solution:

exchange signed messages out of bandonly use blockchain when time to “settle”

Page 24: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Ahmed Kosba, Andrew Miller, Elaine Shi, Zikai Wen, Charalampos Papamanthou

HAWK: Privacy-Preserving Smart Contracts

http://oblivm.com/hawk/

Page 25: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Bitcoin privacy guarantees are abysmalVariety of transaction graph analysis techniques

We know how to fix this:- Interactive mixing (Mixcoin, Coinjoin)- Noninteractive mixing (Monero)- Zerocash

Page 26: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Bitcoin Zerocash

Ethereum

Pro

gram

mab

ility

Privacy

Hawk

Page 27: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

Freezecomm( )

Compute

Encryption( ) , ZKP

FinalizeEncryption( ), ZKP

Verification Key

Blockchain Contract

Hawk Auction

Abort handler

Page 28: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,

ConclusionSmart contracts are a “killer app” for CC

… and spooling up fastCould have been done in finance first!

Regulatory arbitrage, long tailResearch challenges:

privacy, correctness, incentive alignment

Page 29: Luxemburg, 19th January 2016 The State-of-the-Art FinTech ... · Crowdfunded ~$20M in ~ a month Popularized a grand vision of “generalized” cryptocurrency Money spent on prototype,