SlideShare ist ein Scribd-Unternehmen logo
1 von 65
Smart Contracts that Learn
Mike Slinn
April 3, 2018
Global Blockchain Conference
cryptocourses.tech
About Mike Slinn
• Distinguished engineer
• Contributor to Ethereum Java and Scala libraries
• Operates ScalaCourses.com
• Publisher of Java / Node.js Ethereum courses
(www.cryptocourses.tech)
• Author of EmpathyWorks (artificial personality)
• Expert witness
• Twitter: mslinn
Key Facts about Mike Slinn
• Focuses on generating business value by
applying people, process and technology
• Wrote 3 books on distributed computing
• Created hundreds of online lectures on
advanced computing concepts
• Uses many computer languages (“polyglot”)
In 10 Years
(2028)
The most popular language or framework used
to write smart contracts in 10 years probably
has not been conceived of yet.
-- Mike Slinn, March 3, 2018 --
Machine Learning & Smart Contracts
• Machine learning (ML) will be commonly used
with smart contracts in 10 years.
• Highly specialized languages will evolve to
define and verify contracts in various industries.
• ML will have features added to guarantee
deterministic results for decentralized apps.
• Security will surely have to improve
Espionage
• In 10 years time corporate and nation/state
espionage will include:
o Sabotaging training data
o Spoofing smart contract events
o Seeding smart contract templates with security
weaknesses
Newspaper Style
Key Takeaways
Dogma and ideology are not good for business
Dial Back the Koolaid
Confession
Onchain smart contracts cannot actually learn
However, these can learn:
• User interfaces for on-chain distributed applications
(ĐApps)
• Oracles
• Gateway contracts
• Off-chain smart contracts (systems integrated via json-
rpc)
On/Off Chain Computation
Geth
Parity
etc
Beware Non-Deterministic Behavior
• Blockchain requires determinism for consensus
• An AI-driven product may not have deterministic
behavior and may produce counter-intuitive
results
• A personalized recommender system may
produce different results for a user action after
learning additional preferences
ML is Currently Offchain
ML is currently centralized offchain, because
significant computation and storage are
required
• Centralized, offchain processes can respond
to onchain events and initiate activity via
json-rpc or IPC to Ethereum clients
• ML likely not decentralized for several years
‘Decentralization’ is Misleading
• Decentralization uses consensus before
output is accepted from multiple EVMs, which
then leads to transactions.
• Centralization does not use consensus; note
that the web3 definition of centralization
includes distributed applications that employ
DNS with geolocation routing and failover.
Security Issues
• Discussion later in this talk
o Features/Complexity versus Security
o Solidity is misnamed
Solidity is Not Required
• Centralization is optional
• System integration strategies
o ML systems can indirectly interact with the blockchain
using json-rpc or IPC to an Ethereum client such as
geth or Parity
o Native apps can combine ML with blockchain
• Application decentralization is optional
• Solidity is optional
Issues With Solidity:
• Primitive type system.
• Compiler bugs (more surely exist).
• Few software tools available.
• Expensive to work with.
• Very expensive to maintain.
• Shelf life for this technology will be short.
Avoid Solidity If Possible
• Write the smart contract in the language of your
choice, and use json-rpc calls as desired.
• Resulting code will be well understood by all.
• Audits will be more reliable.
• Costs will be much less using a common
language instead of Solidity.
• Talent will be much easier to find.
Ethereum Is Not Symmetric
• Onchain smart contracts are distributed and
use consensus
• Offchain smart contracts (using Ethereum
clients) are centralized and do not use
consensus
• This will likely evolve over the next several
years
Transpiling
• Process of converting a program written in one
language into another language.
• Solidity could be transpiled to json-rpc calls from
node.js and JVM languages (Java, Scala,
JRuby, Jython, Groovy, etc).
• … but don’t bother because you endure all the
problems with Solidity and get none of the
benefits of native contracts
Use Cases
With Architecture Diagrams
Self-Optimizing Contracts
• Optimize transactions for greatest margin,
minimal waste, constant deal flow, or other
criteria
• Results would improve over time
• This is an onchain example
Genetic algorithms
Evolution strategies
Evolutionary programming
Simulated annealing
Gaussian adaptation
Hill climbing
Swarm intelligence
Integer linear programming
Fraudulent Event Detection
• Smart contracts currently act on all events
• Fraud detection often employs machine
learning
• Incorporating ML into smart contracts could
make them resistant to fraud
• This is an onchain example
Automated Customer Service Agents
• Chatbots and voice interfaces (Alexa)
• Much more natural to use
• Can be built into devices
• This is an onchain example
Geth
Parity
etc
Medical Diagnosis Expert System
• Smart contract mediates access to an expert system
(oracle, incorporates machine learning)
• Accepts anonymous patient data
• Passes data to an expert system that performs analysis
• Returns diagnostic results
• Charges for the service
• This is an offchain example
Geth
Parity
etc
Supply Chain
• SOLIDITY IS NOT REQUIRED
• Native application (JVM, .NET, C++, whatever)
uses json-rpc to interact with the blockchain
• Solidity could be transpiled to json-rpc calls, but
don’t bother as previously discussed
• This is an offchain example
Supply Chain
Node.js
Java
Scala
Jython
JRuby
C
C++
C#
F#
Geth
Parity
etc
Contracts
Traditional Contracts…
• Outline the terms of a relationship
• According to a specific jurisdiction
• So that the specified government can enforce
the terms
Smart Contracts…
• Enable rule-based autonomous actions in
response to events.
• Work within and between organizations and
the rest of society, world-wide.
Smart Contracts Threaten Tradition
• Enforce a relationship with cryptographic
code
• Without regard to the jurisdiction of any
government
System Integration
• Collecting inputs and outputs to smart
contracts requires system integration.
• Approaches to system integration vary widely
according to the nature of the input sources,
output destinations, volumes of data, required
reliability, fairness (near-constant latency),
etc.
Smart Contracts …
• Also known as cryptocontracts
• Are computer programs
• Directly control the transfer of blockchain-based
digital currencies or assets
• Define the rules and penalties for an agreement
• Might automatically enforce those obligations
Smart Contract Capabilities
Manage relationship between parties by:
• Maintaining virtual ledgers
• Reading/writing arbitrary on-chain data
• Reading/writing off-chain data
• Forwarding events to other contracts
• Acting as a software library
Smart Contract Requirements
• Observability
• Verifiability
• Privity
• Enforceability
Oracles
• Smart contracts need oracles to resolve details
that cannot be precisely known at the time the
contract is written.
• Oracles provide reference information for smart
contracts.
• An oracle is a REST API connected to a data
source.
• Using oracles generally decreases security
Smart Contract Platforms
• Bitcoin
• Cardano (eventually)
• DFinity
• EOSIO
• Ethereum
• Hyperledger
• Lisk
• Pact on Kadena
• NEO
• Quorum
• Qtum
• RSK
• Stratis
• Wanchain
Ethereum Virtual Machine (EVM)
• Deterministic.
• Each Ethereum node has an EVM instance.
• EVM has a similar execution model to both the
Java and the .NET virtual machines.
• All these VMs are stack machines executing
bytecode.
• EVM adds storage and its bytecode is more
suited for contracts.
Viable Smart Contract Languages
All compile to EVM byte code except Chaincode
• AxLang
• Chaincode (Hyperledger)
• LLL
• Pact (Kadena)
• Solidity
Solidity
Solidity
• Solidity contracts are difficult to secure.
• Formal verification could help.
• Most Solidity contracts ignore security
recommendations.
• Solidity’s support for types is rather primitive.
Better On-Chain
Language Support
AxLang
AxLang
• Smart contract language designed to support
formal verification.
• Cross-compiled Scala DSL for Ethereum
• Designed to scale
• Not yet ready
Pact / Kadena
• Functional, interpreted Lisp-like syntax
• Features type inference
• Similar to database stored procedures in an
online transaction processing (OLTP) system
• Not Turing complete
• Runs on the Kadena blockchain
json-rpc
(Off-Chain apps)
json-rpc
• Popular communications protocol
• Communicates between off-chain
applications and an Ethereum client
Some json-rpc Libraries
• web3.js – for node.js
o Can also transpile Solidity to JavaScript
• web3j – for Java
• Can also transpile Solidity to Java
• web3j-scala – for Scala
o (I wrote this one)
o Idiomatic Scala wrapper around web3j
Learning
How do Computers Learn?
• Trial and error with feedback
• Training
Types of Machine Learning
Classifier systems
Reinforcement
Representation
Rule-based
Similarity and metric
Sparse dictionary
Support vector machines
Association rule
Artificial neural networks
Bayesian networks
Clustering
Decision tree
Deep
Genetic algorithms
Inductive logic programming
How Might Smart Contracts Learn?
• “Learning” computation must occur off-chain
• Enforced by the Ethereum fee structure
Machine Learning Applications
Machine perception, including computer
vision and object recognition
Optimization and metaheuristic
Recommendation systems
Robot locomotion (autonomy)
Sentiment analysis
Speech and handwriting recognition
Structural health monitoring
Syntactic pattern recognition
User behavior analytics
Translation
Automated theorem proving
Adaptive websites
Bioinformatics
Classifying DNA sequences
Detecting credit-card fraud
General game playing
Information retrieval
Internet fraud detection
Insurance
Linguistics
Medical diagnosis
Caution
Security / Complexity Tradeoff
Solidity and Security
• Contracts written in Solidity are difficult to
make secure.
o Formal verification could help.
• Solidity’s support for types is primitive
Security Cannot Be Retrofitted
• Secure systems can only be designed that
way from the start
o Trying to secure an existing platform can only give
marginal improvements
• Need orders of magnitude of improvements
to smart contract security
o Not possible without a fresh start
cryptocourses.tech
Thank you! Questions?
Mike Slinn
mslinn@micronauticsresearch.com
650-678-2285

