SlideShare a Scribd company logo
1 of 26
Download to read offline
Towards Agent-Oriented Blockchains:
Autonomous Smart Contracts
Giovanni Ciatto1 Alfredo Maffi1 Stefano Mariani2
Andrea Omicini1
giovanni.ciatto@unibo.it alfredo.maffi@studio.unibo.it
stefano.mariani@unimore.it andrea.omicini@unibo.it
1Dipartimento di Informatica – Scienza e Ingegneria—Universit`a di Bologna
2Dipartimento di Scienze e Metodi dell’Ingegneria, Universit`a di Modena e Reggio Emilia
17th International Conference on
Practical Applications of Agents and Multi-Agent Systems
´Avila, Spain – June 27, 2019
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 1 / 19
Outline
1 Blockchain and Smart Contracts: Overview
2 Why Agency is a Better Choice for Smart Contracts
3 Roadmap to Agency for Smart Contracts
4 Tenderfone: Our Prototype
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 2 / 19
Blockchain and Smart Contracts: Overview
Next in Line. . .
1 Blockchain and Smart Contracts: Overview
2 Why Agency is a Better Choice for Smart Contracts
3 Roadmap to Agency for Smart Contracts
4 Tenderfone: Our Prototype
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 3 / 19
Blockchain and Smart Contracts: Overview
Smart Contracts and Blockchain at a Glance
Shared, append-only, and distributed ledger of transactions
tracking changes to the state of some asset
Secured using cryptographic schemes & replication
Transactions are approved and propagated through consensus
Smart contracts (SC) if the tracked assets are reactive processes
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 4 / 19
Blockchain and Smart Contracts: Overview
Layered View of Blockchain Systems
Smart contracts
Interpreter
Consensus engine
Network
Users may deploy custom smart contracts
SC are executed by a replicated interpreter
Replicas kept consistent by consensus engine
e.g. middleware + consensus protocol
Research questions
Which is the current programming paradigm for SC?
Which is the best programming paradigm for SC?
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 5 / 19
Blockchain and Smart Contracts: Overview
Layered View of Blockchain Systems
Smart contracts
Interpreter
Consensus engine
Network
Users may deploy custom smart contracts
SC are executed by a replicated interpreter
Replicas kept consistent by consensus engine
e.g. middleware + consensus protocol
Research questions
Which is the current programming paradigm for SC?
Which is the best programming paradigm for SC?
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 5 / 19
Why Agency is a Better Choice for Smart Contracts
Next in Line. . .
1 Blockchain and Smart Contracts: Overview
2 Why Agency is a Better Choice for Smart Contracts
3 Roadmap to Agency for Smart Contracts
4 Tenderfone: Our Prototype
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 6 / 19
Why Agency is a Better Choice for Smart Contracts
Smart Contracts – Expectations vs. Reality
What they promise
autonomous entities
augmenting real world
contracts . . .
. . . with self-enforcing clauses
acting as trusted intermediaries
What they actually are
essentially objects, as in OOP
× no control flow encapsulation
× sync. method call
× purely reactive
+ blockchain limitations
× only finite computations
× only deterministic
computations
× no concurrency
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 7 / 19
Why Agency is a Better Choice for Smart Contracts
Smart Contracts – Expectations vs. Reality
What they promise
autonomous entities
augmenting real world
contracts . . .
. . . with self-enforcing clauses
acting as trusted intermediaries
What they actually are
essentially objects, as in OOP
× no control flow encapsulation
× sync. method call
× purely reactive
+ blockchain limitations
× only finite computations
× only deterministic
computations
× no concurrency
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 7 / 19
Why Agency is a Better Choice for Smart Contracts
Our Claim
Takeaway
SC would better match their intended goal if modelled as intelligent agents
through computational autonomy, SC would be able to enforce more
complex rules
rule enforcement steps through perception, deliberation, and action
inference capabilities may let SC autonomously figure out how to
enforce rules
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 8 / 19
Roadmap to Agency for Smart Contracts
Next in Line. . .
1 Blockchain and Smart Contracts: Overview
2 Why Agency is a Better Choice for Smart Contracts
3 Roadmap to Agency for Smart Contracts
4 Tenderfone: Our Prototype
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 9 / 19
Roadmap to Agency for Smart Contracts
Stairway to Agency – How Should SC Achieve Autonomy?
State-of-art
control flow

encapsulation
asynchronous

communication
reactiveness

to time
Tenderfone
reactiveness

to environment

and space
logic

inference
BDI

