Decentralized Execution of Smart Contracts: Agent Model Perspective - - PowerPoint PPT Presentation

decentralized execution of smart contracts agent model
SMART_READER_LITE
LIVE PREVIEW

Decentralized Execution of Smart Contracts: Agent Model Perspective - - PowerPoint PPT Presentation

Introduction of the problem Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications Weidong Shi joint work with Lin Chen, Lei Xu, Nolan Shah, Zhimin Gao, and Yang Lu University of Houston 1st Workshop on


slide-1
SLIDE 1

Introduction of the problem

Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications

Weidong Shi joint work with Lin Chen, Lei Xu, Nolan Shah, Zhimin Gao, and Yang Lu

University of Houston

1st Workshop on Trusted Smart Contract Malta, April, 2017

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 1/25

slide-2
SLIDE 2

Introduction of the problem

Background

What is a blockchain?

Shared, replicated, ledger.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 2/25

slide-3
SLIDE 3

Introduction of the problem

Background

A chain of blocks of transactions - examples including:

Bitcoin NXT Ethereum ...

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 3/25

slide-4
SLIDE 4

Introduction of the problem

Background

Crypto ledgers (e.g., Ethereum, Hyperledger) aim at supporting “smart contracts”. Definition A smart contract is a set of promises, specified in a digital form, including protocols within which the parties perform on these promises.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 4/25

slide-5
SLIDE 5

Introduction of the problem

Background

Another definition: Definition A smart contract is an event driven program, with state, which runs on a replicated, shared ledger and which can take custody over assets

  • n that ledger [Swanson2015].

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 5/25

slide-6
SLIDE 6

Introduction of the problem

Background

Abstract smart contract model:

Shared public ledger Replicated states (smart contracts) Using crypto-currency rewarding contract execution Contracts involving financial gains or losses Event driven Consensus based (smart contract execution) Participants are not trusted Inter-dependent contracts

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 6/25

slide-7
SLIDE 7

Introduction of the problem

Background

A simple example of a smart contract.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 7/25

slide-8
SLIDE 8

Introduction of the problem

Background

A simple example of a smart contract.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 8/25

slide-9
SLIDE 9

Introduction of the problem

Background

Shared Ledger Smart Contract Value State Smart Contract Value State Smart Contract Value State

Events Trasactions Events Trasactions Events Trasactions Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 9/25

slide-10
SLIDE 10

Introduction of the problem

Background

Execution of a smart contract can be tricky:

The amount of crypto-currency involved in a contract may be many times and significantly higher than the cost of running the contract itself.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 10/25

slide-11
SLIDE 11

Introduction of the problem

Background

Execution of a smart contract can be tricky:

The amount of crypto-currency involved in a contract may be many times and significantly higher than the cost of running the contract itself.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 11/25

slide-12
SLIDE 12

Introduction of the problem

Background

Execution of a smart contract can be tricky:

The amount of crypto-currency involved in a contract may be many times and significantly higher than the cost of running the contract itself.

If the random dice returns 1, Alice has the incentive of lying.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 12/25

slide-13
SLIDE 13

Introduction of the problem

Background

Execution of a smart contract can be tricky:

The amount of crypto-currency involved in a contract may be many times and significantly higher than the cost of running the contract itself. If a significant portion of users in system are directly or indirectly involved in a smart contract, then this smart contract might not get executed correctly.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 13/25

slide-14
SLIDE 14

Introduction of the problem

The problem

A game theoretical model (smart contract participants and execution nodes are agents):

N players (users in the system)

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 14/25

slide-15
SLIDE 15

Introduction of the problem

The problem

A game theoretical model (smart contract participants and execution nodes are agents):

N players (users in the system) Weight wj for user j (indicating the potential of manipulating the result)

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 14/25

slide-16
SLIDE 16

Introduction of the problem

The problem

A game theoretical model (smart contract participants and execution nodes are agents):

N players (users in the system) Weight wj for user j (indicating the potential of manipulating the result)

The computation power in a proof-of-work system The number of stakes in a proof-of-stake system ...

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 14/25

slide-17
SLIDE 17

Introduction of the problem

The problem

A game theoretical model (smart contract participants and execution nodes are agents):