Weitere ähnliche Inhalte

Was ist angesagt?

Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18TelecomValley
 
Blockchain and Services – Exploring the Links
Blockchain and Services – Exploring the LinksBlockchain and Services – Exploring the Links
Blockchain and Services – Exploring the LinksIngo Weber
 
Hyperledger community update 20180528
Hyperledger community update 20180528Hyperledger community update 20180528
Hyperledger community update 20180528Arnaud Le Hors
 
Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer Dr. Ketan Parmar
 
Kathleen Breitman at the Hyperledger Meetup
Kathleen Breitman at the Hyperledger Meetup Kathleen Breitman at the Hyperledger Meetup
Kathleen Breitman at the Hyperledger Meetup Altoros
 
DevDay: Managing a Distributed Network on a Common Infra, SIA
DevDay: Managing a Distributed Network on a Common Infra, SIADevDay: Managing a Distributed Network on a Common Infra, SIA
DevDay: Managing a Distributed Network on a Common Infra, SIAR3
 
Software Architecture and Model-Driven Engineering for Blockchain
Software Architecture and Model-Driven Engineering for BlockchainSoftware Architecture and Model-Driven Engineering for Blockchain
Software Architecture and Model-Driven Engineering for BlockchainIngo Weber
 
What is a blockchain
What is a blockchainWhat is a blockchain
What is a blockchainLen Bass
 