architecture
“Strong” agency
expressiveness
abstraction gap
Step 1: Computational and social autonomy
how to realise control flow encapsulation?
how to realise asynchronous communication among SC?
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 10 / 19
Roadmap to Agency for Smart Contracts
Stairway to Agency – How Should SC Achieve Autonomy?
State-of-art
control flow

encapsulation
asynchronous

communication
reactiveness

to time
Tenderfone
reactiveness

to environment

and space
logic

inference
BDI

architecture
“Strong” agency
expressiveness
abstraction gap
Step 2: Temporal situatedness
how to make SC time aware?
how to make SC time reactive?
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 10 / 19
Roadmap to Agency for Smart Contracts
Stairway to Agency – How Should SC Achieve Autonomy?
State-of-art
control flow

encapsulation
asynchronous

communication
reactiveness

to time
Tenderfone
reactiveness

to environment

and space
logic

inference
BDI

architecture
“Strong” agency
expressiveness
abstraction gap
Step 3: Spatial, environmental situatedness
how to model spatial situatedness?
how to model the environment?
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 10 / 19
Roadmap to Agency for Smart Contracts
Stairway to Agency – How Should SC Achieve Autonomy?
State-of-art
control flow

encapsulation
asynchronous

communication
reactiveness

to time
Tenderfone
reactiveness

to environment

and space
logic

inference
BDI

architecture
“Strong” agency
expressiveness
abstraction gap
Step 4: Inference capabilities
which sorts of inference may SC exploit?
on which knowledge bases?
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 10 / 19
Roadmap to Agency for Smart Contracts
Stairway to Agency – How Should SC Achieve Autonomy?
State-of-art
control flow

encapsulation
asynchronous

communication
reactiveness

to time
Tenderfone
reactiveness

to environment

and space
logic

inference
BDI

architecture
“Strong” agency
expressiveness
abstraction gap
Step 5: Goal-orientation (e.g. BDI)
how to model multiple intentions (i.e. multiple control flows)?
how to model perceptions, and actions?
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 10 / 19
Tenderfone: Our Prototype
Next in Line. . .
1 Blockchain and Smart Contracts: Overview
2 Why Agency is a Better Choice for Smart Contracts
3 Roadmap to Agency for Smart Contracts
4 Tenderfone: Our Prototype
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 11 / 19
Tenderfone: Our Prototype
Tenderfone
Autonomous, logic SC
Tenderfone
Tendermint + tuProlog
Network
Our prototype for a SC interpreter
realises step 1, 2, 4 of our roadmap
provides an interpreter for
computationally autonomous,
logic-based smart contracts
based on the Tendermint [Kwon, 2014]
consensus engine and the tuProlog
framework [Denti et al., 2001]
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 12 / 19
Tenderfone: Our Prototype
Tenderfone Smart Contracts API I
SC programs are Prolog theories, with facts, rules, and callbacks
e.g. init/1 or receive/2
callbacks are executed when particular triggering events occur
e.g. SC creation, users messages, SC messages
in callbacks, SC can send messages (even to self) through primitives
some primitives are for time-related control flow management
e.g. send/2, delay/2 or periodically/2
users can manulate / interact with SC through meta-primitives
e.g. invoke/2 or deploy/2
both primitives and meta-primitives have an asynchronous semantics
full-fledged Prolog standard lib + Dynamic KB as SC storage
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 13 / 19
Tenderfone: Our Prototype
Tenderfone Smart Contracts API II
Callback Executor
Triggering
(meta-)primitives
Initiator
init(A) SC with KB = T deploy(T, A) user
receive(M, S) SC R
invoke(M, R)
send(M, R)
user S
SC S
receive(M, R) SC R
when(T, M)
delay(D, M)
periodically(P, M)
SC R
SC R
SC R
+ contextual predicates
e.g. self/1 or now/1
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 14 / 19
Tenderfone: Our Prototype
SC Program Example
§
init([Delay | OtherArgs]) :-
now(Time),
Next is Time + Delay,
when(Next, foo).
receive(foo, Me) :-
self(Me),
periodically(10 min, bar).
receive(bar, Me) :-
/* does something
once every 10 min */.
receive(Message, Sender) :-
not self(Sender),
Answer = /* compute answer */,
send(Answer, Sender).
¦ ¥
U A B
deploy(Delay)
init([Delay])
when(Now + Delay, foo)
after Delay seconds
receive(foo, A)
periodically(10 min, bar)
once every 10 minutes
receive(bar, A)
do something periodic
in any moment
Message
receive(Message, B)
compute Answer
send(Answer, B)
Answer
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 15 / 19
Tenderfone: Our Prototype
Why is this Challenging? ! more details at [Ciatto et al., 2019]
. . .
Interpreter
Consensus engine
. . .
Common TX workflow
Client → Replicas → Consensus → SC
! each SC is replicated as well
Tenderfone strongly rely on spontaneous
TX generated by interpreters
spontaneous TX are critical w.r.t.
current BCT architectures
in theory, we re-modeled how the
interpreter and consensus engine layers
should interact
in practice, no edits to the Tendermint
internalsCiatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 16 / 19
Conclusions and Future Work
Conclusion
Summarising, we
discuss why SC would be better modelled as agents
provide a research roadmap driving SC towards agency
describe an API for logic-based, autonomous SC
prove it possible through a prototype implementation: Tenderfone
In the future, we plan to
model environment, perception, and actions for SC
realise SC as BDI-like agents
endow SC with higher-level coordination/synchronisation mechanisms
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 17 / 19
Conclusions and Future Work
Conclusion
Summarising, we
discuss why SC would be better modelled as agents
provide a research roadmap driving SC towards agency
describe an API for logic-based, autonomous SC
prove it possible through a prototype implementation: Tenderfone
In the future, we plan to
model environment, perception, and actions for SC
realise SC as BDI-like agents
endow SC with higher-level coordination/synchronisation mechanisms
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 17 / 19
References
References
Ciatto, G., Maffi, A., Mariani, S., and Omicini, A. (2019).
Smart contracts are more than objects: Pro-activeness on the blockchain.
Denti, E., Omicini, A., and Ricci, A. (2001).
tuProlog: A light-weight Prolog for Internet applications and infrastructures.
In Practical Aspects of Declarative Languages, volume 1990 of LNCS, pages
184–198. Springer.
Kwon, J. (2014).
Tendermint: Consensus without mining.
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 18 / 19
Towards Agent-Oriented Blockchains:
Autonomous Smart Contracts
Giovanni Ciatto1 Alfredo Maffi1 Stefano Mariani2
Andrea Omicini1
giovanni.ciatto@unibo.it alfredo.maffi@studio.unibo.it
stefano.mariani@unimore.it andrea.omicini@unibo.it
1Dipartimento di Informatica – Scienza e Ingegneria—Universit`a di Bologna
2Dipartimento di Scienze e Metodi dell’Ingegneria, Universit`a di Modena e Reggio Emilia
17th International Conference on
Practical Applications of Agents and Multi-Agent Systems
´Avila, Spain – June 27, 2019
Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 19 / 19

