introduction to blockchain and applications of game theory

48
Dusit (Tao) Niyato School of Computer Science and Engineering (SCSE), Nanyang Technological University, Singapore Introduction to Blockchain and Applications of Game Theory 1

Upload: others

Post on 30-Dec-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Blockchain and Applications of Game Theory

Dusit (Tao) Niyato

School of Computer Science and Engineering (SCSE),Nanyang Technological University, Singapore

Introduction to Blockchain and Applications of Game Theory

1

Page 2: Introduction to Blockchain and Applications of Game Theory

• Introduction to Blockchain

• Evolutionary Game for Mining Pool Selection in Blockchain

Networks

• Cloud/Fog Computing Resource Management and Pricing for

Blockchain Networks

– Stackelberg Game

– Auction

– (Auction with) Deep Learning

• Testbed and Experiment

• Summary and Future Directions

Outline

2

Page 3: Introduction to Blockchain and Applications of Game Theory

Introduction• Blockchain represents novel approach to the landscape of information

collection, distribution, and governance

– Add new and undeletable transactions and organize them into

blocks.

– Cryptographically verify each transaction in the block.

– Append the new block to the end of the existing immutable

blockchain.

3

Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions

Page 4: Introduction to Blockchain and Applications of Game Theory

Introduction

4

Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions

A ($10)B ($20) C ($15)

A ($10)

B ($20)

C ($15)

A ($10)

B ($20)

C ($15)

A ($10)

B ($20)

C ($15)

A ($30)

Page 5: Introduction to Blockchain and Applications of Game Theory

Introduction to Blockchain

Public Ledger

• Every viable transaction is stored in a public ledger

• Transactions are placed in blocks, which are linked by SHA256 hashes.

• https://blockchain.info

• Blockchain can be abstracted as an infinitely-growing, append-only string

that is canonically agreed upon by the nodes in the blockchain network

5

Hash of k-1

Block k

Transaction1

Transaction2

Hash of k

Block k+1

Transaction3

Transaction4

Hash of k+1

Block k+2

Transaction5

Transaction6

Page 6: Introduction to Blockchain and Applications of Game Theory

Introduction

6

Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions

A

B

C

A has $10

B has $20

C has $15

A has $5

B has $25

C has $15

A has $5

B has $35

C has $5

A has $15

B has $25

C has $5

A→B $5

Hash

AS C→B $10

Hash

CS B→A $10

Hash

BS

C→A $10

Hash

CS

Irreversible cryptographic hash function

The only way to solve such mathematical

problem is to guess random numbers that

combined with the previous block content

generate a defined result (usually a number

below a certain value).

Ledger

AS is digital signature signed by

A using A’s private key

Mining

Page 7: Introduction to Blockchain and Applications of Game Theory

Introduction

Proof of Work

• Byzantine failure is any fault presenting different symptoms

to different observers (loss of a system service due to a

Byzantine fault in systems that require consensus)

• Consensus is a mechanism to ensure trust in the network,

which means that users in the network commonly reach an

agreement of a block added to the existing blockchain

7

Page 8: Introduction to Blockchain and Applications of Game Theory

Introduction

Proof of Work

• Sybil attack, an attacker creates a large population of

pseudonymous or fake users in the network

– These fake users can vote and reach consensus to accept false transactions generated by the

attacker

• Solution to such an attack is to raise the complexity of

mining so that attackers may not have enough computing

power to support enough fake users in the network, and

thus rendering a Sybil attack economically infeasible

8

A

B

C

F

D

E

Page 9: Introduction to Blockchain and Applications of Game Theory

Introduction to Blockchain

51% Attack and Double-Spending

• What if two blocks are created at the same time?

• (Different) miners broadcast both blocks

• The other miners build blocks on the longest chain

9

A has $10

B has $20

C has $15

A→B $5

Hash

AS

C→B $10

Hash

CS B→A $10

Hash

BS

C→A $10

Hash

CS

Ledger

A→C $4

Hash

AS

Page 10: Introduction to Blockchain and Applications of Game Theory

Introduction to Blockchain

51% Attack and Double-Spending

• What if two blocks are created at the same time?

• (Different) miners broadcast both blocks

• The other miners build blocks on the longest chain

10

A has $10

B has $20

C has $15

A→B $5

Hash

AS

C→B $10

Hash

CS C→D $1

Hash

CS

C→A $10

Hash

CS

Ledger

C→B $1

Hash

CS

A ships item to C

Mined by C

Page 11: Introduction to Blockchain and Applications of Game Theory

Introduction to Blockchain

Proof of Work

• Since these miners spend computing time and energy for recording

blockchain users’ performed transactions, the mining reward is needed so