Blockchain: Background and Data61 Research Overview
Blockchain: Background and Data61 Research OverviewBlockchain: Background and Data61 Research Overview
Blockchain: Background and Data61 Research OverviewIngo Weber
 
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...Ingo Weber
 
Triple Entry Accounting: A BlockChain Use Case for Banks With R3 Corda
Triple Entry Accounting: A BlockChain Use Case for Banks With R3 CordaTriple Entry Accounting: A BlockChain Use Case for Banks With R3 Corda
Triple Entry Accounting: A BlockChain Use Case for Banks With R3 CordaDebajani Mohanty
 
Defrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain NetworkDefrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain NetworkDuncan Johnston-Watt
 
Wwc developing hyperledger applications v4
Wwc  developing hyperledger applications v4Wwc  developing hyperledger applications v4
Wwc developing hyperledger applications v4LennartF
 
How AI benefits from Blockchain and Game Theory with Scalable Censorship-resi...
How AI benefits from Blockchain and Game Theory with Scalable Censorship-resi...How AI benefits from Blockchain and Game Theory with Scalable Censorship-resi...
How AI benefits from Blockchain and Game Theory with Scalable Censorship-resi...Pandora Boxchain
 
DevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, ING
DevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, INGDevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, ING
DevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, INGR3
 