More Related Content

Similar to Towards Agent-oriented Blockchains: Autonomous Smart Contracts

Comparative Analysis of Blockchain Technologies under a Coordination Perspective
Comparative Analysis of Blockchain Technologies under a Coordination PerspectiveComparative Analysis of Blockchain Technologies under a Coordination Perspective
Comparative Analysis of Blockchain Technologies under a Coordination PerspectiveGiovanni Ciatto
 
SCL Annual Conference 2019: Regulating social media platforms for interoperab...
SCL Annual Conference 2019: Regulating social media platforms for interoperab...SCL Annual Conference 2019: Regulating social media platforms for interoperab...
SCL Annual Conference 2019: Regulating social media platforms for interoperab...Chris Marsden
 
A Framework for Cognitive Internet of Things based on Blockchain
A Framework for Cognitive Internet of Things based on BlockchainA Framework for Cognitive Internet of Things based on Blockchain
A Framework for Cognitive Internet of Things based on BlockchainKamran Gholizadeh HamlAbadi
 
Engineering Micro-intelligence at the Edge of CPCS: Design Guidelines
  Engineering Micro-intelligence at the Edge of CPCS: Design Guidelines  Engineering Micro-intelligence at the Edge of CPCS: Design Guidelines
Engineering Micro-intelligence at the Edge of CPCS: Design GuidelinesRoberta Calegari
 
ChainGang Webinar - Blockchain & Insurance: The end, or just the beginning?
ChainGang Webinar - Blockchain & Insurance: The end, or just the beginning?ChainGang Webinar - Blockchain & Insurance: The end, or just the beginning?
ChainGang Webinar - Blockchain & Insurance: The end, or just the beginning?The Digital Insurer
 
apidays LIVE London 2021 - Open Insurance & Smart Contracts by Giovanni Lesna...
apidays LIVE London 2021 - Open Insurance & Smart Contracts by Giovanni Lesna...apidays LIVE London 2021 - Open Insurance & Smart Contracts by Giovanni Lesna...
apidays LIVE London 2021 - Open Insurance & Smart Contracts by Giovanni Lesna...apidays
 