as to guarantee the incentive

• In practical blockchain systems, e.g., Bitcoin, a miner which successfully

mines a block receives the mining reward when the mined block is

successfully added to the blockchain

A

B

C

Mining, proof of work, and

incentive introduce

resource allocation issues

and cause competitive

environment in blockchain

11

Page 12: Introduction to Blockchain and Applications of Game Theory

Introduction to Blockchain

Types of Blockchain

• Permissionless/public blockchain networks: – Anyone can join the network to read the blockchian data, issue transactions and participate

in the consensus process.

• Private blockchain networks: – The consensus is maintained by a centralized server

• (Hybrid) Permissioned/consortium blockchain networks:

– Only the authorized nodes are allowed to participate in the consensus process.

12

Proof of authority

Page 13: Introduction to Blockchain and Applications of Game Theory

Evolutionary Game for Mining Pool

Selection in Blockchain Networks

13

Page 14: Introduction to Blockchain and Applications of Game Theory

Mining Pool Selection

Motivations and Objectives

• In blockchain networks, the consensus protocol based on proof-of-work

uses monetary incentive to encourage the nodes in the network to

participate in the blockchain maintenance process

• Due to the exponential increase of the difficulty of the cryptographic

puzzle, an individual block miners tends to join a mining pool and

collaborate with other miners in order to reduce the income variance and

earn stable profit.

https://www.blockchain.com 14

Page 15: Introduction to Blockchain and Applications of Game Theory

Mining Pool Selection

Motivations and Objectives

• The chance for individual (solo) miners to win the blockchain mining race

is negligible and the real-world blockchain networks are dominated by the

nodes that represent mining farms or mining pools

• mining pool works as a task scheduler for large number of solo miners

• It divides the computation task for proof of work puzzle solving into sub-

problems and assigns them to the registered solo miners according to

their devoted mining power

Mining pool A Mining pool B

15

Page 16: Introduction to Blockchain and Applications of Game Theory

Mining Pool Selection

Problem Formulation

• A large population of N individual miners

• According to the consensus protocol, the miner of each confirmed block receives a fixed amount of reward from the new block and a flexible amount of transaction fees for maintaining the blockchain’s consensus and approving the transactions

• Individual miners organize themselves into a set of M mining pools

• Probability for pool i to mine a block can be expressed as

individual mining power fraction of miners

16

Page 17: Introduction to Blockchain and Applications of Game Theory

Mining Pool Selection

Problem Formulation

• if pool i mines a new block of length si, the total propagation time of that block is

• Probability of winning the mining

• Expected reward of a pool

17

block verification timepropagation time

Page 18: Introduction to Blockchain and Applications of Game Theory

Mining Pool Selection

Problem Formulation

• Players: Miners

• Strategy: Choosing mining pool

• Payoff:

• Replicator dynamics:

18

cost (energy)

reward

vector of population

average payoff

Page 19: Introduction to Blockchain and Applications of Game Theory

Mining Pool Selection

Some Results

• Two pools

19

Evolutionary Stable Strategy

The proof is based on Jacobian matrix

Page 20: Introduction to Blockchain and Applications of Game Theory

Mining Pool Selection

Some Results

• Convergence

20

Page 21: Introduction to Blockchain and Applications of Game Theory

Mining Pool Selection

Some Results

• Basin of Attraction

21

Page 22: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource

Management and Pricing for

Blockchain Networks

Stackelberg Game

22

Page 23: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

Stackelberg GameMotivations and Objectives

• Due to proof of work, computationally lightweight nodes such as the Internet of Things (IoT) devices may be prevented from directly participating in the consensus process

• “Cloud mining” becomes a viable option where the mobile devices offload their storage load and/or computation tasks in proof of workto the Cloud/Fog Providers

23

Page 24: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

Stackelberg GameMotivations and Objectives

24

Page 25: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

Stackelberg GameMotivations and Objectives

• We model the interactions between the rational blockchain miners and the cloud/fog provider as a two-stage Stackelberg game

• We study both the uniform pricing scheme and the discriminatory

pricing scheme for the cloud/fog provider

25

Page 26: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

Stackelberg GameGame Formulation

• Players: Cloud/fog provider (leader), N miners (followers)

• Strategy: Pricing (leader), service demand (followers)

• Solution: Stackelberg equilibrium

26

Page 27: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

Stackelberg GameGame Formulation

• Miner subgame (Lower Stage II)

27resource demand

Page 28: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

Stackelberg GameGame Formulation

• Miner subgame (Lower Stage II)

28

Page 29: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

Stackelberg GameGame Formulation

• Cloud/fog provider subgame (Upper Stage I)

29

total demand

resource cost

Page 30: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