Introduction to Blockchain || How blockchain works || Uses of blockchain
Introduction to Blockchain || How blockchain works || Uses of blockchain Introduction to Blockchain || How blockchain works || Uses of blockchain
Introduction to Blockchain || How blockchain works || Uses of blockchain Yogesh Jangir
 
Hyperledger Lightning Talk
Hyperledger Lightning TalkHyperledger Lightning Talk
Hyperledger Lightning TalkAndrew Kennedy
 
Wwc developing hyperledger applications v2
Wwc  developing hyperledger applications v2Wwc  developing hyperledger applications v2
Wwc developing hyperledger applications v2LennartF
 
DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...
DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...
DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...R3
 

Was ist angesagt? (20)

Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18
 
Blockchain and Services – Exploring the Links
Blockchain and Services – Exploring the LinksBlockchain and Services – Exploring the Links
Blockchain and Services – Exploring the Links
 
Hyperledger community update 20180528
Hyperledger community update 20180528Hyperledger community update 20180528
Hyperledger community update 20180528
 
Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer
 
Kathleen Breitman at the Hyperledger Meetup
Kathleen Breitman at the Hyperledger Meetup Kathleen Breitman at the Hyperledger Meetup
Kathleen Breitman at the Hyperledger Meetup
 
DevDay: Managing a Distributed Network on a Common Infra, SIA
DevDay: Managing a Distributed Network on a Common Infra, SIADevDay: Managing a Distributed Network on a Common Infra, SIA
DevDay: Managing a Distributed Network on a Common Infra, SIA
 
Software Architecture and Model-Driven Engineering for Blockchain
Software Architecture and Model-Driven Engineering for BlockchainSoftware Architecture and Model-Driven Engineering for Blockchain
Software Architecture and Model-Driven Engineering for Blockchain
 
What is a blockchain
What is a blockchainWhat is a blockchain
What is a blockchain
 
Blockchain: Background and Data61 Research Overview
Blockchain: Background and Data61 Research OverviewBlockchain: Background and Data61 Research Overview
Blockchain: Background and Data61 Research Overview
 
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
Behavioral Analytics and Blockchain Applications – a Reliability View. Keynot...
 
Triple Entry Accounting: A BlockChain Use Case for Banks With R3 Corda
Triple Entry Accounting: A BlockChain Use Case for Banks With R3 CordaTriple Entry Accounting: A BlockChain Use Case for Banks With R3 Corda
Triple Entry Accounting: A BlockChain Use Case for Banks With R3 Corda
 
Defrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain NetworkDefrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain Network
 
Wwc developing hyperledger applications v4
Wwc  developing hyperledger applications v4Wwc  developing hyperledger applications v4
Wwc developing hyperledger applications v4
 
"Creating a Competitive Edge Using Blockchain Technology"
"Creating a Competitive Edge Using Blockchain Technology""Creating a Competitive Edge Using Blockchain Technology"
"Creating a Competitive Edge Using Blockchain Technology"
 
How AI benefits from Blockchain and Game Theory with Scalable Censorship-resi...
How AI benefits from Blockchain and Game Theory with Scalable Censorship-resi...How AI benefits from Blockchain and Game Theory with Scalable Censorship-resi...
How AI benefits from Blockchain and Game Theory with Scalable Censorship-resi...
 
DevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, ING
DevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, INGDevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, ING
DevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, ING
 
Introduction to Blockchain || How blockchain works || Uses of blockchain
Introduction to Blockchain || How blockchain works || Uses of blockchain Introduction to Blockchain || How blockchain works || Uses of blockchain
Introduction to Blockchain || How blockchain works || Uses of blockchain
 
Hyperledger Lightning Talk
Hyperledger Lightning TalkHyperledger Lightning Talk
Hyperledger Lightning Talk
 
Wwc developing hyperledger applications v2
Wwc  developing hyperledger applications v2Wwc  developing hyperledger applications v2
Wwc developing hyperledger applications v2
 
DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...
DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...
DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...
 

Ähnlich wie Smart Contracts That Learn

Fullsize Smart Contracts That Learn
Fullsize Smart Contracts That Learn Fullsize Smart Contracts That Learn
Fullsize Smart Contracts That Learn Mike Slinn
 
BlockchainConf.tech - Hyperledger overview
BlockchainConf.tech - Hyperledger overviewBlockchainConf.tech - Hyperledger overview
BlockchainConf.tech - Hyperledger overviewPad Kankipati
 