Towards XMAS: eXplainability through Multi-Agent Systems
Towards XMAS: eXplainability through Multi-Agent SystemsTowards XMAS: eXplainability through Multi-Agent Systems
Towards XMAS: eXplainability through Multi-Agent SystemsGiovanni Ciatto
 
RefugeeDo -A Hand to the Deserving.
RefugeeDo -A Hand to the Deserving.RefugeeDo -A Hand to the Deserving.
RefugeeDo -A Hand to the Deserving.IRJET Journal
 
건설 스타트업과 오픈소스
건설 스타트업과 오픈소스건설 스타트업과 오픈소스
건설 스타트업과 오픈소스Tae wook kang
 
seminar report on ambient intelligent
seminar report on ambient intelligentseminar report on ambient intelligent
seminar report on ambient intelligentAnkita Srivastava
 
SOFIA - Smart City: an Event Driven Architecture for Monitoring Public Spaces...
SOFIA - Smart City: an Event Driven Architecture for Monitoring Public Spaces...SOFIA - Smart City: an Event Driven Architecture for Monitoring Public Spaces...
SOFIA - Smart City: an Event Driven Architecture for Monitoring Public Spaces...Sofia Eu
 
IRJET- Smart Contracts for Insurance based on Hyperledger Fabric
IRJET-  	  Smart Contracts for Insurance based on Hyperledger FabricIRJET-  	  Smart Contracts for Insurance based on Hyperledger Fabric
IRJET- Smart Contracts for Insurance based on Hyperledger FabricIRJET Journal
 
A Self-organized Framework for Insurance Based on Internet of Things and Bloc...
A Self-organized Framework for Insurance Based on Internet of Things and Bloc...A Self-organized Framework for Insurance Based on Internet of Things and Bloc...
A Self-organized Framework for Insurance Based on Internet of Things and Bloc...Kamran Gholizadeh HamlAbadi
 
Prepare to be disrupted
Prepare to be disruptedPrepare to be disrupted
Prepare to be disruptedMark Albala
 
Blockchain & Smart Contracts Basics and Perspectives for MAS
Blockchain & Smart Contracts Basics and Perspectives for MASBlockchain & Smart Contracts Basics and Perspectives for MAS
Blockchain & Smart Contracts Basics and Perspectives for MASGiovanni Ciatto
 
IoT, arquitectura de solución y cómo enriquecerlo con Confluent
IoT, arquitectura de solución y cómo enriquecerlo con ConfluentIoT, arquitectura de solución y cómo enriquecerlo con Confluent
IoT, arquitectura de solución y cómo enriquecerlo con Confluentmimacom
 
Robotic Vehicle Movement with Webcam Operated by Cell Phone
Robotic Vehicle Movement with Webcam Operated by Cell PhoneRobotic Vehicle Movement with Webcam Operated by Cell Phone
Robotic Vehicle Movement with Webcam Operated by Cell PhoneIRJET Journal
 
Algorithms and-colllusion-competition-policy-in-the-digital-age
Algorithms and-colllusion-competition-policy-in-the-digital-ageAlgorithms and-colllusion-competition-policy-in-the-digital-age
Algorithms and-colllusion-competition-policy-in-the-digital-ageGiuliano Tavaroli
 

Similar to Towards Agent-oriented Blockchains: Autonomous Smart Contracts (20)

Comparative Analysis of Blockchain Technologies under a Coordination Perspective
Comparative Analysis of Blockchain Technologies under a Coordination PerspectiveComparative Analysis of Blockchain Technologies under a Coordination Perspective
Comparative Analysis of Blockchain Technologies under a Coordination Perspective
 
SCL Annual Conference 2019: Regulating social media platforms for interoperab...
SCL Annual Conference 2019: Regulating social media platforms for interoperab...SCL Annual Conference 2019: Regulating social media platforms for interoperab...
SCL Annual Conference 2019: Regulating social media platforms for interoperab...
 
A Framework for Cognitive Internet of Things based on Blockchain
A Framework for Cognitive Internet of Things based on BlockchainA Framework for Cognitive Internet of Things based on Blockchain
A Framework for Cognitive Internet of Things based on Blockchain
 
Engineering Micro-intelligence at the Edge of CPCS: Design Guidelines
  Engineering Micro-intelligence at the Edge of CPCS: Design Guidelines  Engineering Micro-intelligence at the Edge of CPCS: Design Guidelines
