SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
1/18
Findel: Secure Derivative Contracts for
Ethereum
Alex Biryukov Dmitry Khovratovich
Sergei Tikhomirov
1st Workshop on Trusted Smart Contracts
In Association with Financial Cryptography 17
7 April 2017, Malta
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
2/18
... and Smart Contract Developer
Adapted from xkcd.com/1428
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
3/18
Contract Programming is Different
”Move fast and break things”: unacceptable!
Real money (property, resources) at stake
Side-effects often cause trouble (The DAO)
We need a formally verifiable contract language
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
4/18
A Secure Financial DSL Helps
Avoid misinterpretation
Standardize templates
Prove correctness
Facilitate automated processing
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
5/18
Composable Contracts [Peyton Jones et al. 2003]
Ten primitives to compose complex agreements
Declarative paradigm
Implemented as an embedded DSL in Haskell
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
5/18
Composable Contracts [Peyton Jones et al. 2003]
Ten primitives to compose complex agreements
Declarative paradigm
Implemented as an embedded DSL in Haskell
Example: zero-coupon bond
when (at 2018-01-01) (scale (konst 100)) (one $))
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
6/18
Ethereum
Turing-complete virtual machine
Key feature: trustless execution
Perfect match for financial agreements!
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
7/18
Ethereum Meets Composable Contracts
Map declarative DSL to blockchain execution paradigm
Retrieve and validate external data
Ensure that execution cost is bearable
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
8/18
Financial Derivatives Language (Findel)
Contract: agreement between issuer and owner
Contract description defines rights and obligations
Description is a tree of primitives
Description and issuer are immutable
Ownership may be transferred
Smart contract acts as execution environment
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
9/18
Findel Primitives 1/2
Zero – do nothing
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
9/18
Findel Primitives 1/2
Zero – do nothing
One – transfer 1 unit of currency from issuer to owner
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
9/18
Findel Primitives 1/2
Zero – do nothing
One – transfer 1 unit of currency from issuer to owner
Scale(k, c) – multiply all payments by a constant value
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
9/18
Findel Primitives 1/2
Zero – do nothing
One – transfer 1 unit of currency from issuer to owner
Scale(k, c) – multiply all payments by a constant value
ScaleObs(obs, c) – multiply all payments by an
observable value (think exchange rate)
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
9/18
Findel Primitives 1/2
Zero – do nothing
One – transfer 1 unit of currency from issuer to owner
Scale(k, c) – multiply all payments by a constant value
ScaleObs(obs, c) – multiply all payments by an
observable value (think exchange rate)
Give(c) – swap parties
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
10/18
Findel Primitives 2/2
And(c1, c2) – execute both sub-contracts
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
10/18
Findel Primitives 2/2
And(c1, c2) – execute both sub-contracts
Or(c1, c2) – owner chooses which sub-contract to
execute
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
10/18
Findel Primitives 2/2
And(c1, c2) – execute both sub-contracts
Or(c1, c2) – owner chooses which sub-contract to
execute
If (obs, c1, c2) – execute one of sub-contracts
(depending on observable)
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
10/18
Findel Primitives 2/2
And(c1, c2) – execute both sub-contracts
Or(c1, c2) – owner chooses which sub-contract to
execute
If (obs, c1, c2) – execute one of sub-contracts
(depending on observable)
Timebound(t0, t1, c) – execute c, if within time bounds
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
11/18
Example 1/3: Currency Exchange
And(Give(One(EUR)), ScaleObs(exchAddr, One(USD)))
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
12/18
Example 2/3: European Option
Timebound(t0 − δ, t0 + δ, Or(One(EUR), Zero))
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
13/18
Example 3/3: Binary Option
If (orclAddr, Scale(10, One(USD)), Zero)
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
14/18
External Data Problem
Contracts require external data
Ethereum is isolated from broader Internet
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
14/18
External Data Problem
Contracts require external data
Ethereum is isolated from broader Internet
Our solution: gateways
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
15/18
Gateways
Smart contract pulls and stores external data with
timestamp
Optional proof of authenticity (e.g., signature under
known public key)
Findel marketplace queries gateway when needed
Parties are responsible for updating gateways
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
16/18
What Is Done
Defined a declarative DSL suited for blockchain
Implemented a marketplace smart contract in Solidity
Assessed cost of operation (∼ $0.1 per avg operation)1
1
As of Jan 2017 at $10 / ether
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
17/18
Future Work
Enforcement: deal with users defaulting on debt
Model balances using ERC20 Token
Extend model to support multi-party contracts
Look into valuation and verification
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
18/18
Questions?
cryptolux.org
@serg tikhomirov
sergei.tikhomirov@uni.lu

Más contenido relacionado

Más de Sergei Tikhomirov

Más de Sergei Tikhomirov (8)

Smartcheck: Static Analysis of Ethereum Smart Contracts
Smartcheck: Static Analysis of Ethereum Smart ContractsSmartcheck: Static Analysis of Ethereum Smart Contracts
Smartcheck: Static Analysis of Ethereum Smart Contracts
 
Privacy preserving KYC on Ethereum
Privacy preserving KYC on EthereumPrivacy preserving KYC on Ethereum
Privacy preserving KYC on Ethereum
 
Bitcoin: money of the future
Bitcoin: money of the futureBitcoin: money of the future
Bitcoin: money of the future
 
Financial Domain-Specific Languages
Financial Domain-Specific LanguagesFinancial Domain-Specific Languages
Financial Domain-Specific Languages
 
Computer Science and Blockchain Research at University of Luxembourg
Computer Science and Blockchain Research at University of LuxembourgComputer Science and Blockchain Research at University of Luxembourg
Computer Science and Blockchain Research at University of Luxembourg
 
Blockchain security research (in 2 minutes)
Blockchain security research (in 2 minutes)Blockchain security research (in 2 minutes)
Blockchain security research (in 2 minutes)
 
Pethreon: recurring payments on Ethereum
Pethreon: recurring payments on EthereumPethreon: recurring payments on Ethereum
Pethreon: recurring payments on Ethereum
 
Bitcoin: деньги будущего
Bitcoin: деньги будущегоBitcoin: деньги будущего
Bitcoin: деньги будущего
 

Último

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 

Findel: Secure Derivative Contracts for Ethereum