How to Build Your Blockchain Project with Chainstack
How to Build Your Blockchain Project with ChainstackHow to Build Your Blockchain Project with Chainstack
How to Build Your Blockchain Project with ChainstackChainstack
 
Blockchain Experiments 1-11.pptx
Blockchain Experiments 1-11.pptxBlockchain Experiments 1-11.pptx
Blockchain Experiments 1-11.pptxsaiproject
 
An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruLennartF
 
Cryptographic Agility in Corda
Cryptographic Agility in CordaCryptographic Agility in Corda
Cryptographic Agility in CordaGuy Hochstetler
 
Blockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and ApplicationsBlockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and ApplicationsIngo Weber
 
Polyglot Ethereum - Smart Contracts for the Enterprise
Polyglot Ethereum - Smart Contracts for the EnterprisePolyglot Ethereum - Smart Contracts for the Enterprise
Polyglot Ethereum - Smart Contracts for the EnterpriseMike Slinn
 
Vilnius blockchain club 20170413 consensus
Vilnius blockchain club 20170413 consensusVilnius blockchain club 20170413 consensus
Vilnius blockchain club 20170413 consensusAudrius Ramoska
 
Combating Mobile Device Theft with Blockchain
Combating Mobile Device Theft with BlockchainCombating Mobile Device Theft with Blockchain
Combating Mobile Device Theft with BlockchainNagesh Caparthy
 
Blockchain Tech Approach Whitepaper
Blockchain Tech Approach WhitepaperBlockchain Tech Approach Whitepaper
Blockchain Tech Approach WhitepaperProperty Bihar
 
Real world blockchain solutions - DevDays Asia 2018 - Taipei
Real world blockchain solutions - DevDays Asia 2018 - TaipeiReal world blockchain solutions - DevDays Asia 2018 - Taipei
Real world blockchain solutions - DevDays Asia 2018 - TaipeiMichael Chi
 
Algorand Technical Workshop 2021
Algorand Technical Workshop 2021Algorand Technical Workshop 2021
Algorand Technical Workshop 2021DanielBohnemann
 
IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0Matt Lucas
 
Write Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on EthereumWrite Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on Ethereum劉 維仁
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsSaad Zaher
 
Blockchain with HyperLedger (Public version)
Blockchain with HyperLedger (Public version)Blockchain with HyperLedger (Public version)
Blockchain with HyperLedger (Public version)Benjamin Fuentes
 

Ähnlich wie Smart Contracts That Learn (20)

Fullsize Smart Contracts That Learn
Fullsize Smart Contracts That Learn Fullsize Smart Contracts That Learn
Fullsize Smart Contracts That Learn
 
Block chain technology
Block chain technologyBlock chain technology
Block chain technology
 
Block chain technology
Block chain technology Block chain technology
Block chain technology
 
BlockchainConf.tech - Hyperledger overview
BlockchainConf.tech - Hyperledger overviewBlockchainConf.tech - Hyperledger overview
BlockchainConf.tech - Hyperledger overview
 
How to Build Your Blockchain Project with Chainstack
How to Build Your Blockchain Project with ChainstackHow to Build Your Blockchain Project with Chainstack
How to Build Your Blockchain Project with Chainstack
 
Blockchain Experiments 1-11.pptx
Blockchain Experiments 1-11.pptxBlockchain Experiments 1-11.pptx
Blockchain Experiments 1-11.pptx
 
An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ru
 
Cryptographic Agility in Corda
Cryptographic Agility in CordaCryptographic Agility in Corda
Cryptographic Agility in Corda
 
Blockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and ApplicationsBlockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and Applications
 
Polyglot Ethereum - Smart Contracts for the Enterprise
Polyglot Ethereum - Smart Contracts for the EnterprisePolyglot Ethereum - Smart Contracts for the Enterprise
Polyglot Ethereum - Smart Contracts for the Enterprise
 
Vilnius blockchain club 20170413 consensus
Vilnius blockchain club 20170413 consensusVilnius blockchain club 20170413 consensus
Vilnius blockchain club 20170413 consensus
 