Engineering Micro-intelligence at the Edge of CPCS: Design Guidelines
 
Paper02
Paper02Paper02
Paper02
 
ChainGang Webinar - Blockchain & Insurance: The end, or just the beginning?
ChainGang Webinar - Blockchain & Insurance: The end, or just the beginning?ChainGang Webinar - Blockchain & Insurance: The end, or just the beginning?
ChainGang Webinar - Blockchain & Insurance: The end, or just the beginning?
 
apidays LIVE London 2021 - Open Insurance & Smart Contracts by Giovanni Lesna...
apidays LIVE London 2021 - Open Insurance & Smart Contracts by Giovanni Lesna...apidays LIVE London 2021 - Open Insurance & Smart Contracts by Giovanni Lesna...
apidays LIVE London 2021 - Open Insurance & Smart Contracts by Giovanni Lesna...
 
Towards XMAS: eXplainability through Multi-Agent Systems
Towards XMAS: eXplainability through Multi-Agent SystemsTowards XMAS: eXplainability through Multi-Agent Systems
Towards XMAS: eXplainability through Multi-Agent Systems
 
IoT4BPMers
IoT4BPMersIoT4BPMers
IoT4BPMers
 
RefugeeDo -A Hand to the Deserving.
RefugeeDo -A Hand to the Deserving.RefugeeDo -A Hand to the Deserving.
RefugeeDo -A Hand to the Deserving.
 
건설 스타트업과 오픈소스
건설 스타트업과 오픈소스건설 스타트업과 오픈소스
건설 스타트업과 오픈소스
 
seminar report on ambient intelligent
seminar report on ambient intelligentseminar report on ambient intelligent
seminar report on ambient intelligent
 
SOFIA - Smart City: an Event Driven Architecture for Monitoring Public Spaces...
SOFIA - Smart City: an Event Driven Architecture for Monitoring Public Spaces...SOFIA - Smart City: an Event Driven Architecture for Monitoring Public Spaces...
SOFIA - Smart City: an Event Driven Architecture for Monitoring Public Spaces...
 
IRJET- Smart Contracts for Insurance based on Hyperledger Fabric
IRJET-  	  Smart Contracts for Insurance based on Hyperledger FabricIRJET-  	  Smart Contracts for Insurance based on Hyperledger Fabric
IRJET- Smart Contracts for Insurance based on Hyperledger Fabric
 
A Self-organized Framework for Insurance Based on Internet of Things and Bloc...
A Self-organized Framework for Insurance Based on Internet of Things and Bloc...A Self-organized Framework for Insurance Based on Internet of Things and Bloc...
A Self-organized Framework for Insurance Based on Internet of Things and Bloc...
 
Prepare to be disrupted
Prepare to be disruptedPrepare to be disrupted
Prepare to be disrupted
 
Blockchain & Smart Contracts Basics and Perspectives for MAS
Blockchain & Smart Contracts Basics and Perspectives for MASBlockchain & Smart Contracts Basics and Perspectives for MAS
Blockchain & Smart Contracts Basics and Perspectives for MAS
 
IoT, arquitectura de solución y cómo enriquecerlo con Confluent
IoT, arquitectura de solución y cómo enriquecerlo con ConfluentIoT, arquitectura de solución y cómo enriquecerlo con Confluent
IoT, arquitectura de solución y cómo enriquecerlo con Confluent
 
Robotic Vehicle Movement with Webcam Operated by Cell Phone
Robotic Vehicle Movement with Webcam Operated by Cell PhoneRobotic Vehicle Movement with Webcam Operated by Cell Phone
Robotic Vehicle Movement with Webcam Operated by Cell Phone
 
Algorithms and-colllusion-competition-policy-in-the-digital-age
Algorithms and-colllusion-competition-policy-in-the-digital-ageAlgorithms and-colllusion-competition-policy-in-the-digital-age
Algorithms and-colllusion-competition-policy-in-the-digital-age
 

More from Giovanni Ciatto

An Abstract Framework for Agent-Based Explanations in AI
An Abstract Framework for Agent-Based Explanations in AIAn Abstract Framework for Agent-Based Explanations in AI
An Abstract Framework for Agent-Based Explanations in AIGiovanni Ciatto
 
2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in Kotlin2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in KotlinGiovanni Ciatto
 
TuSoW: Tuple Spaces for Edge Computing
TuSoW: Tuple Spaces for Edge ComputingTuSoW: Tuple Spaces for Edge Computing
TuSoW: Tuple Spaces for Edge ComputingGiovanni Ciatto
 