Stackelberg GameGame Formulation

• Cloud/fog provider subgame (Upper Stage I)

30

Stackelberg Equilibrium

Page 31: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

Stackelberg GameResults

• Experiment

31

Page 32: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

Stackelberg GameResults

• Simulation

32

Page 33: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource

Management and Pricing for

Blockchain Networks

Auction

33

Page 34: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

AuctionMotivations and Objectives

• Shortcomings of Stackelberg game– Demand is continuous

– Cannot guarantee truthfulness

– Competing in obtaining computing resources

– Social welfare may not be maximized

– Lack of network effects factor

• Alternative: Auction

34

Page 35: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

AuctionMotivations and Objectives

• We formulate social welfare maximization problems for two bidding schemes: constant-demand scheme and multi-demand scheme

• We construct an optimal algorithm that achieves optimal social welfare

• Algorithm is designed to be truthful, individually rational and

computationally efficient

• We characterize network effects function to represent the relationship

between the security of the blockchain network and the total

computing resources invested into the network

35

Page 36: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

AuctionSystem Model

36

Page 37: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

AuctionProblem Formulation

• Social welfare maximization

37

demand/allocation

network effect

reward

cost

Page 38: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

AuctionResults

• Experiment

– We vary the CPU resources of the other miners, i.e., the sum of existing honest

miners’ computing resources, to measure the probability of successful attacks

– We then count the number of fake blocks which successfully join the chain every

10000 blocks generated

38

Page 39: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

AuctionResults

• Simulation

– Social welfare

39

Page 40: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource

Management and Pricing for

Blockchain Networks

(Auction with) Deep Learning

40

Page 41: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

(Auction with) Deep LearningMotivations and Objectives

• Shortcomings of traditional auction– Need to solve complex math

– Social welfare maximization vs profit maximization

– Rely on well quantified valuation

– Static

• Alternative: Deep learning

41

Auction

market

Seller

Buyers

Product/service

Bid

Internal

DatasetExternal

dataset

Market

strategy

Machine learning

Page 42: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

(Auction with) Deep LearningSystem Model

42

Page 43: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

(Auction with) Deep LearningPerformance Metrics

• Expected revenue/profit: The expected revenue R is the total price that

the provider receives from the miners, i.e., bidders

• Individual Rationality (IR) violation: IR violation happens if the auction

results in negative utility for any miner (bidder)

• Incentive Compatibility (IC) violation: IC of the auction guarantees that

every bidder achieves the highest utility just by submitting its truthful

bid (truthfulness)

43

Page 44: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

(Auction with) Deep LearningDesign

44

Page 45: Introduction to Blockchain and Applications of Game Theory

Cloud/Fog Computing Resource Management

(Auction with) Deep LearningResults

45

Page 46: Introduction to Blockchain and Applications of Game Theory

• 51% Attack

• Cyber insurance

• Proof of Stake

Future Directions

46

Page 47: Introduction to Blockchain and Applications of Game Theory

• Blockchain-based data management framework for energy market

Testbed and Experiment

PHEV chargers

Building with storage

Generators

Energy market

and

incentive mechanism

Smart grid

Building with

solar panel Building with

storage and

solar panel

Network and computing systems

Smart meter

Beaglebone

Embedded

system

Blockchain

agent

47

Demo Video

Page 48: Introduction to Blockchain and Applications of Game Theory

• Z. Xiong, S. Feng, D. Niyato, P. Wang, and Z. Han, "Optimal pricing-based edge

computing resource management in mobile blockchain," to be presented in IEEE

ICC, Kansas City, MO, USA, 20-24 May 2018.

• W. Wang, D. Niyato, P. Wang, and A. Leshem, "Decentralized caching for content

delivery based on blockchain: A game theoretic perspective," to be presented in

IEEE ICC, Kansas City, MO, USA, 20-24 May 2018.

• Y. Jiao, P. Wang, D. Niyato, and Z. Xiong, "Social welfare maximization auction in

edge computing resource allocation for mobile blockchain," to be presented in

IEEE ICC, Kansas City, MO, USA, 20-24 May 2018.

• N. C. Luong, Z. Xiong, P. Wang, and D. Niyato, "Optimal auction for edge

computing resource management in mobile blockchain networks: A deep learning

approach," to be presented in IEEE ICC, Kansas City, MO, USA, 20-24 May 2018.

• K. Suankaewmanee, D. T. Hoang, D. Niyato, S. Sawadsitang, P. Wang, and Z.

Han, "Performance analysis and application of mobile blockchain," to be presented

in International Conference on Computing, Networking and Communications

(ICNC), Maui, Hawaii, USA, March 5-8, 2018.

Further Materials

48