Combating Mobile Device Theft with Blockchain
Combating Mobile Device Theft with BlockchainCombating Mobile Device Theft with Blockchain
Combating Mobile Device Theft with Blockchain
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
Blockchain Tech Approach Whitepaper
Blockchain Tech Approach WhitepaperBlockchain Tech Approach Whitepaper
Blockchain Tech Approach Whitepaper
 
Real world blockchain solutions - DevDays Asia 2018 - Taipei
Real world blockchain solutions - DevDays Asia 2018 - TaipeiReal world blockchain solutions - DevDays Asia 2018 - Taipei
Real world blockchain solutions - DevDays Asia 2018 - Taipei
 
Algorand Technical Workshop 2021
Algorand Technical Workshop 2021Algorand Technical Workshop 2021
Algorand Technical Workshop 2021
 
IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0
 
Write Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on EthereumWrite Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on Ethereum
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts
 
Blockchain with HyperLedger (Public version)
Blockchain with HyperLedger (Public version)Blockchain with HyperLedger (Public version)
Blockchain with HyperLedger (Public version)
 

Mehr von Mike Slinn

Evaluating Blockchain Companies
Evaluating Blockchain CompaniesEvaluating Blockchain Companies
Evaluating Blockchain CompaniesMike Slinn
 
Dotty (Scala 3) Preview
Dotty (Scala 3) PreviewDotty (Scala 3) Preview
Dotty (Scala 3) PreviewMike Slinn
 
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid PlatformEmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid PlatformMike Slinn
 
Play Architecture, Implementation, Shiny Objects, and a Proposal
Play Architecture, Implementation, Shiny Objects, and a ProposalPlay Architecture, Implementation, Shiny Objects, and a Proposal
Play Architecture, Implementation, Shiny Objects, and a ProposalMike Slinn
 
Composable Futures with Akka 2.0
Composable Futures with Akka 2.0Composable Futures with Akka 2.0
Composable Futures with Akka 2.0Mike Slinn
 
Scala adoption by enterprises
Scala adoption by enterprisesScala adoption by enterprises
Scala adoption by enterprisesMike Slinn
 
Sbt, idea and eclipse
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipseMike Slinn
 
Adobe Flash Platform for the Enterprise
Adobe Flash Platform for the EnterpriseAdobe Flash Platform for the Enterprise
Adobe Flash Platform for the EnterpriseMike Slinn
 

Mehr von Mike Slinn (9)

Evaluating Blockchain Companies
Evaluating Blockchain CompaniesEvaluating Blockchain Companies
Evaluating Blockchain Companies
 
Dotty (Scala 3) Preview
Dotty (Scala 3) PreviewDotty (Scala 3) Preview
Dotty (Scala 3) Preview
 
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid PlatformEmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
 
Play Architecture, Implementation, Shiny Objects, and a Proposal
Play Architecture, Implementation, Shiny Objects, and a ProposalPlay Architecture, Implementation, Shiny Objects, and a Proposal
Play Architecture, Implementation, Shiny Objects, and a Proposal
 
Composable Futures with Akka 2.0
Composable Futures with Akka 2.0Composable Futures with Akka 2.0
Composable Futures with Akka 2.0
 
Scala adoption by enterprises
Scala adoption by enterprisesScala adoption by enterprises
Scala adoption by enterprises
 
Sbt, idea and eclipse
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipse
 
Hanuman
HanumanHanuman
Hanuman
 
Adobe Flash Platform for the Enterprise
Adobe Flash Platform for the EnterpriseAdobe Flash Platform for the Enterprise
Adobe Flash Platform for the Enterprise
 