Logic Programming in Space-Time: The Case of Situatedness in LPaaS
Logic Programming in Space-Time: The Case of Situatedness in LPaaSLogic Programming in Space-Time: The Case of Situatedness in LPaaS
Logic Programming in Space-Time: The Case of Situatedness in LPaaSGiovanni Ciatto
 
A gentle introduction to the Blockchain and Smart Contracts
A gentle introduction to the Blockchain and Smart ContractsA gentle introduction to the Blockchain and Smart Contracts
A gentle introduction to the Blockchain and Smart ContractsGiovanni Ciatto
 
Introduzione alla Blockchain
Introduzione alla BlockchainIntroduzione alla Blockchain
Introduzione alla BlockchainGiovanni Ciatto
 

More from Giovanni Ciatto (6)

An Abstract Framework for Agent-Based Explanations in AI
An Abstract Framework for Agent-Based Explanations in AIAn Abstract Framework for Agent-Based Explanations in AI
An Abstract Framework for Agent-Based Explanations in AI
 
2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in Kotlin2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in Kotlin
 
TuSoW: Tuple Spaces for Edge Computing
TuSoW: Tuple Spaces for Edge ComputingTuSoW: Tuple Spaces for Edge Computing
TuSoW: Tuple Spaces for Edge Computing
 
Logic Programming in Space-Time: The Case of Situatedness in LPaaS
Logic Programming in Space-Time: The Case of Situatedness in LPaaSLogic Programming in Space-Time: The Case of Situatedness in LPaaS
Logic Programming in Space-Time: The Case of Situatedness in LPaaS
 
A gentle introduction to the Blockchain and Smart Contracts
A gentle introduction to the Blockchain and Smart ContractsA gentle introduction to the Blockchain and Smart Contracts
A gentle introduction to the Blockchain and Smart Contracts
 
Introduzione alla Blockchain
Introduzione alla BlockchainIntroduzione alla Blockchain
Introduzione alla Blockchain
 

Recently uploaded

Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Personfurqan222004
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 

Recently uploaded (20)

Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Person
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 