N players (users in the system) Weight wj for user j (indicating the potential of manipulating the result)

The computation power in a proof-of-work system The number of stakes in a proof-of-stake system ...

Possible states Si

If Si occurs, the payoff of user j is zi

j

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 14/25

slide-18
SLIDE 18

Introduction of the problem

The problem

A game theoretical model (smart contract participants and execution nodes are agents):

N players (users in the system) Weight wj for user j (indicating the potential of manipulating the result)

The computation power in a proof-of-work system The number of stakes in a proof-of-stake system ...

Possible states Si

If Si occurs, the payoff of user j is zi

j

Users “vote” to reach a consensus on the correct state

Byzantine: broadcast a certain state Longest chain: adding blocks after a specific chain ...

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 14/25

slide-19
SLIDE 19

Introduction of the problem

The problem

A game theoretical model (smart contract participants and execution nodes are agents):

N players (users in the system) Weight wj for user j (indicating the potential of manipulating the result)

The computation power in a proof-of-work system The number of stakes in a proof-of-stake system ...

Possible states Si

If Si occurs, the payoff of user j is zi

j

Users “vote” to reach a consensus on the correct state

Byzantine: broadcast a certain state Longest chain: adding blocks after a specific chain ...

A state receiving αW votes in weight wins

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 14/25

slide-20
SLIDE 20

Introduction of the problem

The problem

Q: Can we prevent users from lying when they vote?

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 15/25

slide-21
SLIDE 21

Introduction of the problem

Our contribution

In general, lying can not be prevented. Lemma Voting for the state that a user prefers the most is his/her dominant strategy.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 16/25

slide-22
SLIDE 22

Introduction of the problem

Our contribution

In general, lying can not be prevented. Lemma Voting for the state that a user prefers the most is his/her dominant strategy. Can we discourage users from lying by adding punishment?

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 17/25

slide-23
SLIDE 23

Introduction of the problem

Our contribution

The system can impose a penalty on a user if his/her vote is different from the accepted state. Theorem In the agent model with penalty, if j is superrational and knows that

  • k∈U wk ≥ αW, then no matter how high the penalty is, j will always

lie.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 18/25

slide-24
SLIDE 24

Introduction of the problem

Our contribution

The classical game theory seems to lead us nowhere...

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 19/25

slide-25
SLIDE 25

Introduction of the problem

Our contribution

The classical game theory seems to lead us nowhere... But rationality or superrationality is questionable.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 19/25

slide-26
SLIDE 26

Introduction of the problem

Irrational behaviors

Centipede game:

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 20/25

slide-27
SLIDE 27

Introduction of the problem

Irrational behaviors

Centipede game:

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 21/25

slide-28
SLIDE 28

Introduction of the problem

Irrational behaviors

Centipede game

The game lasts for a fixed number of rounds, which is known to both players. A rational player chooses to take the larger pile and the game ends

  • immediately. Only 15% players choose to do so in experiments.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 22/25

slide-29
SLIDE 29

Introduction of the problem

Our contribution

In our problem, the situation changes when irrationality is taken into consideration.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 23/25

slide-30
SLIDE 30

Introduction of the problem

Our contribution

In our problem, the situation changes when irrationality is taken into consideration. Theorem In the agent model with penalty, if users do not fully believe in the rationality of others, then a mechanism with penalty can be designed such that users do not lie in voting.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 24/25

slide-31
SLIDE 31

Introduction of the problem

Conclusion

We consider smart contract execution in a blockchain based system and propose an agent model.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 25/25

slide-32
SLIDE 32

Introduction of the problem

Conclusion

We consider smart contract execution in a blockchain based system and propose an agent model. Truthfulness of users can not be achieved if rationality or superrationality is assumed, even if penalty is introduced.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 25/25

slide-33
SLIDE 33

Introduction of the problem

Conclusion

We consider smart contract execution in a blockchain based system and propose an agent model. Truthfulness of users can not be achieved if rationality or superrationality is assumed, even if penalty is introduced. Truthfulness of users can be achieved with a carefully designed penalty, if irrationality is assumed.

Weidong Shi Decentralized Execution of Smart Contracts: Agent Model Perspective and Its Implications 25/25