Kürzlich hochgeladen

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Kürzlich hochgeladen (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Smart Contracts That Learn

  • 1. Smart Contracts that Learn Mike Slinn April 3, 2018 Global Blockchain Conference
  • 3.
  • 4. About Mike Slinn • Distinguished engineer • Contributor to Ethereum Java and Scala libraries • Operates ScalaCourses.com • Publisher of Java / Node.js Ethereum courses (www.cryptocourses.tech) • Author of EmpathyWorks (artificial personality) • Expert witness • Twitter: mslinn
  • 5. Key Facts about Mike Slinn • Focuses on generating business value by applying people, process and technology • Wrote 3 books on distributed computing • Created hundreds of online lectures on advanced computing concepts • Uses many computer languages (“polyglot”)
  • 7. The most popular language or framework used to write smart contracts in 10 years probably has not been conceived of yet. -- Mike Slinn, March 3, 2018 --
  • 8. Machine Learning & Smart Contracts • Machine learning (ML) will be commonly used with smart contracts in 10 years. • Highly specialized languages will evolve to define and verify contracts in various industries. • ML will have features added to guarantee deterministic results for decentralized apps. • Security will surely have to improve
  • 9. Espionage • In 10 years time corporate and nation/state espionage will include: o Sabotaging training data o Spoofing smart contract events o Seeding smart contract templates with security weaknesses
  • 11. Dogma and ideology are not good for business Dial Back the Koolaid
  • 12. Confession Onchain smart contracts cannot actually learn However, these can learn: • User interfaces for on-chain distributed applications (ĐApps) • Oracles • Gateway contracts • Off-chain smart contracts (systems integrated via json- rpc)
  • 14. Beware Non-Deterministic Behavior • Blockchain requires determinism for consensus • An AI-driven product may not have deterministic behavior and may produce counter-intuitive results • A personalized recommender system may produce different results for a user action after learning additional preferences
  • 15. ML is Currently Offchain ML is currently centralized offchain, because significant computation and storage are required • Centralized, offchain processes can respond to onchain events and initiate activity via json-rpc or IPC to Ethereum clients • ML likely not decentralized for several years
  • 16. ‘Decentralization’ is Misleading • Decentralization uses consensus before output is accepted from multiple EVMs, which then leads to transactions. • Centralization does not use consensus; note that the web3 definition of centralization includes distributed applications that employ DNS with geolocation routing and failover.
  • 17. Security Issues • Discussion later in this talk o Features/Complexity versus Security o Solidity is misnamed
  • 18. Solidity is Not Required • Centralization is optional • System integration strategies o ML systems can indirectly interact with the blockchain using json-rpc or IPC to an Ethereum client such as geth or Parity o Native apps can combine ML with blockchain • Application decentralization is optional • Solidity is optional
  • 19. Issues With Solidity: • Primitive type system. • Compiler bugs (more surely exist). • Few software tools available. • Expensive to work with. • Very expensive to maintain. • Shelf life for this technology will be short.
  • 20. Avoid Solidity If Possible • Write the smart contract in the language of your choice, and use json-rpc calls as desired. • Resulting code will be well understood by all. • Audits will be more reliable. • Costs will be much less using a common language instead of Solidity. • Talent will be much easier to find.
  • 21. Ethereum Is Not Symmetric • Onchain smart contracts are distributed and use consensus • Offchain smart contracts (using Ethereum clients) are centralized and do not use consensus • This will likely evolve over the next several years
  • 22. Transpiling • Process of converting a program written in one language into another language. • Solidity could be transpiled to json-rpc calls from node.js and JVM languages (Java, Scala, JRuby, Jython, Groovy, etc). • … but don’t bother because you endure all the problems with Solidity and get none of the benefits of native contracts
  • 24. Self-Optimizing Contracts • Optimize transactions for greatest margin, minimal waste, constant deal flow, or other criteria • Results would improve over time • This is an onchain example
  • 25. Genetic algorithms Evolution strategies Evolutionary programming Simulated annealing Gaussian adaptation Hill climbing Swarm intelligence Integer linear programming
  • 26. Fraudulent Event Detection • Smart contracts currently act on all events • Fraud detection often employs machine learning • Incorporating ML into smart contracts could make them resistant to fraud • This is an onchain example
  • 27.
  • 28. Automated Customer Service Agents • Chatbots and voice interfaces (Alexa) • Much more natural to use • Can be built into devices • This is an onchain example
  • 30. Medical Diagnosis Expert System • Smart contract mediates access to an expert system (oracle, incorporates machine learning) • Accepts anonymous patient data • Passes data to an expert system that performs analysis • Returns diagnostic results • Charges for the service • This is an offchain example
  • 32. Supply Chain • SOLIDITY IS NOT REQUIRED • Native application (JVM, .NET, C++, whatever) uses json-rpc to interact with the blockchain • Solidity could be transpiled to json-rpc calls, but don’t bother as previously discussed • This is an offchain example
  • 35. Traditional Contracts… • Outline the terms of a relationship • According to a specific jurisdiction • So that the specified government can enforce the terms
  • 36. Smart Contracts… • Enable rule-based autonomous actions in response to events. • Work within and between organizations and the rest of society, world-wide.
  • 37. Smart Contracts Threaten Tradition • Enforce a relationship with cryptographic code • Without regard to the jurisdiction of any government
  • 38. System Integration • Collecting inputs and outputs to smart contracts requires system integration. • Approaches to system integration vary widely according to the nature of the input sources, output destinations, volumes of data, required reliability, fairness (near-constant latency), etc.
  • 39. Smart Contracts … • Also known as cryptocontracts • Are computer programs • Directly control the transfer of blockchain-based digital currencies or assets • Define the rules and penalties for an agreement • Might automatically enforce those obligations
  • 40. Smart Contract Capabilities Manage relationship between parties by: • Maintaining virtual ledgers • Reading/writing arbitrary on-chain data • Reading/writing off-chain data • Forwarding events to other contracts • Acting as a software library
  • 41. Smart Contract Requirements • Observability • Verifiability • Privity • Enforceability
  • 42. Oracles • Smart contracts need oracles to resolve details that cannot be precisely known at the time the contract is written. • Oracles provide reference information for smart contracts. • An oracle is a REST API connected to a data source. • Using oracles generally decreases security
  • 43. Smart Contract Platforms • Bitcoin • Cardano (eventually) • DFinity • EOSIO • Ethereum • Hyperledger • Lisk • Pact on Kadena • NEO • Quorum • Qtum • RSK • Stratis • Wanchain
  • 44. Ethereum Virtual Machine (EVM) • Deterministic. • Each Ethereum node has an EVM instance. • EVM has a similar execution model to both the Java and the .NET virtual machines. • All these VMs are stack machines executing bytecode. • EVM adds storage and its bytecode is more suited for contracts.
  • 45. Viable Smart Contract Languages All compile to EVM byte code except Chaincode • AxLang • Chaincode (Hyperledger) • LLL • Pact (Kadena) • Solidity
  • 47. Solidity • Solidity contracts are difficult to secure. • Formal verification could help. • Most Solidity contracts ignore security recommendations. • Solidity’s support for types is rather primitive.
  • 50. AxLang • Smart contract language designed to support formal verification. • Cross-compiled Scala DSL for Ethereum • Designed to scale • Not yet ready
  • 51. Pact / Kadena • Functional, interpreted Lisp-like syntax • Features type inference • Similar to database stored procedures in an online transaction processing (OLTP) system • Not Turing complete • Runs on the Kadena blockchain
  • 53. json-rpc • Popular communications protocol • Communicates between off-chain applications and an Ethereum client
  • 54. Some json-rpc Libraries • web3.js – for node.js o Can also transpile Solidity to JavaScript • web3j – for Java • Can also transpile Solidity to Java • web3j-scala – for Scala o (I wrote this one) o Idiomatic Scala wrapper around web3j
  • 56. How do Computers Learn? • Trial and error with feedback • Training
  • 57. Types of Machine Learning Classifier systems Reinforcement Representation Rule-based Similarity and metric Sparse dictionary Support vector machines Association rule Artificial neural networks Bayesian networks Clustering Decision tree Deep Genetic algorithms Inductive logic programming
  • 58. How Might Smart Contracts Learn? • “Learning” computation must occur off-chain • Enforced by the Ethereum fee structure
  • 59. Machine Learning Applications Machine perception, including computer vision and object recognition Optimization and metaheuristic Recommendation systems Robot locomotion (autonomy) Sentiment analysis Speech and handwriting recognition Structural health monitoring Syntactic pattern recognition User behavior analytics Translation Automated theorem proving Adaptive websites Bioinformatics Classifying DNA sequences Detecting credit-card fraud General game playing Information retrieval Internet fraud detection Insurance Linguistics Medical diagnosis
  • 62. Solidity and Security • Contracts written in Solidity are difficult to make secure. o Formal verification could help. • Solidity’s support for types is primitive
  • 63. Security Cannot Be Retrofitted • Secure systems can only be designed that way from the start o Trying to secure an existing platform can only give marginal improvements • Need orders of magnitude of improvements to smart contract security o Not possible without a fresh start
  • 65. Thank you! Questions? Mike Slinn mslinn@micronauticsresearch.com 650-678-2285