Towards Agent-oriented Blockchains: Autonomous Smart Contracts

  • 1. Towards Agent-Oriented Blockchains: Autonomous Smart Contracts Giovanni Ciatto1 Alfredo Maffi1 Stefano Mariani2 Andrea Omicini1 giovanni.ciatto@unibo.it alfredo.maffi@studio.unibo.it stefano.mariani@unimore.it andrea.omicini@unibo.it 1Dipartimento di Informatica – Scienza e Ingegneria—Universit`a di Bologna 2Dipartimento di Scienze e Metodi dell’Ingegneria, Universit`a di Modena e Reggio Emilia 17th International Conference on Practical Applications of Agents and Multi-Agent Systems ´Avila, Spain – June 27, 2019 Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 1 / 19
  • 2. Outline 1 Blockchain and Smart Contracts: Overview 2 Why Agency is a Better Choice for Smart Contracts 3 Roadmap to Agency for Smart Contracts 4 Tenderfone: Our Prototype Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 2 / 19
  • 3. Blockchain and Smart Contracts: Overview Next in Line. . . 1 Blockchain and Smart Contracts: Overview 2 Why Agency is a Better Choice for Smart Contracts 3 Roadmap to Agency for Smart Contracts 4 Tenderfone: Our Prototype Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 3 / 19
  • 4. Blockchain and Smart Contracts: Overview Smart Contracts and Blockchain at a Glance Shared, append-only, and distributed ledger of transactions tracking changes to the state of some asset Secured using cryptographic schemes & replication Transactions are approved and propagated through consensus Smart contracts (SC) if the tracked assets are reactive processes Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 4 / 19
  • 5. Blockchain and Smart Contracts: Overview Layered View of Blockchain Systems Smart contracts Interpreter Consensus engine Network Users may deploy custom smart contracts SC are executed by a replicated interpreter Replicas kept consistent by consensus engine e.g. middleware + consensus protocol Research questions Which is the current programming paradigm for SC? Which is the best programming paradigm for SC? Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 5 / 19
  • 6. Blockchain and Smart Contracts: Overview Layered View of Blockchain Systems Smart contracts Interpreter Consensus engine Network Users may deploy custom smart contracts SC are executed by a replicated interpreter Replicas kept consistent by consensus engine e.g. middleware + consensus protocol Research questions Which is the current programming paradigm for SC? Which is the best programming paradigm for SC? Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 5 / 19
  • 7. Why Agency is a Better Choice for Smart Contracts Next in Line. . . 1 Blockchain and Smart Contracts: Overview 2 Why Agency is a Better Choice for Smart Contracts 3 Roadmap to Agency for Smart Contracts 4 Tenderfone: Our Prototype Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 6 / 19
  • 8. Why Agency is a Better Choice for Smart Contracts Smart Contracts – Expectations vs. Reality What they promise autonomous entities augmenting real world contracts . . . . . . with self-enforcing clauses acting as trusted intermediaries What they actually are essentially objects, as in OOP × no control flow encapsulation × sync. method call × purely reactive + blockchain limitations × only finite computations × only deterministic computations × no concurrency Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 7 / 19
  • 9. Why Agency is a Better Choice for Smart Contracts Smart Contracts – Expectations vs. Reality What they promise autonomous entities augmenting real world contracts . . . . . . with self-enforcing clauses acting as trusted intermediaries What they actually are essentially objects, as in OOP × no control flow encapsulation × sync. method call × purely reactive + blockchain limitations × only finite computations × only deterministic computations × no concurrency Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 7 / 19
  • 10. Why Agency is a Better Choice for Smart Contracts Our Claim Takeaway SC would better match their intended goal if modelled as intelligent agents through computational autonomy, SC would be able to enforce more complex rules rule enforcement steps through perception, deliberation, and action inference capabilities may let SC autonomously figure out how to enforce rules Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 8 / 19
  • 11. Roadmap to Agency for Smart Contracts Next in Line. . . 1 Blockchain and Smart Contracts: Overview 2 Why Agency is a Better Choice for Smart Contracts 3 Roadmap to Agency for Smart Contracts 4 Tenderfone: Our Prototype Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 9 / 19
  • 12. Roadmap to Agency for Smart Contracts Stairway to Agency – How Should SC Achieve Autonomy? State-of-art control flow
 encapsulation asynchronous
 communication reactiveness
 to time Tenderfone reactiveness
 to environment
 and space logic
 inference BDI
 architecture “Strong” agency expressiveness abstraction gap Step 1: Computational and social autonomy how to realise control flow encapsulation? how to realise asynchronous communication among SC? Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 10 / 19
  • 13. Roadmap to Agency for Smart Contracts Stairway to Agency – How Should SC Achieve Autonomy? State-of-art control flow
 encapsulation asynchronous
 communication reactiveness
 to time Tenderfone reactiveness
 to environment
 and space logic
 inference BDI
 architecture “Strong” agency expressiveness abstraction gap Step 2: Temporal situatedness how to make SC time aware? how to make SC time reactive? Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 10 / 19
  • 14. Roadmap to Agency for Smart Contracts Stairway to Agency – How Should SC Achieve Autonomy? State-of-art control flow
 encapsulation asynchronous
 communication reactiveness
 to time Tenderfone reactiveness
 to environment
 and space logic
 inference BDI
 architecture “Strong” agency expressiveness abstraction gap Step 3: Spatial, environmental situatedness how to model spatial situatedness? how to model the environment? Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 10 / 19
  • 15. Roadmap to Agency for Smart Contracts Stairway to Agency – How Should SC Achieve Autonomy? State-of-art control flow
 encapsulation asynchronous
 communication reactiveness
 to time Tenderfone reactiveness
 to environment
 and space logic
 inference BDI
 architecture “Strong” agency expressiveness abstraction gap Step 4: Inference capabilities which sorts of inference may SC exploit? on which knowledge bases? Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 10 / 19
  • 16. Roadmap to Agency for Smart Contracts Stairway to Agency – How Should SC Achieve Autonomy? State-of-art control flow
 encapsulation asynchronous
 communication reactiveness
 to time Tenderfone reactiveness
 to environment
 and space logic
 inference BDI
 architecture “Strong” agency expressiveness abstraction gap Step 5: Goal-orientation (e.g. BDI) how to model multiple intentions (i.e. multiple control flows)? how to model perceptions, and actions? Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 10 / 19
  • 17. Tenderfone: Our Prototype Next in Line. . . 1 Blockchain and Smart Contracts: Overview 2 Why Agency is a Better Choice for Smart Contracts 3 Roadmap to Agency for Smart Contracts 4 Tenderfone: Our Prototype Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 11 / 19
  • 18. Tenderfone: Our Prototype Tenderfone Autonomous, logic SC Tenderfone Tendermint + tuProlog Network Our prototype for a SC interpreter realises step 1, 2, 4 of our roadmap provides an interpreter for computationally autonomous, logic-based smart contracts based on the Tendermint [Kwon, 2014] consensus engine and the tuProlog framework [Denti et al., 2001] Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 12 / 19
  • 19. Tenderfone: Our Prototype Tenderfone Smart Contracts API I SC programs are Prolog theories, with facts, rules, and callbacks e.g. init/1 or receive/2 callbacks are executed when particular triggering events occur e.g. SC creation, users messages, SC messages in callbacks, SC can send messages (even to self) through primitives some primitives are for time-related control flow management e.g. send/2, delay/2 or periodically/2 users can manulate / interact with SC through meta-primitives e.g. invoke/2 or deploy/2 both primitives and meta-primitives have an asynchronous semantics full-fledged Prolog standard lib + Dynamic KB as SC storage Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 13 / 19
  • 20. Tenderfone: Our Prototype Tenderfone Smart Contracts API II Callback Executor Triggering (meta-)primitives Initiator init(A) SC with KB = T deploy(T, A) user receive(M, S) SC R invoke(M, R) send(M, R) user S SC S receive(M, R) SC R when(T, M) delay(D, M) periodically(P, M) SC R SC R SC R + contextual predicates e.g. self/1 or now/1 Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 14 / 19
  • 21. Tenderfone: Our Prototype SC Program Example § init([Delay | OtherArgs]) :- now(Time), Next is Time + Delay, when(Next, foo). receive(foo, Me) :- self(Me), periodically(10 min, bar). receive(bar, Me) :- /* does something once every 10 min */. receive(Message, Sender) :- not self(Sender), Answer = /* compute answer */, send(Answer, Sender). ¦ ¥ U A B deploy(Delay) init([Delay]) when(Now + Delay, foo) after Delay seconds receive(foo, A) periodically(10 min, bar) once every 10 minutes receive(bar, A) do something periodic in any moment Message receive(Message, B) compute Answer send(Answer, B) Answer Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 15 / 19
  • 22. Tenderfone: Our Prototype Why is this Challenging? ! more details at [Ciatto et al., 2019] . . . Interpreter Consensus engine . . . Common TX workflow Client → Replicas → Consensus → SC ! each SC is replicated as well Tenderfone strongly rely on spontaneous TX generated by interpreters spontaneous TX are critical w.r.t. current BCT architectures in theory, we re-modeled how the interpreter and consensus engine layers should interact in practice, no edits to the Tendermint internalsCiatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 16 / 19
  • 23. Conclusions and Future Work Conclusion Summarising, we discuss why SC would be better modelled as agents provide a research roadmap driving SC towards agency describe an API for logic-based, autonomous SC prove it possible through a prototype implementation: Tenderfone In the future, we plan to model environment, perception, and actions for SC realise SC as BDI-like agents endow SC with higher-level coordination/synchronisation mechanisms Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 17 / 19
  • 24. Conclusions and Future Work Conclusion Summarising, we discuss why SC would be better modelled as agents provide a research roadmap driving SC towards agency describe an API for logic-based, autonomous SC prove it possible through a prototype implementation: Tenderfone In the future, we plan to model environment, perception, and actions for SC realise SC as BDI-like agents endow SC with higher-level coordination/synchronisation mechanisms Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 17 / 19
  • 25. References References Ciatto, G., Maffi, A., Mariani, S., and Omicini, A. (2019). Smart contracts are more than objects: Pro-activeness on the blockchain. Denti, E., Omicini, A., and Ricci, A. (2001). tuProlog: A light-weight Prolog for Internet applications and infrastructures. In Practical Aspects of Declarative Languages, volume 1990 of LNCS, pages 184–198. Springer. Kwon, J. (2014). Tendermint: Consensus without mining. Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 18 / 19
  • 26. Towards Agent-Oriented Blockchains: Autonomous Smart Contracts Giovanni Ciatto1 Alfredo Maffi1 Stefano Mariani2 Andrea Omicini1 giovanni.ciatto@unibo.it alfredo.maffi@studio.unibo.it stefano.mariani@unimore.it andrea.omicini@unibo.it 1Dipartimento di Informatica – Scienza e Ingegneria—Universit`a di Bologna 2Dipartimento di Scienze e Metodi dell’Ingegneria, Universit`a di Modena e Reggio Emilia 17th International Conference on Practical Applications of Agents and Multi-Agent Systems ´Avila, Spain – June 27, 2019 Ciatto et al. (UniBo, UniMoRe) Autonomous Smart Contracts PAAMS 2019, Jun 27 19 / 19